2.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 37 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 334 37(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 334 37(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 334 37.
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 334 37 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 74;
- 2) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 74 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 48;
- 3) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 48 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 674 96;
- 4) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 674 96 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 349 92;
- 5) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 349 92 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 699 84;
- 6) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 699 84 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 68;
- 7) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 399 68 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 799 36;
- 8) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 799 36 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 598 72;
- 9) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 598 72 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 197 44;
- 10) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 197 44 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 394 88;
- 11) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 394 88 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 789 76;
- 12) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 789 76 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 579 52;
- 13) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 579 52 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 159 04;
- 14) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 159 04 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 318 08;
- 15) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 318 08 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 700 636 16;
- 16) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 700 636 16 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 401 272 32;
- 17) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 401 272 32 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 802 544 64;
- 18) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 802 544 64 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 605 089 28;
- 19) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 605 089 28 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 210 178 56;
- 20) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 210 178 56 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 420 357 12;
- 21) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 420 357 12 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 840 714 24;
- 22) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 840 714 24 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 681 428 48;
- 23) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 681 428 48 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 362 856 96;
- 24) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 362 856 96 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 725 713 92;
- 25) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 350 725 713 92 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 701 451 427 84;
- 26) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 701 451 427 84 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 402 902 855 68;
- 27) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 402 902 855 68 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 805 805 711 36;
- 28) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 805 805 711 36 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 611 611 422 72;
- 29) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 611 611 422 72 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 223 222 845 44;
- 30) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 223 222 845 44 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 446 445 690 88;
- 31) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 446 445 690 88 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 892 891 381 76;
- 32) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 892 891 381 76 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 785 782 763 52;
- 33) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 785 782 763 52 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 571 565 527 04;
- 34) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 571 565 527 04 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 143 131 054 08;
- 35) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 143 131 054 08 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 702 286 262 108 16;
- 36) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 702 286 262 108 16 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 404 572 524 216 32;
- 37) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 404 572 524 216 32 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 809 145 048 432 64;
- 38) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 809 145 048 432 64 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 618 290 096 865 28;
- 39) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 618 290 096 865 28 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 236 580 193 730 56;
- 40) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 236 580 193 730 56 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 473 160 387 461 12;
- 41) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 473 160 387 461 12 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 946 320 774 922 24;
- 42) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 668 946 320 774 922 24 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 892 641 549 844 48;
- 43) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 337 892 641 549 844 48 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 785 283 099 688 96;
- 44) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 675 785 283 099 688 96 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 570 566 199 377 92;
- 45) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 351 570 566 199 377 92 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 703 141 132 398 755 84;
- 46) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 703 141 132 398 755 84 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 406 282 264 797 511 68;
- 47) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 406 282 264 797 511 68 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 812 564 529 595 023 36;
- 48) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 812 564 529 595 023 36 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 625 129 059 190 046 72;
- 49) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 625 129 059 190 046 72 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 250 258 118 380 093 44;
- 50) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 667 250 258 118 380 093 44 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 500 516 236 760 186 88;
- 51) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 334 500 516 236 760 186 88 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 001 032 473 520 373 76;
- 52) 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 669 001 032 473 520 373 76 × 2 = 1 + 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 002 064 947 040 747 52;
- 53) 0.333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 338 002 064 947 040 747 52 × 2 = 0 + 0.666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 666 676 004 129 894 081 495 04;
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 334 37(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 334 37(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 334 37(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 334 37 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