Question

Assuming the following binary values are encoded as single precision floating point, what decimal value is...

Assuming the following binary values are encoded as single precision floating point, what decimal value is encoded (leave in base2 scientific notation)

1000000001010…0

0000000111010…0

0111111110000…0

0111111100000…0

0000000000000…0

0000000010000…0

0000000001000…0

0 0
Add a comment Improve this question Transcribed image text
Answer #0
1)
1 00000000 10100000000000000000000
sign bit is 1(-ve)
exp bits are 00000000
   => 00000000
   => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
   => 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
   => 0+0+0+0+0+0+0+0
   => 0
in decimal it is 0
so, exponent/bias is 0-127 = -127
frac bits are 101

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.101 * 2^-127
1.101 in decimal is 1.625
   => 1.101
   => 1x2^0+1x2^-1+0x2^-2+1x2^-3
   => 1x1+1x0.5+0x0.25+1x0.125
   => 1+0.5+0.0+0.125
   => 1.625
so, 1.625 * 2^-127 in decimal is 9.550891600431086e-39
so, 10000000010100000000000000000000 in IEEE-754 single precision format is -9.550891600431086e-39
Answer: -9.550891600431086e-39

2)
0 00000011 10100000000000000000000
sign bit is 0(+ve)
exp bits are 00000011
   => 00000011
   => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+1x2^1+1x2^0
   => 0x128+0x64+0x32+0x16+0x8+0x4+1x2+1x1
   => 0+0+0+0+0+0+2+1
   => 3
in decimal it is 3
so, exponent/bias is 3-127 = -124
frac bits are 101

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.101 * 2^-124
1.101 in decimal is 1.625
   => 1.101
   => 1x2^0+1x2^-1+0x2^-2+1x2^-3
   => 1x1+1x0.5+0x0.25+1x0.125
   => 1+0.5+0.0+0.125
   => 1.625
so, 1.625 * 2^-124 in decimal is 7.640713280344869e-38
so, 00000001110100000000000000000000 in IEEE-754 single precision format is 7.640713280344869e-38
Answer: 7.640713280344869e-38

3)
0 11111111 00000000000000000000000
Answer: +Infinity

4)
0 11111110 00000000000000000000000
sign bit is 0(+ve)
exp bits are 11111110
   => 11111110
   => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+0x2^0
   => 1x128+1x64+1x32+1x16+1x8+1x4+1x2+0x1
   => 128+64+32+16+8+4+2+0
   => 254
in decimal it is 254
so, exponent/bias is 254-127 = 127
frac bits are

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1. * 2^127
1. in decimal is 1
   => 1.
   => 1x2^0
   => 1x1
   => 1
   => 1
so, 1 * 2^127 in decimal is 170141183460469231731687303715884105728
so, 01111111000000000000000000000000 in IEEE-754 single precision format is 170141183460469231731687303715884105728
Answer: 170141183460469231731687303715884105728

5)
0 00000000 00000000000000000000000
Answer: 0
since all the bits are 0

6)
0 00000001 00000000000000000000000
sign bit is 0(+ve)
exp bits are 00000001
   => 00000001
   => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+1x2^0
   => 0x128+0x64+0x32+0x16+0x8+0x4+0x2+1x1
   => 0+0+0+0+0+0+0+1
   => 1
in decimal it is 1
so, exponent/bias is 1-127 = -126
frac bits are

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1. * 2^-126
1. in decimal is 1
   => 1.
   => 1x2^0
   => 1x1
   => 1
   => 1
so, 1 * 2^-126 in decimal is 1.1754943508222875e-38
so, 00000000100000000000000000000000 in IEEE-754 single precision format is 1.1754943508222875e-38
Answer: 1.1754943508222875e-38

7)
0 00000000 10000000000000000000000
sign bit is 0(+ve)
exp bits are 00000000
   => 00000000
   => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
   => 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
   => 0+0+0+0+0+0+0+0
   => 0
in decimal it is 0
so, exponent/bias is 0-127 = -127
frac bits are 1

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.1 * 2^-127
1.1 in decimal is 1.5
   => 1.1
   => 1x2^0+1x2^-1
   => 1x1+1x0.5
   => 1+0.5
   => 1.5
so, 1.5 * 2^-127 in decimal is 8.816207631167156e-39
so, 00000000010000000000000000000000 in IEEE-754 single precision format is 8.816207631167156e-39
Answer: 8.816207631167156e-39
Add a comment
Know the answer?
Add Answer to:
Assuming the following binary values are encoded as single precision floating point, what decimal value is...
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