Sie sind auf Seite 1von 10

6-2. Represent each of the following signed decimal numbers in the 2scomplement system.

Use a total of eight bits including the sign bit.


a. +32
= 0010 0000 = 32
1101 1111
1 +
1110 0000 = -32
b. -14
1 1 1 1 0 0 1 = 14
00001101
1 +
0 0 0 0 1 1 1 0 = +14

c. +63
= 0011 1111 = 63
1100 0000
1 +
1100 0001 = -63
d. -104

= 0110 1000 = 104


1001 0111
1 +
1001 1000 = -104

e. +127
= 0111 1111 = 127
1000 0000
1 +
1000 0001 = -127
f. -127
= 1 0 0 0 0 0 0 1 = 127
01111110
1 +
0 1 1 1 1 1 1 1 = +127

g. +89
= 0101 1001 = 89
1010 0110
1 +
1010 0111 = -89
h. -55

= 1 1 0 0 1 0 0 1 = 55
00110110
1 +
0 0 1 1 0 1 1 1 = +55

i. -1
=11111111= 1
00000000
1 +
0 0 0 0 0 0 0 1 = +1
j. -128
= 1 0 0 0 0 0 0 0 = 128
01111111
1 +
1 0 0 0 0 0 0 0 = +128
k. +169
= 1010 1001 = 169
0101 0110
1 +
0101 0111 = -169
l. 0
=00000000=

11111111
1 +
100000000 =0

m. +84
= 0101 0100 = 84
1010 1011
1 +
1010 1100 = -84
n. +3
= 0000 0011 = 3
1111 1100
1 +
1111 1101 = -3
o. -3
= 0000 0011 = 3
0000 0010
1 +
1111 0011 = +3
p. -190
= 1011 1110 = 19

6-3. Each of the following numbers represents a signed decimal number


in the 2s-complement system. Determine the decimal value in each
case. (Hint Use negation to convert negative numbers to poritive.)
Answer :

6-4. a. what range of signed decimal values can be respected using12


bits in cluding the sign bit ?
b. How many bits would be required to represent decimal numbers
from -32.768 to +32.767 ?
Answer :

6-5. list in order all of the signed number that can be rerspected in five
bits using the 2s complement system.
10000

10100

11000

11100

10001

10101

11001

11101

10010

10110

11010

11110

10011

10111

10011

11111

6-6. Represent each of the following decimal values as an -8 bit signed


binary value. Then negate each one.
a. +73
= 0100 1001 = 73
1011 0110
1 +
1011 0111 = - 73
Negative numbers to positive
0100 1000
1 +
0100 1001 = + 73
b. -12
= 0000 1100 = 12
1111 0011
1 +
1111 0100 = - 12
Negative numbers to positive

0000 1011
1 +
0000 1100 = + 12
c. +15
= 0000 1111 = 15
1111 0000
1 +
1111 0001 = - 15
Negative numbers to positive
0000 1110
1 +
0000 1111 = + 15
d. -1
= 0000 0001 = 1
1111 1110
1 +
1111 1111 = - 1
Negative numbers to positive
0000 0000
1 +
0000 0001 = + 1
e. -128
= 1000 0000 = 128

0111 1111
1 +
1000 0000 = -128
Negative numbers to positive
0111 1111
1 +
1000 0000 = + 128
f. +127
= 0111 1111 = 127
1000 0000
1 +
1000 0001 = -127
Negative numbers to positive
0111 1110
1 +
0111 1111 = +127
6 -7 what is range of unsigned decimal values that can be respresented in
10 bits? What is the range of signed decimal values using the same
number of bits?
Answer :
0 to 1023 (unsigned)
-1024 to -1 (signed)
BY : SEPTRIANING TYAS (TK-2A)

\\\

Das könnte Ihnen auch gefallen