Question

Exercise 4.4 Find the decimal value of the DP number for each of the bit patterns (1) 001111111111 000...000 (2) 0 0111111111

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

Answer:

1)
0 01111111111 0000000000000000000000000000000000000000000000000000
sign bit is 0(+ve)
exp bits are 01111111111
Converting 01111111111 to decimal
   01111111111
   => 0x2^10+1x2^9+1x2^8+1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
   => 0x1024+1x512+1x256+1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1
   => 0+512+256+128+64+32+16+8+4+2+1
   => 1023
in decimal it is 1023
so, exponent/bias is 1023-1023 = 0
frac bits are 

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

2)
0 01111111111 0000000000000000000000000000000000000000000000000001
sign bit is 0(+ve)
exp bits are 01111111111
Converting 01111111111 to decimal
   01111111111
   => 0x2^10+1x2^9+1x2^8+1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
   => 0x1024+1x512+1x256+1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1
   => 0+512+256+128+64+32+16+8+4+2+1
   => 1023
in decimal it is 1023
so, exponent/bias is 1023-1023 = 0
frac bits are 0000000000000000000000000000000000000000000000000001

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.0000000000000000000000000000000000000000000000000001 * 2^0
1.0000000000000000000000000000000000000000000000000001 in decimal is 1.0000000000000002
   => 1.0000000000000000000000000000000000000000000000000001
   => 1x2^0+0x2^-1+0x2^-2+0x2^-3+0x2^-4+0x2^-5+0x2^-6+0x2^-7+0x2^-8+0x2^-9+0x2^-10+0x2^-11+0x2^-12+0x2^-13+0x2^-14+0x2^-15+0x2^-16+0x2^-17+0x2^-18+0x2^-19+0x2^-20+0x2^-21+0x2^-22+0x2^-23+0x2^-24+0x2^-25+0x2^-26+0x2^-27+0x2^-28+0x2^-29+0x2^-30+0x2^-31+0x2^-32+0x2^-33+0x2^-34+0x2^-35+0x2^-36+0x2^-37+0x2^-38+0x2^-39+0x2^-40+0x2^-41+0x2^-42+0x2^-43+0x2^-44+0x2^-45+0x2^-46+0x2^-47+0x2^-48+0x2^-49+0x2^-50+0x2^-51+1x2^-52
   => 1x1+0x0.5+0x0.25+0x0.125+0x0.0625+0x0.03125+0x0.015625+0x0.0078125+0x0.00390625+0x0.001953125+0x0.0009765625+0x0.00048828125+0x0.000244140625+0x0.0001220703125+0x6.103515625e-05+0x3.0517578125e-05+0x1.52587890625e-05+0x7.62939453125e-06+0x3.814697265625e-06+0x1.9073486328125e-06+0x9.5367431640625e-07+0x4.76837158203125e-07+0x2.384185791015625e-07+0x1.1920928955078125e-07+0x5.960464477539063e-08+0x2.9802322387695312e-08+0x1.4901161193847656e-08+0x7.450580596923828e-09+0x3.725290298461914e-09+0x1.862645149230957e-09+0x9.313225746154785e-10+0x4.656612873077393e-10+0x2.3283064365386963e-10+0x1.1641532182693481e-10+0x5.820766091346741e-11+0x2.9103830456733704e-11+0x1.4551915228366852e-11+0x7.275957614183426e-12+0x3.637978807091713e-12+0x1.8189894035458565e-12+0x9.094947017729282e-13+0x4.547473508864641e-13+0x2.2737367544323206e-13+0x1.1368683772161603e-13+0x5.684341886080802e-14+0x2.842170943040401e-14+0x1.4210854715202004e-14+0x7.105427357601002e-15+0x3.552713678800501e-15+0x1.7763568394002505e-15+0x8.881784197001252e-16+0x4.440892098500626e-16+1x2.220446049250313e-16
   => 1+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+2.220446049250313e-16
   => 1.0000000000000002
so, 1.0000000000000002 * 2^0 in decimal is 1.0000000000000002
so, 0011111111110000000000000000000000000000000000000000000000000001 in 64-bit format is 1.0000000000000002
Answer: 1.0000000000000002

3)
0 10000110011 0000000000000000000000000000000000000000000000000000
sign bit is 0(+ve)
exp bits are 10000110011
Converting 10000110011 to decimal
   10000110011
   => 1x2^10+0x2^9+0x2^8+0x2^7+0x2^6+1x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
   => 1x1024+0x512+0x256+0x128+0x64+1x32+1x16+0x8+0x4+1x2+1x1
   => 1024+0+0+0+0+32+16+0+0+2+1
   => 1075
