- DIN
- Objectives
- What is Hexadecimal?
- Activity 1
- Activity 2
- Plenary
β±οΈ Do It Now
Copy this title into a new OneNote document:
Y10 AU – P5 – Hexadecimal
Complete this table and copy it into the OneNote document:
| β±οΈ Do It Now: |
| Complete the following tasks (1) Complete 10 binary additions: Binary Addition Practice Screenshot the result below: (2) Complete 10 two’s complement conversions: Two’s Complement Practice Screenshot the result below: |
π― Learning Objectives
(1) We will learn what hexadecimal is
(2) We will learn how to convert between denary and hexadecimal
(3) We will learn how to convert between binary and hexadecimal
- Tab 1
- Tab 2
- Tab 3
- Tab 4
What is Hexadecimal?
Hexadecimal (often shortened to hex) is a number system that uses 16 different symbols to represent values:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
The letters A-F represent the decimal values 10-15.
For example:
- Decimal 10 = Hexadecimal A
- Decimal 15 = Hexadecimal F
- Decimal 16 = Hexadecimal 10
- Decimal 26 = Hexadecimal 1A
- Decimal 255 = Hexadecimal FF
Why is Hexadecimal Used?
Computers store and process data in binary (0s and 1s), but long binary numbers can be difficult for humans to read and write accurately.
Hexadecimal provides a much more compact representation because one hexadecimal digit represents exactly four binary bits.
Binary: 11111111 Hexadecimal: FF
This makes hexadecimal easier to read, write and debug while still maintaining a direct relationship with binary.
Common Uses of Hexadecimal
Network Addressing
IPv6 addresses use hexadecimal because they require very large numbers.
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Using hexadecimal keeps addresses much shorter and easier to manage than writing the same values in binary.
Memory Addresses and Encryption Keys
Computer memory locations, machine code and encryption keys are often displayed in hexadecimal.
Example memory address:
0x7FFE12A4
Example encryption key fragment:
A3F9B7C2
Hexadecimal provides a compact and human-readable way of representing large binary values.
Hexadecimal Colour Values
Colours are commonly represented using hexadecimal codes in HTML and CSS.
- Red: #FF0000
- Green: #00FF00
- Blue: #0000FF
- White: #FFFFFF
- Black: #000000
Each pair of digits represents the amount of Red, Green and Blue (RGB) in the colour.
For example, #FF0000 means:
- FF (255) Red
- 00 (0) Green
- 00 (0) Blue
The resulting colour is pure red.
Hexadecimal colour codes are widely used in web design and digital graphics because they provide a simple way to specify exact colours.
β¨οΈ Activity 1 – Denary and Hexadecimal
- Tab 1
- Tab 2
- Tab 3
- Tab 4
Hexadecimal
- Hexadecimal (or hex) is a number system which uses base 16
- As we only have 10 digits, it uses 0-9 and then the letters A to F
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
- What is F in denary?
- What is 10 in hex?
Hex to denary conversion
- You will only need to translate one- or two-digit hexadecimal numbers
| 16s | Units | ||
| 2 | A | ||
| 2Γ16 | + | 10 | = 42 in denary |
- Multiply the left-hand digit by 16, then add the units
- What is hex 27 in denary?
Denary to hex conversion
-
Divide the denary number by 16 to get the number of 16s
(the left-hand hex digit) - The remainder gives you the units
Denary 18 becomes:
18 / 16 = 1 remained 2
so
the hex value for
18
is
12
(Spoken, βOne Twoβ, not βTwelveβ)
- What is denary 27 in hex?
- What is denary 44 in hex?
Copy These Questions Into OneNote
Denary to Hexadecimal
- Convert denary 23 to hexadecimal.
- Convert denary 45 to hexadecimal.
- Convert denary 62 to hexadecimal.
- Convert denary 89 to hexadecimal.
- Convert denary 127 to hexadecimal.
Hexadecimal to Denary
- Convert hexadecimal 1A to denary.
- Convert hexadecimal 2F to denary.
- Convert hexadecimal 3C to denary.
- Convert hexadecimal 4D to denary.
- Convert hexadecimal 7B to denary.
Click anywhere in this box to select all questions.
β¨οΈ Activity 2 – Binary and Hexadecimal
- Tab 1
- Tab 2
- Tab 3
Binary to hex conversion
-
Take a binary number of 8 bits
11100101
-
Divide into two nibbles of 4 bits
1110 0101
-
Convert each nibble into its hex value and rejoin
1110 = 14 = E in Hex + 0101 = 5 in Hex
Hex to binary conversion
What is 3B in binary?
Split the two hex characters
So 3B = 0011 1011 in binary
What is hex 21 in binary?
What is hex A5 in binary?
Let’s practice with the online convertor: Denary β Binary β Hex β Nibbles Copy Checker
Screenshot your results and paste them into OneNote
π Plenary
In OneNote, explain how hexadecimal works:
(1) How many symbols are used
(2) What each symbol represents
(3) How hexadecimal differs from denary
(4) How binary nibbles relate to hexadecimal