0.000 000 000 000 000 000 045 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 000 000 000 045(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.000 000 000 000 000 000 045(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.000 000 000 000 000 000 045.

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 045 × 2 = 0 + 0.000 000 000 000 000 000 09;
  • 2) 0.000 000 000 000 000 000 09 × 2 = 0 + 0.000 000 000 000 000 000 18;
  • 3) 0.000 000 000 000 000 000 18 × 2 = 0 + 0.000 000 000 000 000 000 36;
  • 4) 0.000 000 000 000 000 000 36 × 2 = 0 + 0.000 000 000 000 000 000 72;
  • 5) 0.000 000 000 000 000 000 72 × 2 = 0 + 0.000 000 000 000 000 001 44;
  • 6) 0.000 000 000 000 000 001 44 × 2 = 0 + 0.000 000 000 000 000 002 88;
  • 7) 0.000 000 000 000 000 002 88 × 2 = 0 + 0.000 000 000 000 000 005 76;
  • 8) 0.000 000 000 000 000 005 76 × 2 = 0 + 0.000 000 000 000 000 011 52;
  • 9) 0.000 000 000 000 000 011 52 × 2 = 0 + 0.000 000 000 000 000 023 04;
  • 10) 0.000 000 000 000 000 023 04 × 2 = 0 + 0.000 000 000 000 000 046 08;
  • 11) 0.000 000 000 000 000 046 08 × 2 = 0 + 0.000 000 000 000 000 092 16;
  • 12) 0.000 000 000 000 000 092 16 × 2 = 0 + 0.000 000 000 000 000 184 32;
  • 13) 0.000 000 000 000 000 184 32 × 2 = 0 + 0.000 000 000 000 000 368 64;
  • 14) 0.000 000 000 000 000 368 64 × 2 = 0 + 0.000 000 000 000 000 737 28;
  • 15) 0.000 000 000 000 000 737 28 × 2 = 0 + 0.000 000 000 000 001 474 56;
  • 16) 0.000 000 000 000 001 474 56 × 2 = 0 + 0.000 000 000 000 002 949 12;
  • 17) 0.000 000 000 000 002 949 12 × 2 = 0 + 0.000 000 000 000 005 898 24;
  • 18) 0.000 000 000 000 005 898 24 × 2 = 0 + 0.000 000 000 000 011 796 48;
  • 19) 0.000 000 000 000 011 796 48 × 2 = 0 + 0.000 000 000 000 023 592 96;
  • 20) 0.000 000 000 000 023 592 96 × 2 = 0 + 0.000 000 000 000 047 185 92;
  • 21) 0.000 000 000 000 047 185 92 × 2 = 0 + 0.000 000 000 000 094 371 84;
  • 22) 0.000 000 000 000 094 371 84 × 2 = 0 + 0.000 000 000 000 188 743 68;
  • 23) 0.000 000 000 000 188 743 68 × 2 = 0 + 0.000 000 000 000 377 487 36;
  • 24) 0.000 000 000 000 377 487 36 × 2 = 0 + 0.000 000 000 000 754 974 72;
  • 25) 0.000 000 000 000 754 974 72 × 2 = 0 + 0.000 000 000 001 509 949 44;
  • 26) 0.000 000 000 001 509 949 44 × 2 = 0 + 0.000 000 000 003 019 898 88;
  • 27) 0.000 000 000 003 019 898 88 × 2 = 0 + 0.000 000 000 006 039 797 76;
  • 28) 0.000 000 000 006 039 797 76 × 2 = 0 + 0.000 000 000 012 079 595 52;
  • 29) 0.000 000 000 012 079 595 52 × 2 = 0 + 0.000 000 000 024 159 191 04;
  • 30) 0.000 000 000 024 159 191 04 × 2 = 0 + 0.000 000 000 048 318 382 08;
  • 31) 0.000 000 000 048 318 382 08 × 2 = 0 + 0.000 000 000 096 636 764 16;
  • 32) 0.000 000 000 096 636 764 16 × 2 = 0 + 0.000 000 000 193 273 528 32;
  • 33) 0.000 000 000 193 273 528 32 × 2 = 0 + 0.000 000 000 386 547 056 64;
  • 34) 0.000 000 000 386 547 056 64 × 2 = 0 + 0.000 000 000 773 094 113 28;
  • 35) 0.000 000 000 773 094 113 28 × 2 = 0 + 0.000 000 001 546 188 226 56;
  • 36) 0.000 000 001 546 188 226 56 × 2 = 0 + 0.000 000 003 092 376 453 12;
  • 37) 0.000 000 003 092 376 453 12 × 2 = 0 + 0.000 000 006 184 752 906 24;
  • 38) 0.000 000 006 184 752 906 24 × 2 = 0 + 0.000 000 012 369 505 812 48;
  • 39) 0.000 000 012 369 505 812 48 × 2 = 0 + 0.000 000 024 739 011 624 96;
  • 40) 0.000 000 024 739 011 624 96 × 2 = 0 + 0.000 000 049 478 023 249 92;
  • 41) 0.000 000 049 478 023 249 92 × 2 = 0 + 0.000 000 098 956 046 499 84;
  • 42) 0.000 000 098 956 046 499 84 × 2 = 0 + 0.000 000 197 912 092 999 68;
  • 43) 0.000 000 197 912 092 999 68 × 2 = 0 + 0.000 000 395 824 185 999 36;
  • 44) 0.000 000 395 824 185 999 36 × 2 = 0 + 0.000 000 791 648 371 998 72;
  • 45) 0.000 000 791 648 371 998 72 × 2 = 0 + 0.000 001 583 296 743 997 44;
  • 46) 0.000 001 583 296 743 997 44 × 2 = 0 + 0.000 003 166 593 487 994 88;
  • 47) 0.000 003 166 593 487 994 88 × 2 = 0 + 0.000 006 333 186 975 989 76;
  • 48) 0.000 006 333 186 975 989 76 × 2 = 0 + 0.000 012 666 373 951 979 52;
  • 49) 0.000 012 666 373 951 979 52 × 2 = 0 + 0.000 025 332 747 903 959 04;
  • 50) 0.000 025 332 747 903 959 04 × 2 = 0 + 0.000 050 665 495 807 918 08;
  • 51) 0.000 050 665 495 807 918 08 × 2 = 0 + 0.000 101 330 991 615 836 16;
  • 52) 0.000 101 330 991 615 836 16 × 2 = 0 + 0.000 202 661 983 231 672 32;
  • 53) 0.000 202 661 983 231 672 32 × 2 = 0 + 0.000 405 323 966 463 344 64;
  • 54) 0.000 405 323 966 463 344 64 × 2 = 0 + 0.000 810 647 932 926 689 28;
  • 55) 0.000 810 647 932 926 689 28 × 2 = 0 + 0.001 621 295 865 853 378 56;
  • 56) 0.001 621 295 865 853 378 56 × 2 = 0 + 0.003 242 591 731 706 757 12;
  • 57) 0.003 242 591 731 706 757 12 × 2 = 0 + 0.006 485 183 463 413 514 24;
  • 58) 0.006 485 183 463 413 514 24 × 2 = 0 + 0.012 970 366 926 827 028 48;
  • 59) 0.012 970 366 926 827 028 48 × 2 = 0 + 0.025 940 733 853 654 056 96;
  • 60) 0.025 940 733 853 654 056 96 × 2 = 0 + 0.051 881 467 707 308 113 92;
  • 61) 0.051 881 467 707 308 113 92 × 2 = 0 + 0.103 762 935 414 616 227 84;
  • 62) 0.103 762 935 414 616 227 84 × 2 = 0 + 0.207 525 870 829 232 455 68;
  • 63) 0.207 525 870 829 232 455 68 × 2 = 0 + 0.415 051 741 658 464 911 36;
  • 64) 0.415 051 741 658 464 911 36 × 2 = 0 + 0.830 103 483 316 929 822 72;
  • 65) 0.830 103 483 316 929 822 72 × 2 = 1 + 0.660 206 966 633 859 645 44;
  • 66) 0.660 206 966 633 859 645 44 × 2 = 1 + 0.320 413 933 267 719 290 88;
  • 67) 0.320 413 933 267 719 290 88 × 2 = 0 + 0.640 827 866 535 438 581 76;
  • 68) 0.640 827 866 535 438 581 76 × 2 = 1 + 0.281 655 733 070 877 163 52;
  • 69) 0.281 655 733 070 877 163 52 × 2 = 0 + 0.563 311 466 141 754 327 04;
  • 70) 0.563 311 466 141 754 327 04 × 2 = 1 + 0.126 622 932 283 508 654 08;
  • 71) 0.126 622 932 283 508 654 08 × 2 = 0 + 0.253 245 864 567 017 308 16;
  • 72) 0.253 245 864 567 017 308 16 × 2 = 0 + 0.506 491 729 134 034 616 32;
  • 73) 0.506 491 729 134 034 616 32 × 2 = 1 + 0.012 983 458 268 069 232 64;
  • 74) 0.012 983 458 268 069 232 64 × 2 = 0 + 0.025 966 916 536 138 465 28;
  • 75) 0.025 966 916 536 138 465 28 × 2 = 0 + 0.051 933 833 072 276 930 56;
  • 76) 0.051 933 833 072 276 930 56 × 2 = 0 + 0.103 867 666 144 553 861 12;
  • 77) 0.103 867 666 144 553 861 12 × 2 = 0 + 0.207 735 332 289 107 722 24;
  • 78) 0.207 735 332 289 107 722 24 × 2 = 0 + 0.415 470 664 578 215 444 48;
  • 79) 0.415 470 664 578 215 444 48 × 2 = 0 + 0.830 941 329 156 430 888 96;
  • 80) 0.830 941 329 156 430 888 96 × 2 = 1 + 0.661 882 658 312 861 777 92;
  • 81) 0.661 882 658 312 861 777 92 × 2 = 1 + 0.323 765 316 625 723 555 84;
  • 82) 0.323 765 316 625 723 555 84 × 2 = 0 + 0.647 530 633 251 447 111 68;
  • 83) 0.647 530 633 251 447 111 68 × 2 = 1 + 0.295 061 266 502 894 223 36;
  • 84) 0.295 061 266 502 894 223 36 × 2 = 0 + 0.590 122 533 005 788 446 72;
  • 85) 0.590 122 533 005 788 446 72 × 2 = 1 + 0.180 245 066 011 576 893 44;
  • 86) 0.180 245 066 011 576 893 44 × 2 = 0 + 0.360 490 132 023 153 786 88;
  • 87) 0.360 490 132 023 153 786 88 × 2 = 0 + 0.720 980 264 046 307 573 76;
  • 88) 0.720 980 264 046 307 573 76 × 2 = 1 + 0.441 960 528 092 615 147 52;
  • 89) 0.441 960 528 092 615 147 52 × 2 = 0 + 0.883 921 056 185 230 295 04;
  • 90) 0.883 921 056 185 230 295 04 × 2 = 1 + 0.767 842 112 370 460 590 08;
  • 91) 0.767 842 112 370 460 590 08 × 2 = 1 + 0.535 684 224 740 921 180 16;
  • 92) 0.535 684 224 740 921 180 16 × 2 = 1 + 0.071 368 449 481 842 360 32;
  • 93) 0.071 368 449 481 842 360 32 × 2 = 0 + 0.142 736 898 963 684 720 64;
  • 94) 0.142 736 898 963 684 720 64 × 2 = 0 + 0.285 473 797 927 369 441 28;
  • 95) 0.285 473 797 927 369 441 28 × 2 = 0 + 0.570 947 595 854 738 882 56;
  • 96) 0.570 947 595 854 738 882 56 × 2 = 1 + 0.141 895 191 709 477 765 12;
  • 97) 0.141 895 191 709 477 765 12 × 2 = 0 + 0.283 790 383 418 955 530 24;
  • 98) 0.283 790 383 418 955 530 24 × 2 = 0 + 0.567 580 766 837 911 060 48;
  • 99) 0.567 580 766 837 911 060 48 × 2 = 1 + 0.135 161 533 675 822 120 96;
  • 100) 0.135 161 533 675 822 120 96 × 2 = 0 + 0.270 323 067 351 644 241 92;
  • 101) 0.270 323 067 351 644 241 92 × 2 = 0 + 0.540 646 134 703 288 483 84;
  • 102) 0.540 646 134 703 288 483 84 × 2 = 1 + 0.081 292 269 406 576 967 68;
  • 103) 0.081 292 269 406 576 967 68 × 2 = 0 + 0.162 584 538 813 153 935 36;
  • 104) 0.162 584 538 813 153 935 36 × 2 = 0 + 0.325 169 077 626 307 870 72;
  • 105) 0.325 169 077 626 307 870 72 × 2 = 0 + 0.650 338 155 252 615 741 44;
  • 106) 0.650 338 155 252 615 741 44 × 2 = 1 + 0.300 676 310 505 231 482 88;
  • 107) 0.300 676 310 505 231 482 88 × 2 = 0 + 0.601 352 621 010 462 965 76;
  • 108) 0.601 352 621 010 462 965 76 × 2 = 1 + 0.202 705 242 020 925 931 52;
  • 109) 0.202 705 242 020 925 931 52 × 2 = 0 + 0.405 410 484 041 851 863 04;
  • 110) 0.405 410 484 041 851 863 04 × 2 = 0 + 0.810 820 968 083 703 726 08;
  • 111) 0.810 820 968 083 703 726 08 × 2 = 1 + 0.621 641 936 167 407 452 16;
  • 112) 0.621 641 936 167 407 452 16 × 2 = 1 + 0.243 283 872 334 814 904 32;
  • 113) 0.243 283 872 334 814 904 32 × 2 = 0 + 0.486 567 744 669 629 808 64;
  • 114) 0.486 567 744 669 629 808 64 × 2 = 0 + 0.973 135 489 339 259 617 28;
  • 115) 0.973 135 489 339 259 617 28 × 2 = 1 + 0.946 270 978 678 519 234 56;
  • 116) 0.946 270 978 678 519 234 56 × 2 = 1 + 0.892 541 957 357 038 469 12;
  • 117) 0.892 541 957 357 038 469 12 × 2 = 1 + 0.785 083 914 714 076 938 24;

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 045(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1101 0100 1000 0001 1010 1001 0111 0001 0010 0100 0101 0011 0011 1(2)

5. Positive number before normalization:

0.000 000 000 000 000 000 045(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1101 0100 1000 0001 1010 1001 0111 0001 0010 0100 0101 0011 0011 1(2)

6. Normalize the binary representation of the number.

Shift the decimal mark 65 positions to the right, so that only one non zero digit remains to the left of it:


0.000 000 000 000 000 000 045(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1101 0100 1000 0001 1010 1001 0111 0001 0010 0100 0101 0011 0011 1(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1101 0100 1000 0001 1010 1001 0111 0001 0010 0100 0101 0011 0011 1(2) × 20 =


1.1010 1001 0000 0011 0101 0010 1110 0010 0100 1000 1010 0110 0111(2) × 2-65


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): -65


Mantissa (not normalized):
1.1010 1001 0000 0011 0101 0010 1110 0010 0100 1000 1010 0110 0111


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


Exponent (unadjusted) + 2(11-1) - 1 =


-65 + 2(11-1) - 1 =


(-65 + 1 023)(10) =


958(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;
  • 958 ÷ 2 = 479 + 0;
  • 479 ÷ 2 = 239 + 1;
  • 239 ÷ 2 = 119 + 1;
  • 119 ÷ 2 = 59 + 1;
  • 59 ÷ 2 = 29 + 1;
  • 29 ÷ 2 = 14 + 1;
  • 14 ÷ 2 = 7 + 0;
  • 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) =


958(10) =


011 1011 1110(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. 1010 1001 0000 0011 0101 0010 1110 0010 0100 1000 1010 0110 0111 =


1010 1001 0000 0011 0101 0010 1110 0010 0100 1000 1010 0110 0111


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 1011 1110


Mantissa (52 bits) =
1010 1001 0000 0011 0101 0010 1110 0010 0100 1000 1010 0110 0111


Decimal number 0.000 000 000 000 000 000 045 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 011 1011 1110 - 1010 1001 0000 0011 0101 0010 1110 0010 0100 1000 1010 0110 0111


How to convert numbers from the decimal system (base ten) to 64 bit double precision IEEE 754 binary floating point standard

Follow the steps below to convert a base 10 decimal number to 64 bit double precision IEEE 754 binary floating point:

  • 1. If the number to be converted is negative, start with its the positive version.
  • 2. First convert the integer part. Divide repeatedly by 2 the positive representation of the integer number that is to be converted to binary, until we get a quotient that is equal to zero, keeping track of each remainder.
  • 3. Construct the base 2 representation of the positive integer part of the number, by taking all the remainders from the previous operations, starting from the bottom of the list constructed above. Thus, the last remainder of the divisions becomes the first symbol (the leftmost) of the base two number, while the first remainder becomes the last symbol (the rightmost).
  • 4. Then convert the fractional part. Multiply the number repeatedly by 2, until we get a fractional part that is equal to zero, keeping track of each integer part of the results.
  • 5. Construct the base 2 representation of the fractional part of the number, by taking all the integer parts of the multiplying operations, starting from the top of the list constructed above (they should appear in the binary representation, from left to right, in the order they have been calculated).
  • 6. Normalize the binary representation of the number, shifting the decimal mark (the decimal point) "n" positions either to the left, or to the right, so that only one non zero digit remains to the left of the decimal mark.
  • 7. Adjust the exponent in 11 bit excess/bias notation and then convert it from decimal (base 10) to 11 bit binary, by using the same technique of repeatedly dividing by 2, as shown above:
    Exponent (adjusted) = Exponent (unadjusted) + 2(11-1) - 1
  • 8. Normalize mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal mark, if the case) and adjust its length to 52 bits, either by removing the excess bits from the right (losing precision...) or by adding extra bits set on '0' to the right.
  • 9. Sign (it takes 1 bit) is either 1 for a negative or 0 for a positive number.

Example: convert the negative number -31.640 215 from the decimal system (base ten) to 64 bit double precision IEEE 754 binary floating point:

  • 1. Start with the positive version of the number:

    |-31.640 215| = 31.640 215

  • 2. First convert the integer part, 31. Divide it repeatedly by 2, keeping track of each remainder, until we get a quotient that is equal to zero:
    • division = quotient + remainder;
    • 31 ÷ 2 = 15 + 1;
    • 15 ÷ 2 = 7 + 1;
    • 7 ÷ 2 = 3 + 1;
    • 3 ÷ 2 = 1 + 1;
    • 1 ÷ 2 = 0 + 1;
    • We have encountered a quotient that is ZERO => FULL STOP
  • 3. Construct the base 2 representation of the integer part of the number by taking all the remainders of the previous dividing operations, starting from the bottom of the list constructed above:

    31(10) = 1 1111(2)

  • 4. Then, convert the fractional part, 0.640 215. Multiply repeatedly by 2, keeping track of each integer part of the results, until we get a fractional part that is equal to zero:
    • #) multiplying = integer + fractional part;
    • 1) 0.640 215 × 2 = 1 + 0.280 43;
    • 2) 0.280 43 × 2 = 0 + 0.560 86;
    • 3) 0.560 86 × 2 = 1 + 0.121 72;
    • 4) 0.121 72 × 2 = 0 + 0.243 44;
    • 5) 0.243 44 × 2 = 0 + 0.486 88;
    • 6) 0.486 88 × 2 = 0 + 0.973 76;
    • 7) 0.973 76 × 2 = 1 + 0.947 52;
    • 8) 0.947 52 × 2 = 1 + 0.895 04;
    • 9) 0.895 04 × 2 = 1 + 0.790 08;
    • 10) 0.790 08 × 2 = 1 + 0.580 16;
    • 11) 0.580 16 × 2 = 1 + 0.160 32;
    • 12) 0.160 32 × 2 = 0 + 0.320 64;
    • 13) 0.320 64 × 2 = 0 + 0.641 28;
    • 14) 0.641 28 × 2 = 1 + 0.282 56;
    • 15) 0.282 56 × 2 = 0 + 0.565 12;
    • 16) 0.565 12 × 2 = 1 + 0.130 24;
    • 17) 0.130 24 × 2 = 0 + 0.260 48;
    • 18) 0.260 48 × 2 = 0 + 0.520 96;
    • 19) 0.520 96 × 2 = 1 + 0.041 92;
    • 20) 0.041 92 × 2 = 0 + 0.083 84;
    • 21) 0.083 84 × 2 = 0 + 0.167 68;
    • 22) 0.167 68 × 2 = 0 + 0.335 36;
    • 23) 0.335 36 × 2 = 0 + 0.670 72;
    • 24) 0.670 72 × 2 = 1 + 0.341 44;
    • 25) 0.341 44 × 2 = 0 + 0.682 88;
    • 26) 0.682 88 × 2 = 1 + 0.365 76;
    • 27) 0.365 76 × 2 = 0 + 0.731 52;
    • 28) 0.731 52 × 2 = 1 + 0.463 04;
    • 29) 0.463 04 × 2 = 0 + 0.926 08;
    • 30) 0.926 08 × 2 = 1 + 0.852 16;
    • 31) 0.852 16 × 2 = 1 + 0.704 32;
    • 32) 0.704 32 × 2 = 1 + 0.408 64;
    • 33) 0.408 64 × 2 = 0 + 0.817 28;
    • 34) 0.817 28 × 2 = 1 + 0.634 56;
    • 35) 0.634 56 × 2 = 1 + 0.269 12;
    • 36) 0.269 12 × 2 = 0 + 0.538 24;
    • 37) 0.538 24 × 2 = 1 + 0.076 48;
    • 38) 0.076 48 × 2 = 0 + 0.152 96;
    • 39) 0.152 96 × 2 = 0 + 0.305 92;
    • 40) 0.305 92 × 2 = 0 + 0.611 84;
    • 41) 0.611 84 × 2 = 1 + 0.223 68;
    • 42) 0.223 68 × 2 = 0 + 0.447 36;
    • 43) 0.447 36 × 2 = 0 + 0.894 72;
    • 44) 0.894 72 × 2 = 1 + 0.789 44;
    • 45) 0.789 44 × 2 = 1 + 0.578 88;
    • 46) 0.578 88 × 2 = 1 + 0.157 76;
    • 47) 0.157 76 × 2 = 0 + 0.315 52;
    • 48) 0.315 52 × 2 = 0 + 0.631 04;
    • 49) 0.631 04 × 2 = 1 + 0.262 08;
    • 50) 0.262 08 × 2 = 0 + 0.524 16;
    • 51) 0.524 16 × 2 = 1 + 0.048 32;
    • 52) 0.048 32 × 2 = 0 + 0.096 64;
    • 53) 0.096 64 × 2 = 0 + 0.193 28;
    • We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit = 52) and at least one integer part that was different from zero => FULL STOP (losing precision...).
  • 5. Construct the base 2 representation of the fractional part of the number, by taking all the integer parts of the previous multiplying operations, starting from the top of the constructed list above:

    0.640 215(10) = 0.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2)

  • 6. Summarizing - the positive number before normalization:

    31.640 215(10) = 1 1111.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2)

  • 7. Normalize the binary representation of the number, shifting the decimal mark 4 positions to the left so that only one non-zero digit stays to the left of the decimal mark:

    31.640 215(10) =
    1 1111.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2) =
    1 1111.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2) × 20 =
    1.1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2) × 24

  • 8. 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: 1 (a negative number)

    Exponent (unadjusted): 4

    Mantissa (not-normalized): 1.1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0

  • 9. Adjust the exponent in 11 bit excess/bias notation and then convert it from decimal (base 10) to 11 bit binary (base 2), by using the same technique of repeatedly dividing it by 2, as shown above:

    Exponent (adjusted) = Exponent (unadjusted) + 2(11-1) - 1 = (4 + 1023)(10) = 1027(10) =
    100 0000 0011(2)

  • 10. Normalize mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal sign) and adjust its length to 52 bits, by removing the excess bits, from the right (losing precision...):

    Mantissa (not-normalized): 1.1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0

    Mantissa (normalized): 1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100

  • Conclusion:

    Sign (1 bit) = 1 (a negative number)

    Exponent (8 bits) = 100 0000 0011

    Mantissa (52 bits) = 1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100

  • Number -31.640 215, converted from decimal system (base 10) to 64 bit double precision IEEE 754 binary floating point =
    1 - 100 0000 0011 - 1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100