hexadecimal and ascii lesson objective: understand the purpose of ascii and how to use it. lesson...
TRANSCRIPT
Hexadecimal and ASCII Lesson Objective:
Understand the purpose of ASCII and how to use it.
Lesson Outcome:Convert between Hexadecimal and ASCII
Convert Hexadecimal to Denary
Key words: 8 bit byte, decimal, hexadecimal
Bits and Bytes
0 1 0 0 0 0 0 11248163264128
Each place is called a BIT (Binary digIT)
8 Bits make oneBYTE
Question
0 1 0 0 0 0 0 1What is a BIT?
Question
0 0 0 1 0 0 0 1
How many bits are there in this byte?
Answer = 8
Question
0 1 0 0 0 0 0 1How many bytes are there in a kilobyte?
Answer = 1024
Converting from binary to decimal
0 0 1 11248
0 1 1 1
0 1 0 1
1 0 0 1
1 0 1 0
1 1 1 1
=3
=7
=5
=9
=10
=15
Converting between decimal and binary
0 1 0 0 0 1 1 11248163264128
= 64 + 4 + 2 + 1 = 71
0 0 0 1 0 1 1 01248163264128
= 16 + 4 + 2 = 18
Converting between decimal and binary
0 0 1 0 0 0 1 11248163264128
= 32 + 2 + 1 = 35
0 0 1 1 0 0 1 0 = 32 + 16 + 2 = 50
0 1 1 0 0 0 1 1 = 64 +32 +2 +1 = 99
Binary and Hex digits ...
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 1
1 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 1
= 0
= 1
= 2
= 3
= 4
= 5
= 6
= 7
= 8
= 9
= A
= B
= C
= D
= E
= F
Binary to hex conversion(For lazy people)
0 1 1 1 0 0 1 1
0 1 1 1 0 0 1 1
Assign a number to each of the nibbles ...
7 3
= 115
Written as:
7316
Or
73Hex
How is data stored?
A book stores data with ink and paper
A = 01000001
Book Vs Computer
A computer stores data as electronic 0’s and 1’s
Remember from a previous lesson … 8 bit byes, kilobytes ..etc.
Converting between decimal and binary
055650 5 5 6 51s10s100s1000s10000s
0 1 0 0 0 0 0 11248163264128
= 64 + 1 = 65
What are the following binary numbers in decimal?
0 1 0 0 0 0 1 11248163264128
0 1 0 0 1 1 1 0
= 67
= 78
12481248
What are the following binary numbers in Hexadecimal?
= 43Hex
= 4EHex
How are letters, numbers and symbols held in the computer?
A = 1, B = 2, C = 3 … etc? NO!
All characters are held in a universally recognised coded called:
ASCII
A = 65, B = 66, C =67 … a = 97, b=98
Say Ass-Key
ASCII ...
A
S
C
I
I
American
Standard
Code for
Information
Interchange
Worksheets!
Coverting Hex to Denary:
42Hex
=
116
24 = 4 x 16 + 2 x 1
2AHex
=
116
A2 = 2 x 16 + 10 x 1
= 32 + 10
= 42
= 64 + 2
= 66
Coverting Hex to Denary:
C5Hex
=
116
5C = 12 x 16 + 5 x 1
EAHex
=
116
AE = 14 x 16 + 10 x 1
= 224 + 10
= 234
= 192 + 5
= 197