qfedu-basic-level/day5/d4.cpp

13 lines
197 B
C++
Raw Normal View History

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