Working with 8-bit bytes and hexadecimal Lesson Objective: Understand 8-bit bytes and Hexadecimal ...

22
Working with 8-bit bytes and hexadecimal Lesson Objective: Understand 8-bit bytes and Hexadecimal Lesson Outcome: Convert between 8 bit binary and decimal numbers, convert to/from hexadecimal. Key words: 8 bit byte, decimal, hexadecimal

Transcript of Working with 8-bit bytes and hexadecimal Lesson Objective: Understand 8-bit bytes and Hexadecimal ...

Page 1: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Working with 8-bit bytes and hexadecimal Lesson Objective:

Understand 8-bit bytes and Hexadecimal

Lesson Outcome:Convert between 8 bit binary and decimal numbers, convert to/from hexadecimal.

Key words: 8 bit byte, decimal, hexadecimal

Page 2: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

First ... A summary of last lesson

Page 3: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

1010 What is this in denary?

What is 9 in binary?

What is the time on this digital clock?

Page 4: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

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

Page 5: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Bits and Bytes

0 1 0 0 0 0 0 11248163264128

Each place is called a BIT (Binary digIT)

8 Bits make oneBYTE

Page 6: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Rounded off numbers in binary

Examples of ‘rounded off’ numbers in decimal:

101001000Rounded off numbers in Binary:

2 4 8 16 32 64 128 256 512 1024

Page 7: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Kilobyte, Megabytes, Gigabytes

8 bits = 1 byte

1024 Bytes in a Kilobyte

0 1 0 0 0 0 0 1

1024 Kilobytes in a Megabyte

1024 Megabytes in a Gigabyte

Page 8: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Question

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

Page 9: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Question

0 0 0 1

How many bits are there in this byte?

Answer = 4

Page 10: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Question

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

Answer = 1024

Page 11: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Converting between denary and binary

055650 5 5 6 51s10s100s1000s10000s

0 1 0 0 0 0 0 11248163264128

= 64 + 1 = 65

Page 12: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Converting from binary to denary

0 0 0 11248

0 0 1 1

0 1 0 1

1 0 0 1

1 0 1 0

0 1 1 1

=1

=3

=5

=9

=10

=7

Page 13: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Converting between denary and binary

0 1 0 0 0 1 0 11248163264128

= 64 + 4 + 1 = 69

0 0 0 1 0 0 1 01248163264128

= 16 + 2 = 18

Page 14: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Converting between denary and binary

0 0 1 0 0 0 1 01248163264128

= 64 + 4 + 1 = 69

0 0 0 1 0 0 1 0 = 16 + 2 = 18

0 0 1 0 0 0 1 1 = 32 + 2 + 1 = 35

Page 15: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

From Denary to Binary

0 0 0 1 0 0 1 01248163264128

18 =

21 = 0 0 0 1 0 1 0 1

71 = 0 1 0 0 0 1 1 1

Page 16: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Complete the worksheets

Eight-bit bytes and decimal

Page 17: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

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 18: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Another binary to hex conversion

0 0 1 1 0 0 1 1

0 0 1 1 0 0 1 1

Assign a number to each of the nibbles ...

3 3

= 51

Page 19: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

What are the following binary numbers in denary?

0 1 0 0 0 0 1 11248163264128

0 1 0 0 1 1 0 1

= 67

= 77

12481248

What are the following binary numbers in Hexadecimal?

= 43

= 4D

10 = A11 = B12 = C13 = D14 = E15 = F

Page 20: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

1 1 1 0 1 0 1 1

0 1 0 1 1 0 1 0

12481248

What are the following binary numbers in Hexadecimal?

= EB

= 5A

10 = A11 = B12 = C13 = D14 = E15 = F

Page 21: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Using hexadecimal digits

Page 22: Working with 8-bit bytes and hexadecimal  Lesson Objective: Understand 8-bit bytes and Hexadecimal  Lesson Outcome: Convert between 8 bit binary and.

Making graphics with Hex

10

38

7C

FE

7C

38

10

00

10 = A11 = B12 = C13 = D14 = E15 = F