Assume that our computer stores decimal numbers using 16 bits - 10 bits for a sign/magnitude mantissa and 6 bits for a sign/magnitude base-2 exponent. (The way we showed in class.) Show the internal representation of the following decimal quantities.
a. +7.5
b. -20.25
c. -1/64

Respuesta :

Explanation:

a) 7.5= 111.1×2°= 0.1111×2^3

which can also be written as

(1/2+1/4+1/8+1/16)×8

sign of mantissa:=0

Mantissa(9 bits): 111100000

sign of exponent: 0

Exponent(5 bits): 0011

the final for this is:011110000000011

b) -20.25= -10100.01×2^0= -0.1010001×2^5

sign of mantissa: 1

Mantissa(9 bits): 101000100

sign of exponent: 0

Exponent(5 bits): 00101

the final for this is:1101000100000101

c)-1/64= -.000001×2^0= -0.1×2^{-5}

sign of mantissa: 1

Mantissa(9 bits): 100000000

sign of exponent: 0

Exponent(5 bits): 00101

the final for this is:1100000000100101