0.000 000 000 000 000 012 345 687 894 558 7 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 000 000 012 345 687 894 558 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
0.000 000 000 000 000 012 345 687 894 558 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: 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 012 345 687 894 558 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.000 000 000 000 000 012 345 687 894 558 7 × 2 = 0 + 0.000 000 000 000 000 024 691 375 789 117 4;
  • 2) 0.000 000 000 000 000 024 691 375 789 117 4 × 2 = 0 + 0.000 000 000 000 000 049 382 751 578 234 8;
  • 3) 0.000 000 000 000 000 049 382 751 578 234 8 × 2 = 0 + 0.000 000 000 000 000 098 765 503 156 469 6;
  • 4) 0.000 000 000 000 000 098 765 503 156 469 6 × 2 = 0 + 0.000 000 000 000 000 197 531 006 312 939 2;
  • 5) 0.000 000 000 000 000 197 531 006 312 939 2 × 2 = 0 + 0.000 000 000 000 000 395 062 012 625 878 4;
  • 6) 0.000 000 000 000 000 395 062 012 625 878 4 × 2 = 0 + 0.000 000 000 000 000 790 124 025 251 756 8;
  • 7) 0.000 000 000 000 000 790 124 025 251 756 8 × 2 = 0 + 0.000 000 000 000 001 580 248 050 503 513 6;
  • 8) 0.000 000 000 000 001 580 248 050 503 513 6 × 2 = 0 + 0.000 000 000 000 003 160 496 101 007 027 2;
  • 9) 0.000 000 000 000 003 160 496 101 007 027 2 × 2 = 0 + 0.000 000 000 000 006 320 992 202 014 054 4;
  • 10) 0.000 000 000 000 006 320 992 202 014 054 4 × 2 = 0 + 0.000 000 000 000 012 641 984 404 028 108 8;
  • 11) 0.000 000 000 000 012 641 984 404 028 108 8 × 2 = 0 + 0.000 000 000 000 025 283 968 808 056 217 6;
  • 12) 0.000 000 000 000 025 283 968 808 056 217 6 × 2 = 0 + 0.000 000 000 000 050 567 937 616 112 435 2;
  • 13) 0.000 000 000 000 050 567 937 616 112 435 2 × 2 = 0 + 0.000 000 000 000 101 135 875 232 224 870 4;
  • 14) 0.000 000 000 000 101 135 875 232 224 870 4 × 2 = 0 + 0.000 000 000 000 202 271 750 464 449 740 8;
  • 15) 0.000 000 000 000 202 271 750 464 449 740 8 × 2 = 0 + 0.000 000 000 000 404 543 500 928 899 481 6;
  • 16) 0.000 000 000 000 404 543 500 928 899 481 6 × 2 = 0 + 0.000 000 000 000 809 087 001 857 798 963 2;
  • 17) 0.000 000 000 000 809 087 001 857 798 963 2 × 2 = 0 + 0.000 000 000 001 618 174 003 715 597 926 4;
  • 18) 0.000 000 000 001 618 174 003 715 597 926 4 × 2 = 0 + 0.000 000 000 003 236 348 007 431 195 852 8;
  • 19) 0.000 000 000 003 236 348 007 431 195 852 8 × 2 = 0 + 0.000 000 000 006 472 696 014 862 391 705 6;
  • 20) 0.000 000 000 006 472 696 014 862 391 705 6 × 2 = 0 + 0.000 000 000 012 945 392 029 724 783 411 2;
  • 21) 0.000 000 000 012 945 392 029 724 783 411 2 × 2 = 0 + 0.000 000 000 025 890 784 059 449 566 822 4;
  • 22) 0.000 000 000 025 890 784 059 449 566 822 4 × 2 = 0 + 0.000 000 000 051 781 568 118 899 133 644 8;
  • 23) 0.000 000 000 051 781 568 118 899 133 644 8 × 2 = 0 + 0.000 000 000 103 563 136 237 798 267 289 6;
  • 24) 0.000 000 000 103 563 136 237 798 267 289 6 × 2 = 0 + 0.000 000 000 207 126 272 475 596 534 579 2;
  • 25) 0.000 000 000 207 126 272 475 596 534 579 2 × 2 = 0 + 0.000 000 000 414 252 544 951 193 069 158 4;
  • 26) 0.000 000 000 414 252 544 951 193 069 158 4 × 2 = 0 + 0.000 000 000 828 505 089 902 386 138 316 8;
  • 27) 0.000 000 000 828 505 089 902 386 138 316 8 × 2 = 0 + 0.000 000 001 657 010 179 804 772 276 633 6;
  • 28) 0.000 000 001 657 010 179 804 772 276 633 6 × 2 = 0 + 0.000 000 003 314 020 359 609 544 553 267 2;
  • 29) 0.000 000 003 314 020 359 609 544 553 267 2 × 2 = 0 + 0.000 000 006 628 040 719 219 089 106 534 4;
  • 30) 0.000 000 006 628 040 719 219 089 106 534 4 × 2 = 0 + 0.000 000 013 256 081 438 438 178 213 068 8;
  • 31) 0.000 000 013 256 081 438 438 178 213 068 8 × 2 = 0 + 0.000 000 026 512 162 876 876 356 426 137 6;
  • 32) 0.000 000 026 512 162 876 876 356 426 137 6 × 2 = 0 + 0.000 000 053 024 325 753 752 712 852 275 2;
  • 33) 0.000 000 053 024 325 753 752 712 852 275 2 × 2 = 0 + 0.000 000 106 048 651 507 505 425 704 550 4;
  • 34) 0.000 000 106 048 651 507 505 425 704 550 4 × 2 = 0 + 0.000 000 212 097 303 015 010 851 409 100 8;
  • 35) 0.000 000 212 097 303 015 010 851 409 100 8 × 2 = 0 + 0.000 000 424 194 606 030 021 702 818 201 6;
  • 36) 0.000 000 424 194 606 030 021 702 818 201 6 × 2 = 0 + 0.000 000 848 389 212 060 043 405 636 403 2;
  • 37) 0.000 000 848 389 212 060 043 405 636 403 2 × 2 = 0 + 0.000 001 696 778 424 120 086 811 272 806 4;
  • 38) 0.000 001 696 778 424 120 086 811 272 806 4 × 2 = 0 + 0.000 003 393 556 848 240 173 622 545 612 8;
  • 39) 0.000 003 393 556 848 240 173 622 545 612 8 × 2 = 0 + 0.000 006 787 113 696 480 347 245 091 225 6;
  • 40) 0.000 006 787 113 696 480 347 245 091 225 6 × 2 = 0 + 0.000 013 574 227 392 960 694 490 182 451 2;
  • 41) 0.000 013 574 227 392 960 694 490 182 451 2 × 2 = 0 + 0.000 027 148 454 785 921 388 980 364 902 4;
  • 42) 0.000 027 148 454 785 921 388 980 364 902 4 × 2 = 0 + 0.000 054 296 909 571 842 777 960 729 804 8;
  • 43) 0.000 054 296 909 571 842 777 960 729 804 8 × 2 = 0 + 0.000 108 593 819 143 685 555 921 459 609 6;
  • 44) 0.000 108 593 819 143 685 555 921 459 609 6 × 2 = 0 + 0.000 217 187 638 287 371 111 842 919 219 2;
  • 45) 0.000 217 187 638 287 371 111 842 919 219 2 × 2 = 0 + 0.000 434 375 276 574 742 223 685 838 438 4;
  • 46) 0.000 434 375 276 574 742 223 685 838 438 4 × 2 = 0 + 0.000 868 750 553 149 484 447 371 676 876 8;
  • 47) 0.000 868 750 553 149 484 447 371 676 876 8 × 2 = 0 + 0.001 737 501 106 298 968 894 743 353 753 6;
  • 48) 0.001 737 501 106 298 968 894 743 353 753 6 × 2 = 0 + 0.003 475 002 212 597 937 789 486 707 507 2;
  • 49) 0.003 475 002 212 597 937 789 486 707 507 2 × 2 = 0 + 0.006 950 004 425 195 875 578 973 415 014 4;
  • 50) 0.006 950 004 425 195 875 578 973 415 014 4 × 2 = 0 + 0.013 900 008 850 391 751 157 946 830 028 8;
  • 51) 0.013 900 008 850 391 751 157 946 830 028 8 × 2 = 0 + 0.027 800 017 700 783 502 315 893 660 057 6;
  • 52) 0.027 800 017 700 783 502 315 893 660 057 6 × 2 = 0 + 0.055 600 035 401 567 004 631 787 320 115 2;
  • 53) 0.055 600 035 401 567 004 631 787 320 115 2 × 2 = 0 + 0.111 200 070 803 134 009 263 574 640 230 4;
  • 54) 0.111 200 070 803 134 009 263 574 640 230 4 × 2 = 0 + 0.222 400 141 606 268 018 527 149 280 460 8;
  • 55) 0.222 400 141 606 268 018 527 149 280 460 8 × 2 = 0 + 0.444 800 283 212 536 037 054 298 560 921 6;
  • 56) 0.444 800 283 212 536 037 054 298 560 921 6 × 2 = 0 + 0.889 600 566 425 072 074 108 597 121 843 2;
  • 57) 0.889 600 566 425 072 074 108 597 121 843 2 × 2 = 1 + 0.779 201 132 850 144 148 217 194 243 686 4;
  • 58) 0.779 201 132 850 144 148 217 194 243 686 4 × 2 = 1 + 0.558 402 265 700 288 296 434 388 487 372 8;
  • 59) 0.558 402 265 700 288 296 434 388 487 372 8 × 2 = 1 + 0.116 804 531 400 576 592 868 776 974 745 6;
  • 60) 0.116 804 531 400 576 592 868 776 974 745 6 × 2 = 0 + 0.233 609 062 801 153 185 737 553 949 491 2;
  • 61) 0.233 609 062 801 153 185 737 553 949 491 2 × 2 = 0 + 0.467 218 125 602 306 371 475 107 898 982 4;
  • 62) 0.467 218 125 602 306 371 475 107 898 982 4 × 2 = 0 + 0.934 436 251 204 612 742 950 215 797 964 8;
  • 63) 0.934 436 251 204 612 742 950 215 797 964 8 × 2 = 1 + 0.868 872 502 409 225 485 900 431 595 929 6;
  • 64) 0.868 872 502 409 225 485 900 431 595 929 6 × 2 = 1 + 0.737 745 004 818 450 971 800 863 191 859 2;
  • 65) 0.737 745 004 818 450 971 800 863 191 859 2 × 2 = 1 + 0.475 490 009 636 901 943 601 726 383 718 4;
  • 66) 0.475 490 009 636 901 943 601 726 383 718 4 × 2 = 0 + 0.950 980 019 273 803 887 203 452 767 436 8;
  • 67) 0.950 980 019 273 803 887 203 452 767 436 8 × 2 = 1 + 0.901 960 038 547 607 774 406 905 534 873 6;
  • 68) 0.901 960 038 547 607 774 406 905 534 873 6 × 2 = 1 + 0.803 920 077 095 215 548 813 811 069 747 2;
  • 69) 0.803 920 077 095 215 548 813 811 069 747 2 × 2 = 1 + 0.607 840 154 190 431 097 627 622 139 494 4;
  • 70) 0.607 840 154 190 431 097 627 622 139 494 4 × 2 = 1 + 0.215 680 308 380 862 195 255 244 278 988 8;
  • 71) 0.215 680 308 380 862 195 255 244 278 988 8 × 2 = 0 + 0.431 360 616 761 724 390 510 488 557 977 6;
  • 72) 0.431 360 616 761 724 390 510 488 557 977 6 × 2 = 0 + 0.862 721 233 523 448 781 020 977 115 955 2;
  • 73) 0.862 721 233 523 448 781 020 977 115 955 2 × 2 = 1 + 0.725 442 467 046 897 562 041 954 231 910 4;
  • 74) 0.725 442 467 046 897 562 041 954 231 910 4 × 2 = 1 + 0.450 884 934 093 795 124 083 908 463 820 8;
  • 75) 0.450 884 934 093 795 124 083 908 463 820 8 × 2 = 0 + 0.901 769 868 187 590 248 167 816 927 641 6;
  • 76) 0.901 769 868 187 590 248 167 816 927 641 6 × 2 = 1 + 0.803 539 736 375 180 496 335 633 855 283 2;
  • 77) 0.803 539 736 375 180 496 335 633 855 283 2 × 2 = 1 + 0.607 079 472 750 360 992 671 267 710 566 4;
  • 78) 0.607 079 472 750 360 992 671 267 710 566 4 × 2 = 1 + 0.214 158 945 500 721 985 342 535 421 132 8;
  • 79) 0.214 158 945 500 721 985 342 535 421 132 8 × 2 = 0 + 0.428 317 891 001 443 970 685 070 842 265 6;
  • 80) 0.428 317 891 001 443 970 685 070 842 265 6 × 2 = 0 + 0.856 635 782 002 887 941 370 141 684 531 2;
  • 81) 0.856 635 782 002 887 941 370 141 684 531 2 × 2 = 1 + 0.713 271 564 005 775 882 740 283 369 062 4;
  • 82) 0.713 271 564 005 775 882 740 283 369 062 4 × 2 = 1 + 0.426 543 128 011 551 765 480 566 738 124 8;
  • 83) 0.426 543 128 011 551 765 480 566 738 124 8 × 2 = 0 + 0.853 086 256 023 103 530 961 133 476 249 6;
  • 84) 0.853 086 256 023 103 530 961 133 476 249 6 × 2 = 1 + 0.706 172 512 046 207 061 922 266 952 499 2;
  • 85) 0.706 172 512 046 207 061 922 266 952 499 2 × 2 = 1 + 0.412 345 024 092 414 123 844 533 904 998 4;
  • 86) 0.412 345 024 092 414 123 844 533 904 998 4 × 2 = 0 + 0.824 690 048 184 828 247 689 067 809 996 8;
  • 87) 0.824 690 048 184 828 247 689 067 809 996 8 × 2 = 1 + 0.649 380 096 369 656 495 378 135 619 993 6;
  • 88) 0.649 380 096 369 656 495 378 135 619 993 6 × 2 = 1 + 0.298 760 192 739 312 990 756 271 239 987 2;
  • 89) 0.298 760 192 739 312 990 756 271 239 987 2 × 2 = 0 + 0.597 520 385 478 625 981 512 542 479 974 4;
  • 90) 0.597 520 385 478 625 981 512 542 479 974 4 × 2 = 1 + 0.195 040 770 957 251 963 025 084 959 948 8;
  • 91) 0.195 040 770 957 251 963 025 084 959 948 8 × 2 = 0 + 0.390 081 541 914 503 926 050 169 919 897 6;
  • 92) 0.390 081 541 914 503 926 050 169 919 897 6 × 2 = 0 + 0.780 163 083 829 007 852 100 339 839 795 2;
  • 93) 0.780 163 083 829 007 852 100 339 839 795 2 × 2 = 1 + 0.560 326 167 658 015 704 200 679 679 590 4;
  • 94) 0.560 326 167 658 015 704 200 679 679 590 4 × 2 = 1 + 0.120 652 335 316 031 408 401 359 359 180 8;
  • 95) 0.120 652 335 316 031 408 401 359 359 180 8 × 2 = 0 + 0.241 304 670 632 062 816 802 718 718 361 6;
  • 96) 0.241 304 670 632 062 816 802 718 718 361 6 × 2 = 0 + 0.482 609 341 264 125 633 605 437 436 723 2;
  • 97) 0.482 609 341 264 125 633 605 437 436 723 2 × 2 = 0 + 0.965 218 682 528 251 267 210 874 873 446 4;
  • 98) 0.965 218 682 528 251 267 210 874 873 446 4 × 2 = 1 + 0.930 437 365 056 502 534 421 749 746 892 8;
  • 99) 0.930 437 365 056 502 534 421 749 746 892 8 × 2 = 1 + 0.860 874 730 113 005 068 843 499 493 785 6;
  • 100) 0.860 874 730 113 005 068 843 499 493 785 6 × 2 = 1 + 0.721 749 460 226 010 137 686 998 987 571 2;
  • 101) 0.721 749 460 226 010 137 686 998 987 571 2 × 2 = 1 + 0.443 498 920 452 020 275 373 997 975 142 4;
  • 102) 0.443 498 920 452 020 275 373 997 975 142 4 × 2 = 0 + 0.886 997 840 904 040 550 747 995 950 284 8;
  • 103) 0.886 997 840 904 040 550 747 995 950 284 8 × 2 = 1 + 0.773 995 681 808 081 101 495 991 900 569 6;
  • 104) 0.773 995 681 808 081 101 495 991 900 569 6 × 2 = 1 + 0.547 991 363 616 162 202 991 983 801 139 2;
  • 105) 0.547 991 363 616 162 202 991 983 801 139 2 × 2 = 1 + 0.095 982 727 232 324 405 983 967 602 278 4;
  • 106) 0.095 982 727 232 324 405 983 967 602 278 4 × 2 = 0 + 0.191 965 454 464 648 811 967 935 204 556 8;
  • 107) 0.191 965 454 464 648 811 967 935 204 556 8 × 2 = 0 + 0.383 930 908 929 297 623 935 870 409 113 6;
  • 108) 0.383 930 908 929 297 623 935 870 409 113 6 × 2 = 0 + 0.767 861 817 858 595 247 871 740 818 227 2;
  • 109) 0.767 861 817 858 595 247 871 740 818 227 2 × 2 = 1 + 0.535 723 635 717 190 495 743 481 636 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.000 000 000 000 000 012 345 687 894 558 7(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1110 0011 1011 1100 1101 1100 1101 1011 0100 1100 0111 1011 1000 1(2)

5. Positive number before normalization:

0.000 000 000 000 000 012 345 687 894 558 7(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1110 0011 1011 1100 1101 1100 1101 1011 0100 1100 0111 1011 1000 1(2)

6. Normalize the binary representation of the number.

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


0.000 000 000 000 000 012 345 687 894 558 7(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1110 0011 1011 1100 1101 1100 1101 1011 0100 1100 0111 1011 1000 1(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1110 0011 1011 1100 1101 1100 1101 1011 0100 1100 0111 1011 1000 1(2) × 20 =


1.1100 0111 0111 1001 1011 1001 1011 0110 1001 1000 1111 0111 0001(2) × 2-57


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


Mantissa (not normalized):
1.1100 0111 0111 1001 1011 1001 1011 0110 1001 1000 1111 0111 0001


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


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


(-57 + 1 023)(10) =


966(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;
  • 966 ÷ 2 = 483 + 0;
  • 483 ÷ 2 = 241 + 1;
  • 241 ÷ 2 = 120 + 1;
  • 120 ÷ 2 = 60 + 0;
  • 60 ÷ 2 = 30 + 0;
  • 30 ÷ 2 = 15 + 0;
  • 15 ÷ 2 = 7 + 1;
  • 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) =


966(10) =


011 1100 0110(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. 1100 0111 0111 1001 1011 1001 1011 0110 1001 1000 1111 0111 0001 =


1100 0111 0111 1001 1011 1001 1011 0110 1001 1000 1111 0111 0001


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 1100 0110


Mantissa (52 bits) =
1100 0111 0111 1001 1011 1001 1011 0110 1001 1000 1111 0111 0001


Decimal number 0.000 000 000 000 000 012 345 687 894 558 7 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 011 1100 0110 - 1100 0111 0111 1001 1011 1001 1011 0110 1001 1000 1111 0111 0001


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