0% found this document useful (0 votes)
18 views

Lesson 2 Hexadecimal, and ASCII

Is less than Focuses on I number of representations and how data are actually represented in computing

Uploaded by

peterjones.mdx
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Lesson 2 Hexadecimal, and ASCII

Is less than Focuses on I number of representations and how data are actually represented in computing

Uploaded by

peterjones.mdx
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Learning Aim:

To understand the fundamentals of data


representation in networking using binary,
hexadecimal, and ASCII, and how these formats are
essential for digital communication systems.
Learning Aim:
To understand the fundamentals of data
representation in networking using binary,
hexadecimal, and ASCII, and how these formats are
essential for digital communication systems.
Learning Objectives:
1. Understand and explain the principles of binary,
hexadecimal, and ASCII.
2. Recognise the significance of binary and
hexadecimal in computing and networking.
3. Apply knowledge of ASCII in encoding text data for
communication across networks.
4. Analyse and solve basic conversion problems
between binary, hexadecimal, and ASCII.
Denary
The denary number system (also known as decimal)
uses 10 symbols (0-9) to represent numbers. It is a
base-10 number system.

Humans use it because we have 10 fingers.


Binary
Computers don’t have
fingers, they have
circuits. These circuits can
be in one of two states,
on or off. So they use a
base-2 number system.

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.

Most computers store bits of data in memory in groups


of eight. Eight bits stored at one location is called a
byte. Sometimes it is useful to work on just half a byte.
Half a byte is called a nibble.

0 1 0 1 0 1 0 1

bit bit bit bit bit bit bit bit

nibble nibble

byte
Counting in Binary
We need 8 volunteers to sit at the front in row facing
the class.

Each place in a binary number has a value. These go


up in multiples of 2.

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.

Who needs to stand up?

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.

Who needs to sit down?

Who needs to stand up?

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:

Binary 128 64 32 16 8 4 2 1 Denary


a. 00111
b. 1100111
c. 100001
d. 10000001
e. 10001
f. 010101
g. 1110000
h. 10101010
i. 100011
j. 100
k. 11101011
l. 00010111
m. 11011011
n. 00100101
o. 11011110
p. 11111111
Activity 8
Play Binary Bingo using the Python code to generate the bingo numbers:
Activity 9 – Denary to Binary
Complete these denary to binary conversions:

Denary 128 64 32 16 8 4 2 1 Binary


a. 56
b. 180
c. 34
d. 20
e. 201
f. 95
g. 63
h. 32
i. 96
j. 245
k. 17
l. 171
m. 197
n. 63
o. 127
p. 255
Activity 10
Try the Binary Tetris game:
Hexadecimal
Programmers often use hexadecimal numbers as a
shorthand for binary to save time. Hexadecimal (hex)
numbers are based on the number 16. Each column has
a value 16 times that of the one on its right.

place value 256 16 1

There are 16 different values available in hex:

0 1 2 3 4 5 6 7 8 9 A B C D E F

Letters are used for values


10-15 to ensure that only
single digits are used.
Activity 9
Question Answer

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.

In this example we will convert DB hex to binary.

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.

1101 1111 1001 0001 0011 1010

1110 1100 1011 0101 0111 1111


ASCII
Computers have to be able to represent letters and symbols
as well as numbers. Basically, the idea is to give each
character a number as a code and store the codes and their
meanings in a table.
A common code is ASCII - the
Symbol Binary
American Standard Code for
Information Interchange. A 0100 0001
This uses seven bits to store B 0100 0010
characters. Seven bits is enough to
code 128 different characters. C 0100 0011

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:

ASCII binary code Character

0110 1000

0110 0101

0110 1100

0110 1100

0110 1111
Activity 2
Use the table of ASCII binary codes to decode this:

Character ASCII binary code


S

s
Activity 3
Question Answer

The ASCII code for


a blank space is:

It is important to
have a code for a
blank space
because?

Write your name in


ASCII.
Learning Aim:
To understand the fundamentals of data
representation in networking using binary,
hexadecimal, and ASCII, and how these formats are
essential for digital communication systems.
Learning Objectives:
1. Understand and explain the principles of binary,
hexadecimal, and ASCII.
2. Recognise the significance of binary and
hexadecimal in computing and networking.
3. Apply knowledge of ASCII in encoding text data for
communication across networks.
4. Analyse and solve basic conversion problems
between binary, hexadecimal, and ASCII.
Summary:
This lesson covered binary, hexadecimal, and ASCII as
essential methods of data representation in digital
communication systems. Students learned the
importance of binary and hexadecimal in computing
and networking, along with the role of ASCII in text
encoding. Key takeaways include understanding the
conversions between these formats and their
applications in modern networking.

You might also like