binary numbers

68
BINARY NUMBERS Making sense out of 0’s and 1’s

Upload: dmendonsa

Post on 16-Apr-2017

42 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Binary numbers

BINARY NUMBERSMaking sense out of 0’s and 1’s

Page 2: Binary numbers

Numbers4710

XXXXVII

XLVII

529

Page 3: Binary numbers

Decimal Numbering System

Page 4: Binary numbers

Decimal Numbering System

• Based on 10

Page 5: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

Page 6: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

Page 7: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

• Place-Value Based System

Page 8: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

• Place-Value Based System

• Value of symbol depends partially on place in number

Page 9: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

Page 10: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

• Place values increase by a factor of 10 as you move to left Place values decrease by a factor of 10 as you move to right Place values are 10 raised to power

Page 11: Binary numbers

Decimal Numbering System

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

• Place values increase by a factor of 10 as you move to left Place values decrease by a factor of 10 as you move to right Place values are 10 raised to power

• Value of a number is the weighted sum of the digits where each digit is multiplied by its place value before being added to the sum

Page 12: Binary numbers

Binary Numbering System

Page 13: Binary numbers

Binary Numbering System• Based on 2

Page 14: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

Page 15: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

Page 16: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

• Place-Value Based System

Page 17: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

• Place-Value Based System

• Value of symbol depends partially on place in number

Page 18: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

Page 19: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

• Place values increase by a factor of 2 as you move to left Place values decrease by a factor of 2 as you move to right Place values are 2 raised to power

Page 20: Binary numbers

Binary Numbering System• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

• Place values increase by a factor of 2 as you move to left Place values decrease by a factor of 2 as you move to right Place values are 2 raised to power

• Value of a number is the weighted sum of the digits where each digit is multiplied by its place value before being added to the sum

Page 21: Binary numbers

Comparison:Decimal vs Binary

• Based on 10

• Uses 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

• Largest symbol has value 1 less than 10 (9)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

• Place values increase by a factor of 10 as you move to left

Place values decrease by a factor of 10 as you move to right Place values are 10 raised to power

• Value of a number is the weighted sum of the digits where

each digit is multiplied by its place value before being added to the sum

• Based on 2

• Uses 2 symbols (0, 1)

• Largest symbol has value 1 less than 2 (1)

• Place-Value Based System

• Value of symbol depends partially on place in number

• Place values start with 1

• Place values increase by a factor of 2 as you move to left

Place values decrease by a factor of 2 as you move to right Place values are 2 raised to power

• Value of a number is the weighted sum of the digits where

each digit is multiplied by its place value before being added to the sum

Page 22: Binary numbers

Base 10 (Decimal) Example

1239

1 2 3 9103 102 101 1001000 100 10 1

9 x 1 = 93 x 10 = 302 x 100 = 2001 x 1000 = 1000----------------------Total = 1239

Page 23: Binary numbers

Base 2 (Binary) Example

10011010111

1 0 0 1 1 0 1 0 1 1 1 210 29 28 27 26 25 24 23 22

21 20 1024 512 256 128 64 32 16 8 4 2 1

1 x 1 = 11 x 2 = 21 x 4 = 40 x 8 = 01 x 16 = 160 x 32 = 01 x 64 = 641 x 128 = 1280 x 256 = 00 x 512 = 01 x 1024= 1024----------------------Total = 1239

Page 24: Binary numbers

Base 2 (Binary) Example

10011010111

1 0 0 1 1 0 1 0 1 1 1 210 29 28 27 26 25 24 23 22

21 20 1024 512 256 128 64 32 16 8 4 2 1

1 x 1 = 11 x 2 = 21 x 4 = 41 x 16 = 161 x 64 = 641 x 128 = 1281 x 1024= 1024----------------------Total = 1239

We find the value of the number by simply adding all the place values that contain 1’s

Page 25: Binary numbers

Example Problem

What is the value of the Binary number 1 0 1 1 0 0 1 ?

Remember: Place values start at the right at 1 and double as you move to the left!

Place values: 64 32 16 8 4 2 1

Page 26: Binary numbers

Example Problem

What is the value of the Binary number 1 0 1 1 0 0 1 ?

Place values : 64 32 16 8 4 2 1

Answer: 64 + 16 + 8 + 1 => 89

Page 27: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

Page 28: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

Page 29: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0128 64 32 16 8 4 2 1

Page 30: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

128 64 32 16 8 4 2 1

Page 31: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13 = 8 + 4 + 1

128 64 32 16 8 4 2 1

Page 32: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 8 + 4 + 1

128 64 32 16 8 4 2 1

Page 33: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 8 + 4 + 1

= 16 + 1

128 64 32 16 8 4 2 1

Page 34: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 8 + 4 + 1

= 16 + 1

128 64 32 16 8 4 2 1

Page 35: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

128 64 32 16 8 4 2 1

Page 36: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1= 32 -1

128 64 32 16 8 4 2 1

Page 37: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1= 32 -1

