Back
Combined float
Normalize the number 277. using the the real IEEE float values
1 bit sign, 10 bit exponent, 7 bit significand
First convert to binary.
277
138 1 lsb
69 0
34 1
17 0
8 1
4 0
2 0
1 0
0 1 msb
100010101b
Represent in the equivalent of scientific notation,.
(1).00010101 b * 2^8
------- <- 7 significant bits.
Generating a bias.
Use formula 2^(n-1) - 1 where n is the size of the exponent.
2^(10-1)-1 = 511 bias
Biasing this exponent gives :
8 + 511 = 519
519
- 1 * 512
---
007
- 0 * 256
---
007
- 0 * 128
---
007
- 0 * 064
---
007
- 0 * 032
---
007
- 0 * 016
---
007
- 0 * 008
---
007
- 1 * 004
---
003
- 1 * 002
---
001
- 1 * 001
---
000
10 0000 0111
(512*1+4*1+2*1+1*1)
512 +4 +2 +1 = 519
Sign bit 0 (positive)
Biased Exponent 10 0000 0111
Significand 0001 0101 0000 0000
Remember, when normalizing, we don't record the most significant bit.
Floating point 0 1000000111 0001010
* Unlike integer storage, an integer with a large number of significant
digits may not be stored exactly in float storage.
So, using float to store a very large integer may not be best solution.
Conversion back