Question

6-bit floating-point encoding: 1 sign bit, 3 exponent bits, 2 frac bits( mantissa/significand) what is the...

6-bit floating-point encoding:

1 sign bit, 3 exponent bits, 2 frac bits( mantissa/significand)

what is the exact 6-bit floating-point encoding for the following numbers:

17

0.5

-6

7.5

Please show the steps

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)
Converting 17.0 to binary
   Convert decimal part first, then the fractional part
   > First convert 17 to binary
   Divide 17 successively by 2 until the quotient is 0
      > 17/2 = 8, remainder is 1
      > 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 10001
   So, 17 of decimal is 10001 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, 17.0 in binary is 10001.0
17.0 in simple binary => 10001.0
so, 17.0 in normal binary is 10001.0 => 1. * 2^4

6-bit precision:
--------------------
sign bit is 0(+ve)
exp bits are (3+4=7) => 111
   Divide 7 successively by 2 until the quotient 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 111
   So, 7 of decimal is 111 in binary
frac bits are 00

so, 17.0 in 6-bit precision format is 0 111 00

2)
Converting 0.5 to binary
   Convert decimal part first, then the fractional part
   > First convert 0 to binary
   Divide 0 successively by 2 until the quotient is 0
   Read remainders from the bottom to top as
   So, 0 of decimal is  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, 0.5 in binary is .1
0.5 in simple binary => .1
so, 0.5 in normal binary is .1 => 1. * 2^-1

6-bit precision:
--------------------
sign bit is 0(+ve)
exp bits are (3-1=2) => 010
   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
frac bits are 00

so, 0.5 in 6-bit precision format is 0 010 00

3)
Converting 6.0 to binary
   Convert decimal part first, then the fractional part
   > First convert 6 to binary
   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
   > 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, 6.0 in binary is 110.0
-6.0 in simple binary => 110.0
so, -6.0 in normal binary is 110.0 => 1.1 * 2^2

6-bit precision:
--------------------
sign bit is 1(-ve)
exp bits are (3+2=5) => 101
   Divide 5 successively by 2 until the quotient is 0
      > 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 101
   So, 5 of decimal is 101 in binary
frac bits are 10

so, -6.0 in 6-bit precision format is 1 101 10

4)
Converting 7.5 to binary
   Convert decimal part first, then the fractional part
   > First convert 7 to binary
   Divide 7 successively by 2 until the quotient 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 111
   So, 7 of decimal is 111 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, 7.5 in binary is 111.1
7.5 in simple binary => 111.1
so, 7.5 in normal binary is 111.1 => 1.11 * 2^2

6-bit precision:
--------------------
sign bit is 0(+ve)
exp bits are (3+2=5) => 101
   Divide 5 successively by 2 until the quotient is 0
      > 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 101
   So, 5 of decimal is 101 in binary
frac bits are 11

so, 7.5 in 6-bit precision format is 0 101 11


Add a comment
Know the answer?
Add Answer to:
6-bit floating-point encoding: 1 sign bit, 3 exponent bits, 2 frac bits( mantissa/significand) what is the...
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
ADVERTISEMENT