in decimal it is 1075
so, exponent/bias is 1075-1023 = 52
frac bits are 

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1. * 2^52
1. in decimal is 1
   => 1.
   => 1x2^0
   => 1x1
   => 1
   => 1
so, 1 * 2^52 in decimal is 4503599627370496
so, 0100001100110000000000000000000000000000000000000000000000000000 in 64-bit format is 4503599627370496
Answer: 4503599627370496

4)
0 10000110011 0000000000000000000000000000000000000000000000000001
sign bit is 0(+ve)
exp bits are 10000110011
Converting 10000110011 to decimal
   10000110011
   => 1x2^10+0x2^9+0x2^8+0x2^7+0x2^6+1x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
   => 1x1024+0x512+0x256+0x128+0x64+1x32+1x16+0x8+0x4+1x2+1x1
   => 1024+0+0+0+0+32+16+0+0+2+1
   => 1075
in decimal it is 1075
so, exponent/bias is 1075-1023 = 52
frac bits are 0000000000000000000000000000000000000000000000000001

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.0000000000000000000000000000000000000000000000000001 * 2^52
1.0000000000000000000000000000000000000000000000000001 in decimal is 1.0000000000000002
   => 1.0000000000000000000000000000000000000000000000000001
   => 1x2^0+0x2^-1+0x2^-2+0x2^-3+0x2^-4+0x2^-5+0x2^-6+0x2^-7+0x2^-8+0x2^-9+0x2^-10+0x2^-11+0x2^-12+0x2^-13+0x2^-14+0x2^-15+0x2^-16+0x2^-17+0x2^-18+0x2^-19+0x2^-20+0x2^-21+0x2^-22+0x2^-23+0x2^-24+0x2^-25+0x2^-26+0x2^-27+0x2^-28+0x2^-29+0x2^-30+0x2^-31+0x2^-32+0x2^-33+0x2^-34+0x2^-35+0x2^-36+0x2^-37+0x2^-38+0x2^-39+0x2^-40+0x2^-41+0x2^-42+0x2^-43+0x2^-44+0x2^-45+0x2^-46+0x2^-47+0x2^-48+0x2^-49+0x2^-50+0x2^-51+1x2^-52
   => 1x1+0x0.5+0x0.25+0x0.125+0x0.0625+0x0.03125+0x0.015625+0x0.0078125+0x0.00390625+0x0.001953125+0x0.0009765625+0x0.00048828125+0x0.000244140625+0x0.0001220703125+0x6.103515625e-05+0x3.0517578125e-05+0x1.52587890625e-05+0x7.62939453125e-06+0x3.814697265625e-06+0x1.9073486328125e-06+0x9.5367431640625e-07+0x4.76837158203125e-07+0x2.384185791015625e-07+0x1.1920928955078125e-07+0x5.960464477539063e-08+0x2.9802322387695312e-08+0x1.4901161193847656e-08+0x7.450580596923828e-09+0x3.725290298461914e-09+0x1.862645149230957e-09+0x9.313225746154785e-10+0x4.656612873077393e-10+0x2.3283064365386963e-10+0x1.1641532182693481e-10+0x5.820766091346741e-11+0x2.9103830456733704e-11+0x1.4551915228366852e-11+0x7.275957614183426e-12+0x3.637978807091713e-12+0x1.8189894035458565e-12+0x9.094947017729282e-13+0x4.547473508864641e-13+0x2.2737367544323206e-13+0x1.1368683772161603e-13+0x5.684341886080802e-14+0x2.842170943040401e-14+0x1.4210854715202004e-14+0x7.105427357601002e-15+0x3.552713678800501e-15+0x1.7763568394002505e-15+0x8.881784197001252e-16+0x4.440892098500626e-16+1x2.220446049250313e-16
   => 1+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+0.0+2.220446049250313e-16
   => 1.0000000000000002
so, 1.0000000000000002 * 2^52 in decimal is 4503599627370497.0
so, 0100001100110000000000000000000000000000000000000000000000000001 in 64-bit format is 4503599627370497.0
Answer: 4503599627370497.0


Please let me know if you have any doubts Please upvote this answer. Thanks!!

Add a comment
Know the answer?
Add Answer to:
Exercise 4.4 Find the decimal value of the DP number for each of the bit patterns...
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