In: Computer Science
Using the three-bit exponent field and four-bit significand, what is the bit pattern for the -2.5? (show work)

11000100
Explanation:
-------------
-2.5
Converting 2.5 to binary
Convert decimal part first, then the fractional part
> First convert 2 to binary
Divide 2 successively by 2 until the quotient is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10
So, 2 of decimal is 10 in binary
> Now, Convert 0.50000000 to binary
> Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result
> This is equal to 1, so, stop calculating
0.5 of decimal is .1 in binary
so, 2.5 in binary is 00000010.1
-2.5 in simple binary => 10.1
so, -2.5 in normal binary is 10.1 => 1.01 * 2^1
8-bit format:
--------------------
sign bit is 1(-ve)
exponent bits are (3+1=4) => 100
Divide 4 successively by 2 until the quotient is 0
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 100
So, 4 of decimal is 100 in binary
frac/significant bits are 0100
so, -2.5 in 8-bit format is 1 100 0100