2.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 405 7 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 405 7(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 405 7(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 405 7.
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 405 7 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 811 4;
- 2) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 811 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 622 8;
- 3) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 622 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 245 6;
- 4) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 245 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 491 2;
- 5) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 491 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 982 4;
- 6) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 982 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 964 8;
- 7) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 964 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 929 6;
- 8) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 929 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 859 2;
- 9) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 859 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 703 718 4;
- 10) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 703 718 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 407 436 8;
- 11) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 407 436 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 814 873 6;
- 12) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 814 873 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 629 747 2;
- 13) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 629 747 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 259 494 4;
- 14) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 259 494 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 518 988 8;
- 15) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 518 988 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 037 977 6;
- 16) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 037 977 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 075 955 2;
- 17) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 075 955 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 151 910 4;
- 18) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 151 910 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 352 303 820 8;
- 19) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 352 303 820 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 704 607 641 6;
- 20) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 704 607 641 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 409 215 283 2;
- 21) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 409 215 283 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 818 430 566 4;
- 22) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 818 430 566 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 636 861 132 8;
- 23) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 636 861 132 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 273 722 265 6;
- 24) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 273 722 265 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 547 444 531 2;
- 25) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 547 444 531 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 094 889 062 4;
- 26) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 094 889 062 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 189 778 124 8;
- 27) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 189 778 124 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 379 556 249 6;
- 28) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 379 556 249 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 352 759 112 499 2;
- 29) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 352 759 112 499 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 705 518 224 998 4;
- 30) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 705 518 224 998 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 411 036 449 996 8;
- 31) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 411 036 449 996 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 822 072 899 993 6;
- 32) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 822 072 899 993 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 644 145 799 987 2;
- 33) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 644 145 799 987 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 288 291 599 974 4;
- 34) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 288 291 599 974 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 576 583 199 948 8;
- 35) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 576 583 199 948 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 153 166 399 897 6;
- 36) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 153 166 399 897 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 306 332 799 795 2;
- 37) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 306 332 799 795 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 612 665 599 590 4;
- 38) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 612 665 599 590 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 353 225 331 199 180 8;
- 39) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 353 225 331 199 180 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 706 450 662 398 361 6;
- 40) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 706 450 662 398 361 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 412 901 324 796 723 2;
- 41) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 412 901 324 796 723 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 825 802 649 593 446 4;
- 42) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 825 802 649 593 446 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 651 605 299 186 892 8;
- 43) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 651 605 299 186 892 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 303 210 598 373 785 6;
- 44) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 303 210 598 373 785 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 606 421 196 747 571 2;
- 45) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 606 421 196 747 571 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 212 842 393 495 142 4;
- 46) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 212 842 393 495 142 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 425 684 786 990 284 8;
- 47) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 425 684 786 990 284 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 851 369 573 980 569 6;
- 48) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 851 369 573 980 569 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 353 702 739 147 961 139 2;
- 49) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 353 702 739 147 961 139 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 707 405 478 295 922 278 4;
- 50) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 707 405 478 295 922 278 4 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 414 810 956 591 844 556 8;
- 51) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 414 810 956 591 844 556 8 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 829 621 913 183 689 113 6;
- 52) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 829 621 913 183 689 113 6 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 659 243 826 367 378 227 2;
- 53) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 659 243 826 367 378 227 2 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 318 487 652 734 756 454 4;
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 405 7(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 405 7(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 405 7(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 405 7 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