测试负数的二进制表示:补码方式存储

This commit is contained in:
flykhan 2023-06-16 16:33:04 +08:00
parent 896ab0ca76
commit 1f93e821ed
1 changed files with 12 additions and 0 deletions

12
day5/d4.cpp Normal file
View File

@ -0,0 +1,12 @@
// 测试负数的二进制表示:补码方式存储
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
int x = -123;
cout << bitset<8>(x) << endl;
return 0;
}