Digital data - CCEAHexadecimal numbers

What is digital data, and how do computers understand it? How is digital data represented, stored, shared and manipulated?

Part ofDigital Technology (CCEA)Digital development concepts (programming)

Hexadecimal numbers

numbers are a base-16 system as there are 16 digits. The first ten digits are 0 to 9, and the remaining 6 digits are represented by the letters A, B, C, D, E and F.

It is used in computing as each 8-bit number needs only two hexadecimal digits, and is much easier to write.

Denary0123456789101112131415
Hexadecimal0123456789ABCDEF
Denary
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Hexadecimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F

Converting hexadecimal to denary

Worked example: Hexadecimal number 6CF

Step 1: Draw a table with each column representing a power of 16. These are the place values of numbers. As you have a three digit hexadecimal number, you will need the first three hexadecimal place values - 160 (1), 161 (16) and 162 (256). The least significant bit should be furthest to the right.

Hex. Place Value256161
Hex. Place Value
256
16
1

Step 2: Place the hexadecimal number in a row below.

Hex. Place Value256161
Hex. Number6CF
Hex. Place Value
256
16
1
Hex. Number
6
C
F

Step 3: Multiply the denary value of the hexidecimal digit by its place value. Refer to the table at the top of the page for the denary value of each hexidecimal digit.

Hex. Place Value256161
Hex. Number6CF
Denary x Place Value6 x 25612 x 1615 x 1
Hex. Place Value
256
16
1
Hex. Number
6
C
F
Denary x Place Value
6 x 256
12 x 16
15 x 1

Step 4: Sum the values in the bottom row to produce your denary number. (6x256) + (12 x 16) + (15 x 1) = 1743.

Converting hexadecimal to binary

Four digits of binary perfectly represent one digit of . This makes converting between the two number systems easy. It also means that one digit of hexadecimal can be stored in one nibble.

Worked example: Hexadecimal number 7F

Step 1: Treat each hexadecimal digit seperately and consider its denary value (refer to the table at the top of the page if required). In this case, 7 equals 7 and F equals 15.

Step 2: Convert each of these denary values into 4-bit binary numbers (refer to denary to binary conversions if required). In this case, 7 = 0111 and 15 = 1111.

Step 3: With each hexadecimal digit now represented by 4-bit binary numbers, the hexadecimal number 7F can be represented in binary as 0111 1111.