2.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard
Convert decimal 2.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1(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.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1(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.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1.
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 399 1 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 798 2;
- 2) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 798 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 596 4;
- 3) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 596 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 192 8;
- 4) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 192 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 385 6;
- 5) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 385 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 771 2;
- 6) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 771 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 542 4;
- 7) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 542 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 084 8;
- 8) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 084 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 169 6;
- 9) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 169 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 700 339 2;
- 10) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 700 339 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 400 678 4;
- 11) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 400 678 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 801 356 8;
- 12) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 801 356 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 602 713 6;
- 13) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 602 713 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 205 427 2;
- 14) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 205 427 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 410 854 4;
- 15) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 410 854 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 821 708 8;
- 16) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 821 708 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 643 417 6;
- 17) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 643 417 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 286 835 2;
- 18) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 286 835 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 573 670 4;
- 19) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 573 670 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 701 147 340 8;
- 20) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 701 147 340 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 402 294 681 6;
- 21) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 402 294 681 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 804 589 363 2;
- 22) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 804 589 363 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 609 178 726 4;
- 23) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 609 178 726 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 218 357 452 8;
- 24) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 218 357 452 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 436 714 905 6;
- 25) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 436 714 905 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 873 429 811 2;
- 26) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 873 429 811 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 746 859 622 4;
- 27) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 746 859 622 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 493 719 244 8;
- 28) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 493 719 244 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 987 438 489 6;
- 29) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 987 438 489 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 701 974 876 979 2;
- 30) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 701 974 876 979 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 403 949 753 958 4;
- 31) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 403 949 753 958 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 807 899 507 916 8;
- 32) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 807 899 507 916 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 615 799 015 833 6;
- 33) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 615 799 015 833 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 231 598 031 667 2;
- 34) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 231 598 031 667 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 463 196 063 334 4;
- 35) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 463 196 063 334 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 926 392 126 668 8;
- 36) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 926 392 126 668 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 852 784 253 337 6;
- 37) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 852 784 253 337 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 705 568 506 675 2;
- 38) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 705 568 506 675 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 411 137 013 350 4;
- 39) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 411 137 013 350 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 702 822 274 026 700 8;
- 40) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 702 822 274 026 700 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 405 644 548 053 401 6;
- 41) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 405 644 548 053 401 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 811 289 096 106 803 2;
- 42) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 811 289 096 106 803 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 622 578 192 213 606 4;
- 43) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 622 578 192 213 606 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 245 156 384 427 212 8;
- 44) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 245 156 384 427 212 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 490 312 768 854 425 6;
- 45) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 490 312 768 854 425 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 980 625 537 708 851 2;
- 46) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 980 625 537 708 851 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 961 251 075 417 702 4;
- 47) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 961 251 075 417 702 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 922 502 150 835 404 8;
- 48) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 922 502 150 835 404 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 845 004 301 670 809 6;
- 49) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 845 004 301 670 809 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 703 690 008 603 341 619 2;
- 50) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 703 690 008 603 341 619 2 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 407 380 017 206 683 238 4;
- 51) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 407 380 017 206 683 238 4 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 814 760 034 413 366 476 8;
- 52) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 814 760 034 413 366 476 8 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 629 520 068 826 732 953 6;
- 53) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 629 520 068 826 732 953 6 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 259 040 137 653 465 907 2;
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 399 1(10) =
0.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0(2)
5. Positive number before normalization:
2.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1(10) =
10.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 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.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1(10) =
10.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0(2) =
10.0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0(2) × 20 =
1.0010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 10(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.0010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 10
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. 0010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 10 =
0010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010
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) =
0010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010
Decimal number 2.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 1 converted to 64 bit double precision IEEE 754 binary floating point representation:
0 - 100 0000 0000 - 0010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010