# Hexadecimal

**Learning Objectives**

- Explain the benefits of working with hexadecimal codes instead of binary codes
- Assess different methods of converting hexadecimal to binary and denary.

**Getting Started: Introduction to Hexadecimal**

## What is hexadecimal?

## Why use hexadecimal?

Hexadecimal codes are much shorter to write for programmers because each hex value is equivalent (the same as) 4 bits of binary.

A good example is when programmers use hex codes to display the right colour.

- As you can see below, the hex value for the colour blue is
**0036D9** - If the programmer used a binary code instead, they would have to write out the following code:
**000000000011011011011001**

Therefore, the advantages of using hexadecimal are

- It is easy to convert from hexadecimal/binary
- It is faster and easier to read and write.
- Due to hex codes being much smaller, you are also less likely to make errors and it is easier to debug.

**Challenge 1: Convert Hexadecimal to Binary**

## Warm up

Watch this video and then answer the questions below

Convert the follow hexadecimal values into binary

- D
- 1
- F
- C
- 7

## Main Challenge

Watch the next video and have a go at the challenges

Convert the following hexadecimal values into binary

- 1F
- 7C
- 4F
- 17
- EE

## Super Challenge

Watch the following video and have a go at the questions

Convert the following hexadecimal values into binary

- ABC
- 123
- FFA
- E5C4
- 49AF4

**Challenge 2: Convert Binary to Hexadecimal**

## Warm up

Watch the following video and answer the questions

Convert the following binary values to hexadecimal

- 1010
- 0011
- 1111
- 0000
- 1100

## Main Challenge

Watch the following video and answer the questions

Convert the following binary values to hexadecimal

- 10101001
- 10110111
- 01101010
- 11111111
- 01110010

## Super Challenge

Watch the video and have a go at the questions

Convert the following binary values to hexadecimal

- 000111
- 11111
- 101011110001
- 10
- 0000011110001

**Challenge 3: Convert Hexadecimal to Denary**

## Warm up

Read this information on BBC Bitesize and have a go at the questions below:

- A
- C
- D
- 2
- 7

## Main Challenge

Watch the video and have a go at the questions

Convert the following hexadecimal values to denary

- 1F
- C2
- 51
- 73
- AA

## Super Challenge

No video this time, just use your knowledge of this topic to convert these larger hexadecimal values into denary. You may need to use a calculator!

- 123
- ABC
- FFA
- 1111
- 1AA4

**Challenge 4: Denary to Hexadecimal**

## Warm up

## Main Challenge

Watch the video below and have a go at the questions

Convert the following denary values to hexadecimal

- 42
- 77
- 102
- 171
- 249

## Super Challenge

No video this time, just use your knowledge of this topic to convert these larger denary values into hexadecimal. You may need to use a calculator!

- 256
- 300
- 1000
- 4096
- 58820