TASK
6-2. Represent
each of the following signed decimal numbers in the 2’s-complement system.
Use a total of eight bits including the
sign bit.
a. +32 = 0010 0000 = 32
1101 1111
1110 0000
= -32
b. -14 = 0000 1110
= 14
1111 0001
1111 0010
= -14
c. +63 = 0011 1111 = 63
1100 0000
1100 0001
= -63
d. -104= 0110 1000 = 104
1001 0111
1001 1000
= -104
e. +127 = 0111 1111 = 127
1000 0000
1000 0001
= -127
f. -127= 0111 1111 = 127
1000 0000
1000 0001
= -127
g. +89= 0101 1001 = 89
1010 0110
1010 0111
= -89
h. -55 = 0011 0111 = 55
1100
1000
1100
1001 = -55
i. -1= 0000 0001 = 1
1111 1110
1111 1111 = -1
j. -128 = Erorr
k. +169= erorr
l. 0 =
0000 0000 = 0
1111 1111
0000 0000 = 0
m. +84= 0101 0100 = 84
1010 1011
1010 1100
= -84
n. +3= 0000 0011 = 3
1111 1100
1111 1101
= -3
o. -3= 0000 0011 = 3
1111 1100
1111 1101
= -3
p. -190 =
Erorr
6-3. Each of
the following numbers represents a signed decimal number in the 2’s-complement
system. Determine the decimal value in each case. (Hint Use negation to convert
negative numbers to poritive.)
a. 01101
= 01101 = 13
10010
10011 = - 13
Negative numbers to positive
01100
01101 = + 13
b. 11101
=
11101 = 29
00010
00011 = - 29
Negative numbers to positive
11100
11101 = + 29
c. 0111 1011
= 0111 1011
= 123
1000 0100
1000
0101 =
- 123
Negative numbers to positive
0111
1010
0111
1011 =
+ 123
d. 1001 1001
= 1001 1001
= 153
0110
0110
0110 0111
= - 153
Negative numbers to positive
1001
1000
1001
1001 =
+ 153
e.
0111 1111
= 0111 1111 = 127
1000
0000
1000
0001 =
- 127
Negative numbers to positive
0111
1110
1111
1111 =
+ 127
f.
1000 0000
= 1000 0000 = 128
0111
1111
1000
0000 =
- 128
Negative numbers to positive
0111
1111
1000
0000 = + 128
g.
1111 1111
= 1111 1111 = 255
0000
0000
0000
0001 =
- 255
Negative numbers to positive
1111
1110
1111
1111 =
+ 255
h.
1000 0001
= 1000 0001
= 129
0111
1110
0111 1111 = - 129
Negative numbers to positive
1000
0000
1000
0001 =
+ 129
i.
0110 0011
= 0110 0011
= 99
1001
1100
1001
1101 =
- 99
Negative numbers to positive
0110
0010
0110
0011 =
+ 99
j.
1101 1001
= 1101 1001
= 217
0010
0110
0010
0111 =
- 217
Negative numbers to positive
1101
1000
1101
1001 =
+ 217
6-4 a. What
range of signed decimal can be representusing 12 bits including the sign bit ?
Answer :
Range of signed decimal represent
using 12 bits including the sign bit
1 0 0 0 0 0 0 0 0 0 0 0 = -212
= - 4096
6-4. b. How
many bits would be required to represent decimal numbers from -32.768
to +32.767 ?
= 1111 1111 1111 1111 = 32.768
0000 0000 0000 0000
0000 0000 0000 0001 = -
32.768
Negative numbers to positive
1111 1111 1111 1110
1111 1111 1111
1111 =
+ 32.768
= 0111 1111 1111 1111
= 32.767
1000 0000 0000 0000
1000 0000 0000 0001 = -
32.767
Negative numbers to positive
0111 1111 1111 1110
0111 1111 1111 1111 = +
32.767
SECTION 6-5
List in order all of
the signed numbers that can be represent in five bits using 2’s
complement !
Answer:
a.1 0 0 0 1 = -1
b.1 0 0 1 0 = -2
c.1 0 0 1 1 = -3
d.1 0 1 0 0 = -4
e.1 0 1 0 1 = -5
f.1 0 1 1 0 = -6
g.1 0 1 1 1 = -7
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
1011
0111 =
- 73
Negative numbers to positive
0100
1000
0100 1001 = + 73
b.
-12
= 0000 1100 = 12
1111
0011
1111
0100 =
- 12
Negative numbers to positive
0000
1011
0000
1100 =
+ 12
c.
+15
= 0000 1111 = 15
1111
0000
1111
0001 =
- 15
Negative numbers to positive
0000 1110
0000
1111 =
+ 15
d.
-1
= 0000 0001 = 1
1111
1110
1111
1111 =
- 1
Negative numbers to positive
0000
0000
0000
0001 =
+ 1
e.
-128
= 1000 0000 = 128
0111 1111
1000 0000
= -128
Negative numbers to positive
0111
1111
1000
0000 =
+ 128
f. +127
= 0111 1111 = 127
1000 0000
1000 0001
= -127
Negative numbers to positive
0111 1110
0111 1111 = +127
6-7 What is the range of the unsigned decimals values
that can be represent in 10 bits?
What is the range of signed decimals values using he same
number or bits ?
Answer :
a.
Range of the unsigned decimals in 10 bits = 0 to 1023
b.
Range of the signed decimals in 10 bits = -1024 to -1