working with 8-bit bytes and hexadecimal lesson objective: understand 8-bit bytes and hexadecimal ...

Post on 14-Jan-2016

235 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

First ... A summary of last lesson

1010 What is this in denary?

What is 9 in binary?

What is the time on this digital clock?

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

Bits and Bytes

0 1 0 0 0 0 0 11248163264128

Each place is called a BIT (Binary digIT)

8 Bits make oneBYTE

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

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

Question

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

Question

0 0 0 1

How many bits are there in this byte?

Answer = 4

Question

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

Answer = 1024

Converting between denary and binary

055650 5 5 6 51s10s100s1000s10000s

0 1 0 0 0 0 0 11248163264128

= 64 + 1 = 65

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

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

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

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

Complete the worksheets

Eight-bit bytes and decimal

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

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

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

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

Using hexadecimal digits

Making graphics with Hex

10

38

7C

FE

7C

38

10

00

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

top related