Seneca

Hexadecimal

Computer Science: OCR A Level, topic 4.1.10

Hexadecimal Numbers

Hexadecimal is faster for humans to process than binary. Hexadecimal allows us to find errors more easily. Hexadecimal is used in every computer system.

Hexadecimal

Hexadecimal

  • Hexadecimal or hex uses 16 different symbols for each place.
  • Having 16 symbols makes hexadecimal a base-16 numerical system.
  • Hexadecimal uses the digits 0-9, then A-F:
  • A = 10 in denary, B = 11, C = 12, D = 13 and so on.
  • Each digit's place value is multiplied by 16 as we move from right to left.
Advantages

Advantages

  • An 8-bit binary number can be represented by two hexadecimal digits.
  • Fewer digits means you can reduce processing time with hexadecimal than with binary.
  • Hex is easier and faster to write two digits than the full binary sequence.
  • Hexadecimal is easier for a human to process than binary.
Using hexadecimal

Using hexadecimal

  • Hexadecimal is used widely in programming languages such as:
  • Machine code.
  • Assembly.
  • Hex can be used when debugging programs because hex is easy for humans to process.
  • Hex can represent numbers stored in a CPU's registers or in main memory.

Test yourself on Hexadecimal

  • Select the true statement about hexadecimal and binary in each pair.

Practise this topic for free