128 64 32 16 8 4 2 1

Page 38: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 32 -1

128 64 32 16 8 4 2 1

Page 39: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 32 -1

= 31 – 8

128 64 32 16 8 4 2 1

Page 40: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 32 -1

= 31 – 8

128 64 32 16 8 4 2 1

Page 41: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 16 + 8 + 4 + 1

= 32 -1

= 31 – 8

128 64 32 16 8 4 2 1

Page 42: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 16 + 8 + 4 + 1

= 32 -1

= 31 – 8

= 31 – 2

128 64 32 16 8 4 2 1

Page 43: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 198

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 16 + 8 + 4 + 1

= 32 -1

= 31 – 8

= 31 – 2

128 64 32 16 8 4 2 1

Page 44: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 198

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 16 + 8 + 4 + 1

= 128 + 64 + 4 + 2

= 32 -1

= 31 – 8

= 31 – 2

128 64 32 16 8 4 2 1

Page 45: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 198

= 170

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 16 + 8 + 4 + 1

= 128 + 64 + 4 + 2

= 32 -1

= 31 – 8

= 31 – 2

128 64 32 16 8 4 2 1

Page 46: Binary numbers

Problems: Binary to Decimal

1 1 0 1

1 0 0 0 1

1 1 1 1 1

1 0 1 1 1

1 1 1 0 1

1 1 0 0 0 1 1 0

1 0 1 0 1 0 1 0

= 13

= 17

= 31

= 23

= 29

= 198

= 170

= 8 + 4 + 1

= 16 + 1

= 16 + 8 + 4 + 2 + 1

= 16 + 4 + 2 + 1

= 16 + 8 + 4 + 1

= 128 + 64 + 4 + 2

= 128 + 32 + 8 + 2

= 32 -1

= 31 – 8

= 31 – 2

128 64 32 16 8 4 2 1

Page 47: Binary numbers

Decimal to Binary

The binary representation of a number is the collection of powers of two that add up to the number we want to represent.

The key will be to discover what powers of two will add up to the target Base 10 number.

Page 48: Binary numbers

Example

What is the binary representation of 27?(What powers of 2 will add up to 27?)

We can find these by subtracting different powers of two (no more than once)until we reach zero.

These Powers of two must then be the ones we need to represent the numberin binary.

Start with highest that is less than or equal to the present value and work ourway down to zero.

Page 49: Binary numbers

Example

What is the binary representation of 27?(What powers of 2 will add up to 27?)

Start with highest that is less than or equal to the present value and work ourway down to zero.

The highest power that is less than or equal to 27 is 16:27 – 16 = 11

Repeat for 1111 – 8 = 3

Repeat for 33 – 2 = 1

Repeat for 11 – 1 = 0

Fill in the remaining places with 0 0

Answer: 2710 = 110112

The binary number must have a 1 in the following positions:16, 8, 2 and 1:

1 1 1 1--- --- --- --- ---16 8 4 2 1

Page 50: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

Page 51: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

Page 52: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0 = 101

Page 53: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 101

Page 54: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 101

= 10010

Page 55: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 101

= 10010

Page 56: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 101

= 10010

= 11001

Page 57: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 101

= 10010

= 11001

Page 58: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

Page 59: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 101

= 10010

= 11001

= 110101

Page 60: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

Page 61: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

Page 62: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

Page 63: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 143-128 = 15-8 = 7-4 = 3-2 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

Page 64: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 143-128 = 15-8 = 7-4 = 3-2 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

= 10001111

Page 65: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 143-128 = 15-8 = 7-4 = 3-2 = 1-1 = 0

= 179-128 = 51-32 = 19-16 = 3-2 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

= 10001111

Page 66: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 143-128 = 15-8 = 7-4 = 3-2 = 1-1 = 0

= 179-128 = 51-32 = 19-16 = 3-2 = 1-1 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

= 10001111

= 10110011

Page 67: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 143-128 = 15-8 = 7-4 = 3-2 = 1-1 = 0

= 179-128 = 51-32 = 19-16 = 3-2 = 1-1 = 0

= 220-128 = 92-64 = 28-16 = 12-8 = 4-4 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

= 10001111

= 10110011

Page 68: Binary numbers

Decimal to Binary: Problems

5

18

25

53

78

113

143

179

220

= 5-4 = 1-1 = 0

= 18-16 = 2-2 = 0

= 25-16 = 9-8 = 1-1 = 0

= 53-32 = 21-16 = 5-4 = 1-1 = 0

= 78-64 = 12-8 = 4-4 = 0

= 113-64 = 49-32 = 17-16 = 1-1 = 0

= 143-128 = 15-8 = 7-4 = 3-2 = 1-1 = 0

= 179-128 = 51-32 = 19-16 = 3-2 = 1-1 = 0

= 220-128 = 92-64 = 28-16 = 12-8 = 4-4 = 0

= 101

= 10010

= 11001

= 110101

= 1001100

= 1110001

= 10001111

= 10110011

= 11011100