output the converted decimal number in each binary number in memory (four bytes in total, each byte separated by a space)
decimal number: 122
binary number: 00000000 00000000 00000000 00001100
Code:
for (int I = 31; I > = 0; iMel -)
{
std::cout << ((num >> i) & 0x1);//num
if (i % 8 == 0)
{
std::cout << " ";
}
}
what does the above code mean? Could you explain it in detail? If anti-code knowledge is involved, please explain it in detail. Why this can be the binary number in memory, thank you!