A given microprocessor has words for 1 byte What is the smal
A given microprocessor has words for 1 byte. What is the smallest and largest integer that can be represented in the following representations:
a. unsigned
b. Sign-mag
c. Ones complement
d. twos complement
e. unsigned packed decimal
f. signed packed decimal
Solution
a) unsigned- largest integer=11111111(255)
smallest integer-00000000(0)
b) signed magntiude:-largest integer=01111111(127)
smallest integer=11111111(-127)
c)Due to flip bits and add one here is no minus zero
+(27-1)= +127(128 numbers from +0 to +127)
-(27) = -128(128 numbers from -1 to -128-- we sart at -1 no -0)
d) Two\'s complement: largest = 01111111(+127)
smallest = 10000000(128)
e) unsigned packed decimal:-
largest :9=00001001
smallest:0=00000000
f) signed packed decimal:- In signed packed decimal letter C and D are used to represent positive and negative
C(1100) represent positive and D(1101) represent negative
Largest: 9=10011100
smallest: -9=10011101
