Question

Assignment (show how you calculate these): 1) According to the IEEE 754 protocols, compute the following values: i) The great

0 0
Add a comment Improve this question Transcribed image text
Answer #1
i)
0 1110 1111111
sign bit is 0(+ve)
exp bits are 1110
   => 1110
   => 1x2^3+1x2^2+1x2^1+0x2^0
   => 1x8+1x4+1x2+0x1
   => 8+4+2+0
   => 14
in decimal it is 14
so, exponent/bias is 14-7 = 7
frac bits are 1111111

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.1111111 * 2^7
1.1111111 in decimal is 1.9921875
   => 1.1111111
   => 1x2^0+1x2^-1+1x2^-2+1x2^-3+1x2^-4+1x2^-5+1x2^-6+1x2^-7
   => 1x1+1x0.5+1x0.25+1x0.125+1x0.0625+1x0.03125+1x0.015625+1x0.0078125
   => 1+0.5+0.25+0.125+0.0625+0.03125+0.015625+0.0078125
   => 1.9921875
so, 1.9921875 * 2^7 in decimal is 255.0
so, 011101111111 in IEEE-754 format is 255.0
Answer: 255.0

ii)
0 0001 0000000
sign bit is 0(+ve)
exp bits are 0001
   => 0001
   => 0x2^3+0x2^2+0x2^1+1x2^0
   => 0x8+0x4+0x2+1x1
   => 0+0+0+1
   => 1
in decimal it is 1
so, exponent/bias is 1-7 = -6
frac bits are

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1. * 2^-6
1. in decimal is 1
   => 1.
   => 1x2^0
   => 1x1
   => 1
   => 1
so, 1 * 2^-6 in decimal is 0.015625
so, 000010000000 in IEEE-754 format is 0.015625
Answer: 0.015625

iii)
0 0000 1111111
sign bit is 0(+ve)
exp bits are 0000
   => 0000
   => 0x2^3+0x2^2+0x2^1+0x2^0
   => 0x8+0x4+0x2+0x1
   => 0+0+0+0
   => 0
in decimal it is 0
so, exponent/bias is 0-7 = -7
frac bits are 1111111

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.1111111 * 2^-7
1.1111111 in decimal is 1.9921875
   => 1.1111111
   => 1x2^0+1x2^-1+1x2^-2+1x2^-3+1x2^-4+1x2^-5+1x2^-6+1x2^-7
   => 1x1+1x0.5+1x0.25+1x0.125+1x0.0625+1x0.03125+1x0.015625+1x0.0078125
   => 1+0.5+0.25+0.125+0.0625+0.03125+0.015625+0.0078125
   => 1.9921875
so, 1.9921875 * 2^-7 in decimal is 0.01556396484375
so, 000001111111 in IEEE-754 format is 0.01556396484375
Answer: 0.01556396484375

iv)
0 0000 0000001
sign bit is 0(+ve)
exp bits are 0000
   => 0000
   => 0x2^3+0x2^2+0x2^1+0x2^0
   => 0x8+0x4+0x2+0x1
   => 0+0+0+0
   => 0
in decimal it is 0
so, exponent/bias is 0-7 = -7
frac bits are 0000001

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.0000001 * 2^-7
1.0000001 in decimal is 1.0078125
   => 1.0000001
   => 1x2^0+0x2^-1+0x2^-2+0x2^-3+0x2^-4+0x2^-5+0x2^-6+1x2^-7
   => 1x1+0x0.5+0x0.25+0x0.125+0x0.0625+0x0.03125+0x0.015625+1x0.0078125
   => 1+0.0+0.0+0.0+0.0+0.0+0.0+0.0078125
   => 1.0078125
so, 1.0078125 * 2^-7 in decimal is 0.00787353515625
so, 000000000001 in IEEE-754 format is 0.00787353515625
Answer: 0.00787353515625
Add a comment
Know the answer?
Add Answer to:
Assignment (show how you calculate these): 1) According to the IEEE 754 protocols, compute the following...
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