Hexadecimal

Hexadecimal

Hexadecimal is a **base-16** numbering system.

  • It uses 16 digits, 0 to 9 and then A to F.
  • Each position corresponds to .
  • Since , it is easy to convert between binary and hex.
Link to original

To convert a binary number to hexadecimal (or back):

  • We group each part of the binary number into groups of 4 bits (a Nibble).
  • Convert each separate nibble to decimal.
  • Each nibble translates to one hexadecimal character.

For example, to convert to hex:

  • Group into nibbles:
  • Convert each nibble to decimal:
  • Translate to hex characters:
  • Hence