18
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

Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Embed Size (px)

Citation preview

Page 1: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 2: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Bits and Bytes

0 1 0 0 0 0 0 11248163264128

Each place is called a BIT (Binary digIT)

8 Bits make oneBYTE

Page 3: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Question

0 1 0 0 0 0 0 1What is a BIT?

Page 4: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Question

0 0 0 1 0 0 0 1

How many bits are there in this byte?

Answer = 8

Page 5: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Question

0 1 0 0 0 0 0 1How many bytes are there in a kilobyte?

Answer = 1024

Page 6: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 7: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 8: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 9: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 10: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 11: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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.

Page 12: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Converting between decimal and binary

055650 5 5 6 51s10s100s1000s10000s

0 1 0 0 0 0 0 11248163264128

= 64 + 1 = 65

Page 13: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 14: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 15: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

ASCII ...

A

S

C

I

I

American

Standard

Code for

Information

Interchange

Page 16: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

Worksheets!

Page 17: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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

Page 18: Hexadecimal and ASCII  Lesson Objective: Understand the purpose of ASCII and how to use it.  Lesson Outcome: Convert between Hexadecimal and ASCII Convert

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