I am doing the following. I would like to shift 1001 to the left
int a = 0; a = (1001 << 2); std::cout << a; //Gives 4004
I was expecting it to be in binary 100100 which is 36. Why am I getting 0000111110100100?
100100
0000111110100100
Aucun commentaire:
Enregistrer un commentaire