Related questions
Can I use a binary literal in C or C++?
I need to work with a binary number.
I tried writing:
const x = 00010000;
But it didn't work.
I know that I can use an hexadecimal number that has the same value as 00010000, but I want to know if there is …
Grabbing n bits from a byte
I'm having a little trouble grabbing n bits from a byte.
I have an unsigned integer. Let's say our number in hex is 0x2A, which is 42 in decimal. In binary it looks like this: 0010 1010. How would I grab the …