Top Banner
BINARY NUMBERS
19

Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

Feb 11, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

BINARY NUMBERS

Page 2: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

COMPUTERS

Page 3: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

STRUCTURE(think place values)

27 26 25 24 23 22 21 20

Page 4: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(from binary to decimal)

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

0 1 1 1 0 1 0 1

Try a couple: 10101010bin = _________dec

001100112 = _________10

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 5: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(from decimal to binary)

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Try a couple: 5010 = ____________ 2147dec = ____________bin

=72

Page 6: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

PRACTICE

10010 = _____________2

110101BIN = _________DEC

1000DEC = _________________BIN

11011010102 = ___________10

Page 7: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

OCTAL

• OCTAL IS BASE 8

• REMEMBER, DECIMAL IS BASE 10 (DIGITS 0-9)

• BINARY IS BASE 2 (DIGITS 0,1)

• OCTAL USES 8 DIGITS: 0-7

• USED IN MEMORY REPRESENTATION BECAUSE EACH

OCTAL DIGIT CAN REPRESENT 3 BINARY DIGITS (23 = 8)

Page 8: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(octal to decimal)

• 126OCT

REMEMBER, THESE ARE POWERS OF 8

(6 * 80) + (2 * 81) + (1 * 82)

(6 * 1) + (2 * 8) + (1 * 64)

86DEC

• TRY 2 MORE:

321OCT = __________DEC

25368 = _________10

Page 9: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(decimal to octal)

SIMILAR PROCESS TO CONVERTING

DECIMAL TO BINARY, DIVIDE BY 8,

CHECKING THE REMAINDERS (THINK

ABOUT THE POSSIBLE DIGITS),

READING THE ANSWER DOWN:

254DEC =

• TRY A COUPLE:

732DEC = ___________OCT

95210 = ___________8

2548

31 R68

3 R78

0 R3

376oct

Page 10: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(octal to binary)

• SINCE EACH DIGIT REPRESENTS 3 BINARY, YOU

CAN USE A TABLE TO CONVERT:

• 572OCT

5 → 101 7 → 111 2 → 010

101111010BIN

Oct 0 1 2 3 4 5 6 7

Bin 000 001 010 011 100 101 110 111

Try a couple:1438 = __________2

651oct = __________bin

Page 11: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(binary to octal)

• GROUP BINARY NUMBERS INTO SETS OF 3

FROM THE RIGHT, USING THE CHART,

TRANSLATE EACH SET OF 3 INTO IT’S OCTAL

EQUIVALENT

10110110BIN

→ 010 110 110 → 266OCT

Oct 0 1 2 3 4 5 6 7

Bin 000 001 010 011 100 101 110 111

Try a couple:

1111100bin=_______oct

010101112=______8

Page 12: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

HEXADECIMAL NUMBERS

• REMEMBER THAT OCTAL WAS HELPFUL SINCE EACH DIGIT CAN REPRESENT 3

BITS.

• WOULDN’T IT BE HELPFUL IF WE COULD REPRESENT MORE THAN 3? MAYBE

4?

• IF 3 BITS NEEDS 8 DIGITS (23), THEN 4 BITS NEEDS ____ DIGITS (24).

• THEN, IT ONLY TAKES 2 OF THESE NEW SETS OF DIGITS (WE WILL CALL

THEM HEXADECIMAL FOR 16 DIGITS) TO CREATE AN ENTIRE BYTE (8 BITS)

• BUT, WE ONLY HAVE 10 STANDARD DIGITS (0-9), WHAT DO WE USE FOR

THE OTHER DIGITS?

• WHY, LETTERS, OF COURSE

• A = 10, B = 11, C = 12, D = 13, E = 14, F = 15

Page 13: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(hexadecimal to decimal)

• REMEMBER, NOW WE HAVE A BASE OF 16, SO WE WILL

USE POWERS OF 16

• EXAMPLE: 8B (B = 11)

(11 * 160) + (8 * 161)

(11 * 1) + (8 * 16)

11 + 128

139DEC

160 = 1

161 = 16

162 = 256

163 = 4096

Try a couple:

A5hex =___________dec

2CE16 = __________10

Page 14: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(decimal to hexadecimal)

• REMEMBER, WE ARE WORKING BACKWARDS AND OUR

BASE NOW IS 16

• EXAMPLE: 200DEC

20016

12 R816

0 R12

12, 8 = C8

Try a couple:

18410 = ___________16

1452dec = __________ hex

Page 15: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(hexadecimal to binary)

• AGAIN, WE NEED OUR TABLE:

• REPLACE EACH HEXADECIMAL NUMBER WITH ITS

BINARY EQUIVALENT:

• A6HEX = 1010 0110 BIN

• TRY A COUPLE:

• D2HEX = ________________BIN

• 5A3B16 = ________________2

Hex Bin

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

A 1010

B 1011

C 1100

D 1101

E 1110

F 1111

Page 16: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(binary to hexadecimal)

• AGAIN, WE NEED OUR TABLE:

• REPLACE EACH SET OF 4 BINARY NUMBERS

(STARTING FROM THE RIGHTMOST 4) WITH ITS

HEXADECIMAL EQUIVALENT:

• 1011 0100 BIN = B4HEX

• 0010 1110 BIN = 2EHEX

• TRY A COUPLE:

• 11100001BIN = __________________HEX

• 11101101101000012 =________________16

Hex Bin

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

A 1010

B 1011

C 1100

D 1101

E 1110

F 1111

Page 17: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(hexadecimal to octal)

• IT IS EASIEST TO CONVERT TO BINARY FIRST,

THEN TO OCTAL FROM THERE:

• EXAMPLE: B9HEX 1011 1001BIN

010 11 1 001BIN

2 7 1 OCT

• TRY A COUPLE

• D616 = _____________8

• EEHEX = ______________OCT

Hex Bin

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

A 1010

B 1011

C 1100

D 1101

E 1110

F 1111

Page 18: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

CONVERT(octal to hexadecimal)

• IT IS EASIEST TO CONVERT TO BINARY FIRST,

THEN TO HEXADECIMAL FROM THERE:

• EXAMPLE: 543OCT

101 100 011BIN

0001 0110 0011BIN

1 6 3 HEX

• TRY A COUPLE

• 243OCT = ______________HEX

• 57348 =_____________16

Hex Bin

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

A 1010

B 1011

C 1100

D 1101

E 1110

F 1111

Page 19: Binary Numbers - Weeblybraunpaliszewski.weebly.com/uploads/2/4/4/8/24486951/...CONVERT (decimal to octal) SIMILAR PROCESS TO CONVERTING DECIMAL TO BINARY, DIVIDE BY 8, CHECKING THE

PRACTICE(hw ns1)