C/C++中的移位運算符——由二進制轉換程序引發的思考

以前學習移位運算符的時候並沒有太多關注它,而此次關於移位運算符的探究,主要源於寫的一個二進制顯示的程序: #include <iostream> using namespace std; int main() { int a=-1; for(int i=0;i<32;i++) cout<<(( a & ( 1 << 31 ) >> i ) != 0); return
相關文章
相關標籤/搜索