#include <iostream> #include <bitset>; using namespace std; int main () { //赋值运算符,位运算 short int x = -178; short int y = x<<1; cout<<bitset<sizeof(x)*8>(x)<<endl; cout<<bitset<sizeof(y)*8>(y)<<endl; return 0; }