Professional Documents
Culture Documents
Chapter 1 Binary and Hexadecimal
Chapter 1 Binary and Hexadecimal
SYSTEM AND
HEXADECIMAL
Conversion
of binary number system into
decimal number system
LESSON 1
Used by Used in
System Base Symbols humans? computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa- 16 0, 1, … 9, No No
decimal A, B, … F
Decimal
Hexadecimal
Binary
Decimal Octal
Binary Hexadecimal
Binary to Decimal
Example 1
Bit “0”
1010112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
0 x 24 = 0
1 x 25 = 32
4310
Example 2
DIY:
Convert these 8-bit binary numbers in to denary.
0 0 0 1 1 0 0 1
0 1 0 1 0 0 0 0
1 0 0 1 0 0 1 1
1 1 1 1 1 1 1 1
Home Task
Activity 1.1 a – j
(peer/self checking)
TODO
OBJECTIVES:
Conversion
of denary number system into
binary number system (using both
methods)
LESSON 2
Decimal Octal
Binary Hexadecimal
Decimal to Binary
Consider the conversion of the denary number, 110 , into
binary. This method involves placing 1s in the appropriate
positions so that the total equates to 110
128 64 32 16 8 4 2 1
0 1 1 0 1 1 1 0
METHOD 1/EXAMPLE 1
Consider the conversion of the denary number, 142 , into
binary. This method involves placing 1s in the appropriate
positions so that the total equates to 142
128 64 32 16 8 4 2 1
1 0 0 0 1 1 1 0
METHOD 1/EXAMPLE 2
METHOD 2/EXAMPLE 1
12510 = ?2 2 125
2 62 1
2 31 0
2 15 1
2 7 1
2 3 1
2 1 1
0 1
12510 = 11111012
METHOD 2/EXAMPLE 2
DIY:
a) 55
b) 248
c) 13
d) 191
e) 250
Home Task
Activity 1.2 a – j (both methods)
(peer/self checking)
TODO
OBJECTIVES:
Conversion
of denary number system into
hexadecimal number system
LESSON 3-4
Decimal Octal
Binary Hexadecimal
Decimal to Hexadecimal
Example 1
123410 = ?16
16 1234
16 77 2
16 4 13 = D
0 4
123410 = 4D216
Example 2
Consider the conversion of the denary numbers 55 and 2004 into hexadecimal.
TODO
OBJECTIVES:
LESSON 4-5
Decimal Octal
Binary Hexadecimal
Hexadecimal to Decimal
Example 1
ABC16 => C x 160 = 12 x 1 = 12
B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810
Example 2
DIY
Convert the following hexadecimal
into denary
a) C0B
b) F2
c) A12
Home Task
Activity 1.6 a-j
(Peer/self checking)
TODO
OBJECTIVES:
LESSON 6
Decimal Octal
Binary Hexadecimal
Hexadecimal to Binary
Example 1
10AF16 = ?2
1 0 A F
10AF16 = 00010000101011112
Example 2
DIY
Convert the following hexadecimal
notations into binary
A00
BFF
C09
Home Task
Activity 1.5 a-j
(peer/self checking)
TODO
OBJECTIVES:
Conversion
of binary number system into
hexadecimal number system
LESSON 7
Decimal Octal
Binary Hexadecimal
Binary to Hexadecimal
Example 1
Example 2
10101110112 = ?16
10 1011 1011
2 B B
10101110112 = 2BB16
DIY
Convert the following binary into hexadecimal notations
a) 1010 1100
b) 1101 1011 0111
c) 1001 1001 1000
d) 1100 1010
e) 0001 1111 0011
Home Task
Activity 1.4 a-j
(peer/self checking)
TODO
Plenary task
Hexa-
Decimal Binary decimal
33
1110101
1AF
Answer
Hexa-
Decimal Binary decimal
33 100001 21
117 1110101 75
431 110101111 1AF
USES OF BINARY
A robot vacuum cleaner has three wheels,
A, B and C. A rotates on a spindle to allow
for direction changes (as well as forward
and backward movements); B and C are
fixed to revolve around their axles to
provide only forward and backward
movement, and have an electric motor
attached:
EXAMPLE
If the register contains 1 0 1 0 1 0 1 0 this means ‘motor B is ON
and motor C is ON and both are turning to produce forward
motion’. Effectively, the vacuum cleaner is moving forward.
EXAMPLE
ACTIVITY
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
1 0 0 1 0 1 1 0
EXAMPLE
Binary numbers are very useful in computer science, but they have
disadvantages: