Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Two numbers, A and B, are stored in one byte floating point notation using th

ID: 3915135 • Letter: 1

Question

1. Two numbers, A and B, are stored in one byte floating point notation using the least significant (rightmost) 3 bits for the exponent. Both parts of each number are in 2's complement. If the A and B are 00110111 and 11011000, then A+B in the same notation as the operands is (select all correct answers)

a)10000010

b)Any of the numerical answers

c)11110000

d)None of the numerical answers

e)11100111

f)11000110

2.The value 1 is stored in a 1 byte signed (2's complement) integer. The bits are shifted 7 places to the left. What is the resultant value (in decimal)?

3.Two numbers, A and B, are stored in one byte floating point notation using the least significant (rightmost) 3 bits for the exponent. Both parts of each number are in 2's complement. If the A and B are 01000111 and 11101000, then A+B in the same notation as the operands is (Give all 8 bits): __________

Explanation / Answer

    'd' and 'b' in subscript stands for decimal and binary.

    In case you are unaware of 2's complement method, please visit the following link :
    https://en.wikipedia.org/wiki/Two%27s_complement

   In case you are unaware of Characteristic and mantissa method, please visit the following link :
   http://cstl-csm.semo.edu/xzhang/Class%20Folder/CS280/Workbook_HTML/FLOATING_tut.htm



Answer 1 :

    00110b = 5d (using 5-bit 2's complement)
    111b = -1d (using 3-bit 2's complement) , therefore
    00110111 is 3 when converted to decimal. ( [ 21 + 22 ] * 2-1 , using the formula -> Characteristic * 2mantissa )
    11011000 is -5 when converted to decimal. ( [-24+ 20 + 21 + 23 ] * 20 )
    So A + B = -2 in decimal.

    So, the answer is c), e), f) ; as they evaluate to -2.

Answer 2 :
    1d = 00000001b
     shifting 7 places to left, the number becomes : 10000000b
      This binary number evaluates to -128 (-27)

Answer 3 :
    
As explained in part 1,
    01000111 is 4 when converted to decimal. ( [ 23 ] * 2-1 , using the formula -> Characteristic * 2mantissa )
    11101000 is -3 when converted to decimal. ( [-24 + 20 + 22 + 23 ] * 20 )
    So A + B = 1 in decimal.