You are on page 1of 15

Chapter 1

Binary systems and


hexadecimal

IGCSE ® Computer Science © Hodder & Stoughton 2015


Converting binary numbers to denary

128 64 32 16 8 4 2 1

1 1 1 0 1 1 1 0

128 + 64 + 32 +8 +4 +2 = 238

11101110(binary) = 238(denary)
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting denary numbers to binary
To find the equivalent 8-bit binary value, we carry out eight divisions by 2:
1 2 107
2 2 53 remainder 1
3 2 26 remainder 1
4
5
6
2 13
2 6
2 3
remainder 0
remainder 1
remainder 0
107
1 remainder 1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Converting denary numbers to binary
To find the equivalent 8-bit binary value, we carry out eight divisions by 2:
1 2 107
2 2 53 remainder 1
3 2 26 remainder 1
4 2 13 remainder 0
5
6
2 6
2 3
remainder 1
remainder 0
01101011
7 2 1 remainder 1
8 2 0 remainder 1
0 remainder 0
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting denary numbers to binary

107
128 64 32 16 8 4 2 1

0 1 1 0
Total: 64 + 32 = 96

IGCSE ® Computer Science © Hodder & Stoughton 2015


Converting denary numbers to binary

107
128 64 32 16 8 4 2 1

0 1 1 0 1 0 1 1
Total: 64 + 32 =+ 96
8 =+ 104
2 =+ 106
1 = 107

IGCSE ® Computer Science © Hodder & Stoughton 2015


Converting binary numbers to hexadecimal: Example 1

1 0 1 1 1 1 1 0 0 0 0 1
1 0 1 1 1 1 1 0 0 0 0 1
B E 1

101111100001(binary) = BE1(hexadecimal)
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting binary numbers to hexadecimal: Example 2

1 0 0 0 0 1 1 1 1 1 1 1 0 1
0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1
2 1 F

IGCSE ® Computer Science © Hodder & Stoughton 2015


Converting binary numbers to hexadecimal: Example 2

1 0 0 0 0 1 1 1 1 1 1 1 0 1
0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1
2 1 F D

10000111111101(binary) = 21FD(hexadecimal)
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting hexadecimal numbers to binary

45A
0 1 0 0 0 1 0 1 1 0 1 0

45A(hexadecimal) = 010001011010(binary)
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting hexadecimal numbers to denary

256 16 1

4 5 A

Total:
Total: 256
(256××44)= +1024
(16 × 5) =+ 1104
(10 × 1) = 1114
45A(hexadecimal) = 1114(denary)
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting denary numbers to hexadecimal: Example 1
To find the equivalent hexadecimal value, we carry out divisions by 16:

16 2004

16 125 remainder 4

16 7 remainder 13 D

0 remainder 7
2 70D0 44
IGCSE ® Computer Science © Hodder & Stoughton 2015
Converting denary numbers to hexadecimal: Example 2
To find the equivalent hexadecimal value, we carry out divisions by 16:

16 41215

16 2575 remainder 15 F

16 160 remainder 15 F
16 10 remainder 0
4 1A20 1F 5F
0 remainder 10 A

IGCSE ® Computer Science © Hodder & Stoughton 2015


ASCII code table C %43
O %4F
M %4D
P %50
U %55
T %54
E %45
R %52

IGCSE ® Computer Science © Hodder & Stoughton 2015


Web addresses in ASCII
www.hoddereducation.co.uk

%77%77%77
%2E
%68%6F%64%64%65%72
%65%64%75%63%61%74
%69%6F%6E
%2E
%63%6F
%2E
%75%6B

IGCSE ® Computer Science © Hodder & Stoughton 2015

You might also like