binary number binary, octal, decimal, hexadecimal...

21
Binary Number Count Range Binary, Octal, Decimal, Hexadecimal Conversion Fraction Signed Binary Number Binary Add/Subtract

Upload: others

Post on 26-Sep-2020

31 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

● Binary Number

Count

Range

● Binary, Octal, Decimal, Hexadecimal

Conversion

● Fraction

● Signed Binary Number

● Binary Add/Subtract

Page 2: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

%

Hexadecimal

$

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

Binary Number

Count

Page 3: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

%

Hexadecimal

$

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

% 1 1 0 1 = 13

Page 4: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

%

Hexadecimal

$

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

% 1 1 0 1 = 13 = $D

Page 5: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

%

Hexadecimal

$

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

Binary Number

Range

Page 6: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Binary, Octal, Decimal, Hexadecimal

Conversion

Page 7: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3
Page 8: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

Signed

Magnitude

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 0 1000

- 1 1001

- 2 1010

- 3 1011

- 4 1100

- 5 1101

- 6 1110

- 7 1111

Signed Binary Number

Page 9: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

Signed

Magnitude

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 0 1000

- 1 1001

- 2 1010

- 3 1011

- 4 1100

- 5 1101

- 6 1110

- 7 1111

Decimal Binary

One’s

complement

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 0 1111

- 1 1110

- 2 1101

- 3 1100

- 4 1011

- 5 1010

- 6 1001

- 7 1000

Page 10: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

Two’s

compliment

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 1 1111

- 2 1110

- 3 1101

- 4 1100

- 5 1011

- 6 1010

- 7 1001

- 8 1000

Decimal Binary

Signed

Magnitude

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 0 1000

- 1 1001

- 2 1010

- 3 1011

- 4 1100

- 5 1101

- 6 1110

- 7 1111

Decimal Binary

One’s

complement

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 0 1111

- 1 1110

- 2 1101

- 3 1100

- 4 1011

- 5 1010

- 6 1001

- 7 1000

Page 11: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

Two’s

compliment

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 1 1111

- 2 1110

- 3 1101

- 4 1100

- 5 1011

- 6 1010

- 7 1001

- 8 1000

% 1 0 1 1 = ?

Page 12: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Decimal Binary

Two’s

compliment

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

- 1 1111

- 2 1110

- 3 1101

- 4 1100

- 5 1011

- 6 1010

- 7 1001

- 8 1000

Range

Page 13: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3
Page 14: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Binary Number

Sign Number

Add

Subtract

Page 15: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Convert the following decimal numbers into

8-bit 2’s complement numbers and perform the

additions/subtractions indicated.

(+ 70)

+ (+ 60)

C=

V=

Sum Correct? Y/N

(+ 60)

+ ( - 70)

C=

V=

Sum Correct? Y/N

Page 16: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

+70 =

+60 =

Page 17: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

+70 = 0100 0110

-70 = 1011 1010

+60 = 0011 1100

-60 = 1100 0100

Page 18: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Convert the following decimal numbers into

8-bit 2’s complement numbers and perform the

additions/subtractions indicated.

(+ 70)

+ (+ 60)

C=

V=

Sum Correct? Y/N

(+ 60)

+ ( - 70)

C=

V=

Sum Correct? Y/N

Page 19: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3
Page 20: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3

Convert the following decimal numbers into

8-bit 2’s complement numbers and perform the

additions/subtractions indicated.

(- 60)

- (- 70)

C=

V=

Sum Correct? Y/N

(+ 70)

- ( - 60)

C=

V=

Sum Correct? Y/N

Page 21: Binary Number Binary, Octal, Decimal, Hexadecimal Conversionkxc104/class/cmpen472/17s/lec/L03BinaryNumAdd… · Decimal Binary % Hexadecimal $ 0 0000 0 1 0001 1 2 0010 2 3 0011 3