Question

Show your work. For 8-bit numbers, use 1 sign bit, 3 exponent bits, 4 mantissa bits:...

Show your work.
For 8-bit numbers, use 1 sign bit, 3 exponent bits, 4 mantissa bits:
1.)Convert 11.0 to 8-bit floating point format
2.)Convert -12.40625 to 8-bit floating point format

For 32-bit numbers, use 1 sign bit, 8 exponent bits, 23 mantissa bits:
3.)Convert 119.59375 to 32-bit floating point format
4.)Convert -67.1015625 to 32-bit floating point format

0 0
Add a comment Improve this question Transcribed image text
Answer #1
1)
11.0
Converting 11.0 to binary
   Convert decimal part first, then the fractional part
   > First convert 11 to binary
   Divide 11 successively by 2 until the quotient is 0
      > 11/2 = 5, remainder is 1
      > 5/2 = 2, remainder is 1
      > 2/2 = 1, remainder is 0
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 1011
   So, 11 of decimal is 1011 in binary
   > Now, Convert 0.00000000 to binary
      > Multiply 0.00000000 with 2.  Since 0.00000000 is < 1. then add 0 to result
      > This is equal to 1, so, stop calculating
   0.0 of decimal is .0 in binary
   so, 11.0 in binary is 1011.0
11.0 in simple binary => 1011.0
so, 11.0 in normal binary is 1011.0 => 1.011 * 2^3

8-bit format:
--------------------
sign bit is 0(+ve)
exponent bits are (3+3=6) => 110
   Divide 6 successively by 2 until the quotient is 0
      > 6/2 = 3, remainder is 0
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 110
   So, 6 of decimal is 110 in binary
frac/significant bits are 0110

so, 11.0 in 8-bit format is 0 110 0110

2)
-12.40625
Converting 12.40625 to binary
   Convert decimal part first, then the fractional part
   > First convert 12 to binary
   Divide 12 successively by 2 until the quotient is 0
      > 12/2 = 6, remainder is 0
      > 6/2 = 3, remainder is 0
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 1100
   So, 12 of decimal is 1100 in binary
   > Now, Convert 0.40625000 to binary
      > Multiply 0.40625000 with 2.  Since 0.81250000 is < 1. then add 0 to result
      > Multiply 0.81250000 with 2.  Since 1.62500000 is >= 1. then add 1 to result
      > Multiply 0.62500000 with 2.  Since 1.25000000 is >= 1. then add 1 to result
      > Multiply 0.25000000 with 2.  Since 0.50000000 is < 1. then add 0 to result
      > Multiply 0.50000000 with 2.  Since 1.00000000 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.40625 of decimal is .01101 in binary
   so, 12.40625 in binary is 1100.01101
-12.40625 in simple binary => 1100.01101
so, -12.40625 in normal binary is 1100.01101 => 1.1 * 2^3

8-bit format:
--------------------
sign bit is 1(-ve)
exponent bits are (3+3=6) => 110
   Divide 6 successively by 2 until the quotient is 0
      > 6/2 = 3, remainder is 0
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 110
   So, 6 of decimal is 110 in binary
frac/significant bits are 1000

so, -12.40625 in 8-bit format is 1 110 1000

3)
119.59375
Converting 119.59375 to binary
   Convert decimal part first, then the fractional part
   > First convert 119 to binary
   Divide 119 successively by 2 until the quotient is 0
      > 119/2 = 59, remainder is 1
      > 59/2 = 29, remainder is 1
      > 29/2 = 14, remainder is 1
      > 14/2 = 7, remainder is 0
      > 7/2 = 3, remainder is 1
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 1110111
   So, 119 of decimal is 1110111 in binary
   > Now, Convert 0.59375000 to binary
      > Multiply 0.59375000 with 2.  Since 1.18750000 is >= 1. then add 1 to result
      > Multiply 0.18750000 with 2.  Since 0.37500000 is < 1. then add 0 to result
      > Multiply 0.37500000 with 2.  Since 0.75000000 is < 1. then add 0 to result
      > Multiply 0.75000000 with 2.  Since 1.50000000 is >= 1. then add 1 to result
      > Multiply 0.50000000 with 2.  Since 1.00000000 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.59375 of decimal is .10011 in binary
   so, 119.59375 in binary is 1110111.10011
119.59375 in simple binary => 1110111.10011
so, 119.59375 in normal binary is 1110111.10011 => 1.11011110011 * 2^6

single precision:
--------------------
sign bit is 0(+ve)
exponent bits are (127+6=133) => 10000101
   Divide 133 successively by 2 until the quotient is 0
      > 133/2 = 66, remainder is 1
      > 66/2 = 33, remainder is 0
      > 33/2 = 16, remainder is 1
      > 16/2 = 8, remainder is 0
      > 8/2 = 4, remainder 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 10000101
   So, 133 of decimal is 10000101 in binary
frac/significant bits are 11011110011000000000000

so, 119.59375 in single-precision format is 0 10000101 11011110011000000000000

4)
-67.1015625
Converting 67.1015625 to binary
   Convert decimal part first, then the fractional part
   > First convert 67 to binary
   Divide 67 successively by 2 until the quotient is 0
      > 67/2 = 33, remainder is 1
      > 33/2 = 16, remainder is 1
      > 16/2 = 8, remainder is 0
      > 8/2 = 4, remainder 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 1000011
   So, 67 of decimal is 1000011 in binary
   > Now, Convert 0.10156250 to binary
      > Multiply 0.10156250 with 2.  Since 0.20312500 is < 1. then add 0 to result
      > Multiply 0.20312500 with 2.  Since 0.40625000 is < 1. then add 0 to result
      > Multiply 0.40625000 with 2.  Since 0.81250000 is < 1. then add 0 to result
      > Multiply 0.81250000 with 2.  Since 1.62500000 is >= 1. then add 1 to result
      > Multiply 0.62500000 with 2.  Since 1.25000000 is >= 1. then add 1 to result
      > Multiply 0.25000000 with 2.  Since 0.50000000 is < 1. then add 0 to result
      > Multiply 0.50000000 with 2.  Since 1.00000000 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.1015625 of decimal is .0001101 in binary
   so, 67.1015625 in binary is 1000011.0001101
-67.1015625 in simple binary => 1000011.0001101
so, -67.1015625 in normal binary is 1000011.0001101 => 1.0000110001101 * 2^6

single precision:
--------------------
sign bit is 1(-ve)
exponent bits are (127+6=133) => 10000101
   Divide 133 successively by 2 until the quotient is 0
      > 133/2 = 66, remainder is 1
      > 66/2 = 33, remainder is 0
      > 33/2 = 16, remainder is 1
      > 16/2 = 8, remainder is 0
      > 8/2 = 4, remainder 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 10000101
   So, 133 of decimal is 10000101 in binary
frac/significant bits are 00001100011010000000000

so, -67.1015625 in single-precision format is 1 10000101 00001100011010000000000
Add a comment
Know the answer?
Add Answer to:
Show your work. For 8-bit numbers, use 1 sign bit, 3 exponent bits, 4 mantissa bits:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT