0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard
Convert decimal 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053(10) to 64 bit double precision IEEE 754 binary floating point representation standard (1 bit for sign, 11 bits for exponent, 52 bits for mantissa)
What are the steps to convert decimal number
0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053(10) to 64 bit double precision IEEE 754 binary floating point representation (1 bit for sign, 11 bits for exponent, 52 bits for mantissa)
1. First, convert to binary (in base 2) the integer part: 0.
Divide the number repeatedly by 2.
Keep track of each remainder.
We stop when we get a quotient that is equal to zero.
- division = quotient + remainder;
- 0 ÷ 2 = 0 + 0;
2. Construct the base 2 representation of the integer part of the number.
Take all the remainders starting from the bottom of the list constructed above.
0(10) =
0(2)
3. Convert to binary (base 2) the fractional part: 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053.
Multiply it repeatedly by 2.
Keep track of each integer part of the results.
Stop when we get a fractional part that is equal to zero.
- #) multiplying = integer + fractional part;
- 1) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 106;
- 2) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 106 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 212;
- 3) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 212 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 424;
- 4) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 424 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 848;
- 5) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 848 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 696;
- 6) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 696 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 315 392;
- 7) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 315 392 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 630 784;
- 8) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 630 784 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 261 568;
- 9) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 261 568 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 523 136;
- 10) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 523 136 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 046 272;
- 11) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 046 272 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 092 544;
- 12) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 092 544 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 185 088;
- 13) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 185 088 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 370 176;
- 14) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 370 176 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 740 352;
- 15) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 740 352 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 480 704;
- 16) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 480 704 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 314 961 408;
- 17) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 314 961 408 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 629 922 816;
- 18) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 629 922 816 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 259 845 632;
- 19) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 259 845 632 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 519 691 264;
- 20) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 519 691 264 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 039 382 528;
- 21) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 039 382 528 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 078 765 056;
- 22) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 078 765 056 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 157 530 112;
- 23) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 157 530 112 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 315 060 224;
- 24) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 315 060 224 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 630 120 448;
- 25) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 630 120 448 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 260 240 896;
- 26) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 260 240 896 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 314 520 481 792;
- 27) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 314 520 481 792 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 629 040 963 584;
- 28) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 629 040 963 584 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 258 081 927 168;
- 29) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 258 081 927 168 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 516 163 854 336;
- 30) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 516 163 854 336 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 032 327 708 672;
- 31) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 032 327 708 672 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 064 655 417 344;
- 32) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 064 655 417 344 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 129 310 834 688;
- 33) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 129 310 834 688 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 258 621 669 376;
- 34) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 258 621 669 376 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 517 243 338 752;
- 35) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 517 243 338 752 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 034 486 677 504;
- 36) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 657 034 486 677 504 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 314 068 973 355 008;
- 37) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 314 068 973 355 008 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 628 137 946 710 016;
- 38) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 628 137 946 710 016 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 256 275 893 420 032;
- 39) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 256 275 893 420 032 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 512 551 786 840 064;
- 40) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 512 551 786 840 064 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 025 103 573 680 128;
- 41) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 025 103 573 680 128 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 050 207 147 360 256;
- 42) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 050 207 147 360 256 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 100 414 294 720 512;
- 43) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 100 414 294 720 512 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 200 828 589 441 024;
- 44) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 200 828 589 441 024 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 401 657 178 882 048;
- 45) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 401 657 178 882 048 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 656 803 314 357 764 096;
- 46) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 656 803 314 357 764 096 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 313 606 628 715 528 192;
- 47) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 313 606 628 715 528 192 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 627 213 257 431 056 384;
- 48) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 627 213 257 431 056 384 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 254 426 514 862 112 768;
- 49) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 254 426 514 862 112 768 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 508 853 029 724 225 536;
- 50) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 508 853 029 724 225 536 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 017 706 059 448 451 072;
- 51) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 017 706 059 448 451 072 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 035 412 118 896 902 144;
- 52) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 035 412 118 896 902 144 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 070 824 237 793 804 288;
- 53) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 332 070 824 237 793 804 288 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 141 648 475 587 608 576;
- 54) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 664 141 648 475 587 608 576 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 328 283 296 951 175 217 152;
We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit) and at least one integer that was different from zero => FULL STOP (Losing precision - the converted number we get in the end will be just a very good approximation of the initial one).
4. Construct the base 2 representation of the fractional part of the number.
Take all the integer parts of the multiplying operations, starting from the top of the constructed list above:
0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053(10) =
0.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 01(2)
5. Positive number before normalization:
0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053(10) =
0.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 01(2)
6. Normalize the binary representation of the number.
Shift the decimal mark 2 positions to the right, so that only one non zero digit remains to the left of it:
0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053(10) =
0.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 01(2) =
0.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 01(2) × 20 =
1.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101(2) × 2-2
7. Up to this moment, there are the following elements that would feed into the 64 bit double precision IEEE 754 binary floating point representation:
Sign 0 (a positive number)
Exponent (unadjusted): -2
Mantissa (not normalized):
1.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101
8. Adjust the exponent.
Use the 11 bit excess/bias notation:
Exponent (adjusted) =
Exponent (unadjusted) + 2(11-1) - 1 =
-2 + 2(11-1) - 1 =
(-2 + 1 023)(10) =
1 021(10)
9. Convert the adjusted exponent from the decimal (base 10) to 11 bit binary.
Use the same technique of repeatedly dividing by 2:
- division = quotient + remainder;
- 1 021 ÷ 2 = 510 + 1;
- 510 ÷ 2 = 255 + 0;
- 255 ÷ 2 = 127 + 1;
- 127 ÷ 2 = 63 + 1;
- 63 ÷ 2 = 31 + 1;
- 31 ÷ 2 = 15 + 1;
- 15 ÷ 2 = 7 + 1;
- 7 ÷ 2 = 3 + 1;
- 3 ÷ 2 = 1 + 1;
- 1 ÷ 2 = 0 + 1;
10. Construct the base 2 representation of the adjusted exponent.
Take all the remainders starting from the bottom of the list constructed above.
Exponent (adjusted) =
1021(10) =
011 1111 1101(2)
11. Normalize the mantissa.
a) Remove the leading (the leftmost) bit, since it's allways 1, and the decimal point, if the case.
b) Adjust its length to 52 bits, only if necessary (not the case here).
Mantissa (normalized) =
1. 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 =
0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101
12. The three elements that make up the number's 64 bit double precision IEEE 754 binary floating point representation:
Sign (1 bit) =
0 (a positive number)
Exponent (11 bits) =
011 1111 1101
Mantissa (52 bits) =
0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101
Decimal number 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 053 converted to 64 bit double precision IEEE 754 binary floating point representation:
0 - 011 1111 1101 - 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101