How do I get the lower 8 bits of an int?

Viewed 90909

Lets say I have an int variable n = 8. On most machines this will be a 32 bit value. How can I only get the lower 8 bits (lowest byte) of this in binary? Also how can I access each bit to find out what it is?

4 Answers
Related