2.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard
Convert decimal 2.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4(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
2.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4(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: 2.
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;
- 2 ÷ 2 = 1 + 0;
- 1 ÷ 2 = 0 + 1;
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.
2(10) =
10(2)
3. Convert to binary (base 2) the fractional part: 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4.
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.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 004 8;
- 2) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 004 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 009 6;
- 3) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 009 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 019 2;
- 4) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 019 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 038 4;
- 5) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 038 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 076 8;
- 6) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 076 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 153 6;
- 7) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 153 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 307 2;
- 8) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 307 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 614 4;
- 9) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 614 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 228 8;
- 10) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 228 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 457 6;
- 11) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 457 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 004 915 2;
- 12) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 004 915 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 009 830 4;
- 13) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 009 830 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 019 660 8;
- 14) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 019 660 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 039 321 6;
- 15) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 039 321 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 078 643 2;
- 16) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 078 643 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 157 286 4;
- 17) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 157 286 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 314 572 8;
- 18) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 314 572 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 629 145 6;
- 19) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 629 145 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 258 291 2;
- 20) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 258 291 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 516 582 4;
- 21) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 516 582 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 033 164 8;
- 22) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 033 164 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 066 329 6;
- 23) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 066 329 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 020 132 659 2;
- 24) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 020 132 659 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 040 265 318 4;
- 25) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 040 265 318 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 080 530 636 8;
- 26) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 080 530 636 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 161 061 273 6;
- 27) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 161 061 273 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 322 122 547 2;
- 28) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 322 122 547 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 644 245 094 4;
- 29) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 644 245 094 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 288 490 188 8;
- 30) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 288 490 188 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 576 980 377 6;
- 31) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 576 980 377 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 153 960 755 2;
- 32) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 153 960 755 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 307 921 510 4;
- 33) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 307 921 510 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 020 615 843 020 8;
- 34) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 020 615 843 020 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 041 231 686 041 6;
- 35) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 041 231 686 041 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 082 463 372 083 2;
- 36) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 082 463 372 083 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 164 926 744 166 4;
- 37) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 164 926 744 166 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 329 853 488 332 8;
- 38) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 329 853 488 332 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 659 706 976 665 6;
- 39) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 659 706 976 665 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 319 413 953 331 2;
- 40) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 319 413 953 331 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 638 827 906 662 4;
- 41) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 638 827 906 662 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 277 655 813 324 8;
- 42) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 277 655 813 324 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 555 311 626 649 6;
- 43) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 555 311 626 649 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 021 110 623 253 299 2;
- 44) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 021 110 623 253 299 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 042 221 246 506 598 4;
- 45) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 042 221 246 506 598 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 084 442 493 013 196 8;
- 46) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 084 442 493 013 196 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 168 884 986 026 393 6;
- 47) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 168 884 986 026 393 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 337 769 972 052 787 2;
- 48) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 337 769 972 052 787 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 675 539 944 105 574 4;
- 49) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 675 539 944 105 574 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 351 079 888 211 148 8;
- 50) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 001 351 079 888 211 148 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 702 159 776 422 297 6;
- 51) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 702 159 776 422 297 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 404 319 552 844 595 2;
- 52) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 005 404 319 552 844 595 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 808 639 105 689 190 4;
- 53) 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 010 808 639 105 689 190 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 021 617 278 211 378 380 8;
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.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0(2)
5. Positive number before normalization:
2.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4(10) =
10.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0(2)
6. Normalize the binary representation of the number.
Shift the decimal mark 1 positions to the left, so that only one non zero digit remains to the left of it:
2.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4(10) =
10.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0(2) =
10.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0(2) × 20 =
1.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00(2) × 21
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): 1
Mantissa (not normalized):
1.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00
8. Adjust the exponent.
Use the 11 bit excess/bias notation:
Exponent (adjusted) =
Exponent (unadjusted) + 2(11-1) - 1 =
1 + 2(11-1) - 1 =
(1 + 1 023)(10) =
1 024(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 024 ÷ 2 = 512 + 0;
- 512 ÷ 2 = 256 + 0;
- 256 ÷ 2 = 128 + 0;
- 128 ÷ 2 = 64 + 0;
- 64 ÷ 2 = 32 + 0;
- 32 ÷ 2 = 16 + 0;
- 16 ÷ 2 = 8 + 0;
- 8 ÷ 2 = 4 + 0;
- 4 ÷ 2 = 2 + 0;
- 2 ÷ 2 = 1 + 0;
- 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) =
1024(10) =
100 0000 0000(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, by removing the excess bits, from the right (if any of the excess bits is set on 1, we are losing precision...).
Mantissa (normalized) =
1. 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00 =
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
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) =
100 0000 0000
Mantissa (52 bits) =
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Decimal number 2.000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 002 4 converted to 64 bit double precision IEEE 754 binary floating point representation:
0 - 100 0000 0000 - 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000