Skip to content
Learnearn.uk » IB Computer Science » Hexadecimal

Hexadecimal

Introduction

Why do we use it hexadecimal?

Binary is very difficult for humans to read (especially larger numbers) but computers work in binary, so any usage where you need to be able to inspect and edit the binary directly (such as in machine code/ assembly language) then humans need to be able to read the binary easily and accurately. This is where hexadecimal comes in :

  • Hexadecimal allows humans to interact with binary in a human readable form.
  • Hexadecimal is compact and easy for humans to read
  • Large numbers can be represented in a smaller number of digits, making them easier and more accurately read by humans.
  • Hexadecimal can be easily converted to binary and vice verse.

 

How does hexadecimal work?

In the normal human counting system we use a base 10 number system, meaning that the each extra digit increases in powers of 10 each time:

Hexadecimal is a Base 16 number system, meaning that increases in powers of 16, with each digit being one of 16 different combinations.

The hexadecimal number consists of:

  • 0 = 0
  • 1 = 1
  • 2 =2
  • 3 = 3
  • 4 = 4
  • 5 = 5
  • 6 = 6
  • 7 =7
  • 8 = 8
  • 9 = 9
  • A = 10
  • B = 11
  • C = 12
  • D = 13
  • E = 14
  • F = 15

Why do we use a to f instead of 11 to 15?

We can’t use 11 to 15 because we wouldn’t know what number it represented. The Digits 13  could be 13 or it could be 19  (1 * 16 + 3), this is because denary numbers greater than 9 use 2 digits instead of one digit.

 

 

HTML/CSS

MAC

Assembly/MC

Error Codes/Logs

Resources