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

This commit is contained in:
2023-06-16 16:33:04 +08:00
parent 896ab0ca76
commit 1f93e821ed
+12
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;
}