A number is just a quantity; binary, octal, decimal, hex and BCD are different ways of writing the same quantity. Each binary digit (bit) carries a place value — 128, 64, 32… down to 1. Hex packs four bits into one digit, octal packs three, and BCD encodes each decimal digit separately in four bits.
- Try this: Set the value to 255. What is that in binary, and in hex?
- Try this: Toggle only the 128 and 1 bits. Read off the decimal — does it match the place sum?
- Try this: Compare hex with binary as you change the value. How many bits make one hex digit?