Lesson 2 Hexadecimal, and ASCII
Lesson 2 Hexadecimal, and ASCII
On = 1
Off = 0
Transistors
Transistors are switches
that are used in digital
circuits, in their off state
they represent a 0 and in
their on state they
represent a 1. Computers
use combinations of
millions or even billions of
transistors to carry out
instructions.
Activity 6
Use internet research to help you complete this table:
Question Answer
Why do computers
use binary?
What are
transistors and
how are they used
in digital circuits?
Binary
Each digit in binary is called a bit.
0 1 0 1 0 1 0 1
nibble nibble
byte
Counting in Binary
We need 8 volunteers to sit at the front in row facing
the class.
12 64 32 16 8 4 2 1
8
Sitting = 0 Standing = 1
Counting in Binary
This is how we represent the number 1 in binary.
12 64 32 16 8 4 2 1
8
0 0 0 0 0 0
Counting in Binary
This is how we represent the number 2 in binary.
12 64 32 16 8 4 2 1
8
0 0 0 0 0 0
Counting in Binary
How do we represent these numbers in binary:
65 92 21 129 254
255 58 5 17 72
63 7 167 150 256
12 64 32 16 8 4 2 1
8
Denary to Binary
65
Start by writing out the place values.
0 12
8 1
64 32
0 0 0
16 8 4 2
0 1
0 1
Then write 1s underneath the place values that add up
to the denary number.
As a class convert these numbers from denary to
binary:
a. 3 b. 46 c. 76
Binary to Denary
Start by writing the place values above each bit.
12 64 32 16 8 4 2 1
0 1 0 1 0 0
8
0 1
Then write out the place values of the 1s.
64 16
+ 1+ =
81
Finally add the numbers together.
As a class convert these numbers from binary to
denary:
a. 01110010 b. 01011010 c. 10100011
Activity 7 – Binary to Denary
Complete these binary to denary conversions:
0 1 2 3 4 5 6 7 8 9 A B C D E F
Explain why
hexadecimal
notation is used.
Which characters
are used to
represent numbers
in hexadecimal?
Hexadecimal to Binary
Converting between hexadecimal and binary is particularly
easy. You just take each character and convert it into the
equivalent binary number.
Hex D B
Denar
13 11
y
Binar
1 1 0 1 1 0 1 1
y
Questions:
1. Convert 2D to binary.
2. Convert EF to binary.
Activity 10
Use internet research to help you complete this table:
Question Answer
Explain how to
convert
hexadecimal
numbers to binary.
Convert these hexadecimal numbers to binary.
4 B 3 3 7 E
1 1 3 A A D
Binary to Hexadecimal
You convert between binary and hexadecimal by doing the
reverse. You just take each group of four binary digits,
starting from the right and convert it into the equivalent hex
number.
In this example we will convert 11110011 to hexadecimal:
Binar
1 1 1 1 0 0 1 1
y
Hex F 3
Questions:
1. Convert 00110111 to hex.
2. Convert 10100101 to hex.
Activity 11
Convert these hexadecimal numbers to binary.
D 0100 0100
Question:
What is the ASCII code for C? E 0100 0101
F 0100 0110
ASCII Table
Activity 1
Use the table of ASCII binary codes to decode this:
0110 1000
0110 0101
0110 1100
0110 1100
0110 1111
Activity 2
Use the table of ASCII binary codes to decode this:
s
Activity 3
Question Answer
It is important to
have a code for a
blank space
because?