Convert 1 110 001 010 101 010 000 011 000 110 010 011 001 to 64 Bit Double Precision IEEE 754 Binary Floating Point Standard, From a Number in Base 10 Decimal System

How to convert the decimal number 1 110 001 010 101 010 000 011 000 110 010 011 001(10)
to
64 bit double precision IEEE 754 binary floating point
(1 bit for sign, 11 bits for exponent, 52 bits for mantissa)

1. Divide the number repeatedly by 2, keeping track of each remainder, until we get a quotient that is equal to zero:

  • division = quotient + remainder;
  • 1 110 001 010 101 010 000 011 000 110 010 011 001 ÷ 2 = 555 000 505 050 505 000 005 500 055 005 005 500 + 1;
  • 555 000 505 050 505 000 005 500 055 005 005 500 ÷ 2 = 277 500 252 525 252 500 002 750 027 502 502 750 + 0;
  • 277 500 252 525 252 500 002 750 027 502 502 750 ÷ 2 = 138 750 126 262 626 250 001 375 013 751 251 375 + 0;
  • 138 750 126 262 626 250 001 375 013 751 251 375 ÷ 2 = 69 375 063 131 313 125 000 687 506 875 625 687 + 1;
  • 69 375 063 131 313 125 000 687 506 875 625 687 ÷ 2 = 34 687 531 565 656 562 500 343 753 437 812 843 + 1;
  • 34 687 531 565 656 562 500 343 753 437 812 843 ÷ 2 = 17 343 765 782 828 281 250 171 876 718 906 421 + 1;
  • 17 343 765 782 828 281 250 171 876 718 906 421 ÷ 2 = 8 671 882 891 414 140 625 085 938 359 453 210 + 1;
  • 8 671 882 891 414 140 625 085 938 359 453 210 ÷ 2 = 4 335 941 445 707 070 312 542 969 179 726 605 + 0;
  • 4 335 941 445 707 070 312 542 969 179 726 605 ÷ 2 = 2 167 970 722 853 535 156 271 484 589 863 302 + 1;
  • 2 167 970 722 853 535 156 271 484 589 863 302 ÷ 2 = 1 083 985 361 426 767 578 135 742 294 931 651 + 0;
  • 1 083 985 361 426 767 578 135 742 294 931 651 ÷ 2 = 541 992 680 713 383 789 067 871 147 465 825 + 1;
  • 541 992 680 713 383 789 067 871 147 465 825 ÷ 2 = 270 996 340 356 691 894 533 935 573 732 912 + 1;
  • 270 996 340 356 691 894 533 935 573 732 912 ÷ 2 = 135 498 170 178 345 947 266 967 786 866 456 + 0;
  • 135 498 170 178 345 947 266 967 786 866 456 ÷ 2 = 67 749 085 089 172 973 633 483 893 433 228 + 0;
  • 67 749 085 089 172 973 633 483 893 433 228 ÷ 2 = 33 874 542 544 586 486 816 741 946 716 614 + 0;
  • 33 874 542 544 586 486 816 741 946 716 614 ÷ 2 = 16 937 271 272 293 243 408 370 973 358 307 + 0;
  • 16 937 271 272 293 243 408 370 973 358 307 ÷ 2 = 8 468 635 636 146 621 704 185 486 679 153 + 1;
  • 8 468 635 636 146 621 704 185 486 679 153 ÷ 2 = 4 234 317 818 073 310 852 092 743 339 576 + 1;
  • 4 234 317 818 073 310 852 092 743 339 576 ÷ 2 = 2 117 158 909 036 655 426 046 371 669 788 + 0;
  • 2 117 158 909 036 655 426 046 371 669 788 ÷ 2 = 1 058 579 454 518 327 713 023 185 834 894 + 0;
  • 1 058 579 454 518 327 713 023 185 834 894 ÷ 2 = 529 289 727 259 163 856 511 592 917 447 + 0;
  • 529 289 727 259 163 856 511 592 917 447 ÷ 2 = 264 644 863 629 581 928 255 796 458 723 + 1;
  • 264 644 863 629 581 928 255 796 458 723 ÷ 2 = 132 322 431 814 790 964 127 898 229 361 + 1;
  • 132 322 431 814 790 964 127 898 229 361 ÷ 2 = 66 161 215 907 395 482 063 949 114 680 + 1;
  • 66 161 215 907 395 482 063 949 114 680 ÷ 2 = 33 080 607 953 697 741 031 974 557 340 + 0;
  • 33 080 607 953 697 741 031 974 557 340 ÷ 2 = 16 540 303 976 848 870 515 987 278 670 + 0;
  • 16 540 303 976 848 870 515 987 278 670 ÷ 2 = 8 270 151 988 424 435 257 993 639 335 + 0;
  • 8 270 151 988 424 435 257 993 639 335 ÷ 2 = 4 135 075 994 212 217 628 996 819 667 + 1;
  • 4 135 075 994 212 217 628 996 819 667 ÷ 2 = 2 067 537 997 106 108 814 498 409 833 + 1;
  • 2 067 537 997 106 108 814 498 409 833 ÷ 2 = 1 033 768 998 553 054 407 249 204 916 + 1;
  • 1 033 768 998 553 054 407 249 204 916 ÷ 2 = 516 884 499 276 527 203 624 602 458 + 0;
  • 516 884 499 276 527 203 624 602 458 ÷ 2 = 258 442 249 638 263 601 812 301 229 + 0;
  • 258 442 249 638 263 601 812 301 229 ÷ 2 = 129 221 124 819 131 800 906 150 614 + 1;
  • 129 221 124 819 131 800 906 150 614 ÷ 2 = 64 610 562 409 565 900 453 075 307 + 0;
  • 64 610 562 409 565 900 453 075 307 ÷ 2 = 32 305 281 204 782 950 226 537 653 + 1;
  • 32 305 281 204 782 950 226 537 653 ÷ 2 = 16 152 640 602 391 475 113 268 826 + 1;
  • 16 152 640 602 391 475 113 268 826 ÷ 2 = 8 076 320 301 195 737 556 634 413 + 0;
  • 8 076 320 301 195 737 556 634 413 ÷ 2 = 4 038 160 150 597 868 778 317 206 + 1;
  • 4 038 160 150 597 868 778 317 206 ÷ 2 = 2 019 080 075 298 934 389 158 603 + 0;
  • 2 019 080 075 298 934 389 158 603 ÷ 2 = 1 009 540 037 649 467 194 579 301 + 1;
  • 1 009 540 037 649 467 194 579 301 ÷ 2 = 504 770 018 824 733 597 289 650 + 1;
  • 504 770 018 824 733 597 289 650 ÷ 2 = 252 385 009 412 366 798 644 825 + 0;
  • 252 385 009 412 366 798 644 825 ÷ 2 = 126 192 504 706 183 399 322 412 + 1;
  • 126 192 504 706 183 399 322 412 ÷ 2 = 63 096 252 353 091 699 661 206 + 0;
  • 63 096 252 353 091 699 661 206 ÷ 2 = 31 548 126 176 545 849 830 603 + 0;
  • 31 548 126 176 545 849 830 603 ÷ 2 = 15 774 063 088 272 924 915 301 + 1;
  • 15 774 063 088 272 924 915 301 ÷ 2 = 7 887 031 544 136 462 457 650 + 1;
  • 7 887 031 544 136 462 457 650 ÷ 2 = 3 943 515 772 068 231 228 825 + 0;
  • 3 943 515 772 068 231 228 825 ÷ 2 = 1 971 757 886 034 115 614 412 + 1;
  • 1 971 757 886 034 115 614 412 ÷ 2 = 985 878 943 017 057 807 206 + 0;
  • 985 878 943 017 057 807 206 ÷ 2 = 492 939 471 508 528 903 603 + 0;
  • 492 939 471 508 528 903 603 ÷ 2 = 246 469 735 754 264 451 801 + 1;
  • 246 469 735 754 264 451 801 ÷ 2 = 123 234 867 877 132 225 900 + 1;
  • 123 234 867 877 132 225 900 ÷ 2 = 61 617 433 938 566 112 950 + 0;
  • 61 617 433 938 566 112 950 ÷ 2 = 30 808 716 969 283 056 475 + 0;
  • 30 808 716 969 283 056 475 ÷ 2 = 15 404 358 484 641 528 237 + 1;
  • 15 404 358 484 641 528 237 ÷ 2 = 7 702 179 242 320 764 118 + 1;
  • 7 702 179 242 320 764 118 ÷ 2 = 3 851 089 621 160 382 059 + 0;
  • 3 851 089 621 160 382 059 ÷ 2 = 1 925 544 810 580 191 029 + 1;
  • 1 925 544 810 580 191 029 ÷ 2 = 962 772 405 290 095 514 + 1;
  • 962 772 405 290 095 514 ÷ 2 = 481 386 202 645 047 757 + 0;
  • 481 386 202 645 047 757 ÷ 2 = 240 693 101 322 523 878 + 1;
  • 240 693 101 322 523 878 ÷ 2 = 120 346 550 661 261 939 + 0;
  • 120 346 550 661 261 939 ÷ 2 = 60 173 275 330 630 969 + 1;
  • 60 173 275 330 630 969 ÷ 2 = 30 086 637 665 315 484 + 1;
  • 30 086 637 665 315 484 ÷ 2 = 15 043 318 832 657 742 + 0;
  • 15 043 318 832 657 742 ÷ 2 = 7 521 659 416 328 871 + 0;
  • 7 521 659 416 328 871 ÷ 2 = 3 760 829 708 164 435 + 1;
  • 3 760 829 708 164 435 ÷ 2 = 1 880 414 854 082 217 + 1;
  • 1 880 414 854 082 217 ÷ 2 = 940 207 427 041 108 + 1;
  • 940 207 427 041 108 ÷ 2 = 470 103 713 520 554 + 0;
  • 470 103 713 520 554 ÷ 2 = 235 051 856 760 277 + 0;
  • 235 051 856 760 277 ÷ 2 = 117 525 928 380 138 + 1;
  • 117 525 928 380 138 ÷ 2 = 58 762 964 190 069 + 0;
  • 58 762 964 190 069 ÷ 2 = 29 381 482 095 034 + 1;
  • 29 381 482 095 034 ÷ 2 = 14 690 741 047 517 + 0;
  • 14 690 741 047 517 ÷ 2 = 7 345 370 523 758 + 1;
  • 7 345 370 523 758 ÷ 2 = 3 672 685 261 879 + 0;
  • 3 672 685 261 879 ÷ 2 = 1 836 342 630 939 + 1;
  • 1 836 342 630 939 ÷ 2 = 918 171 315 469 + 1;
  • 918 171 315 469 ÷ 2 = 459 085 657 734 + 1;
  • 459 085 657 734 ÷ 2 = 229 542 828 867 + 0;
  • 229 542 828 867 ÷ 2 = 114 771 414 433 + 1;
  • 114 771 414 433 ÷ 2 = 57 385 707 216 + 1;
  • 57 385 707 216 ÷ 2 = 28 692 853 608 + 0;
  • 28 692 853 608 ÷ 2 = 14 346 426 804 + 0;
  • 14 346 426 804 ÷ 2 = 7 173 213 402 + 0;
  • 7 173 213 402 ÷ 2 = 3 586 606 701 + 0;
  • 3 586 606 701 ÷ 2 = 1 793 303 350 + 1;
  • 1 793 303 350 ÷ 2 = 896 651 675 + 0;
  • 896 651 675 ÷ 2 = 448 325 837 + 1;
  • 448 325 837 ÷ 2 = 224 162 918 + 1;
  • 224 162 918 ÷ 2 = 112 081 459 + 0;
  • 112 081 459 ÷ 2 = 56 040 729 + 1;
  • 56 040 729 ÷ 2 = 28 020 364 + 1;
  • 28 020 364 ÷ 2 = 14 010 182 + 0;
  • 14 010 182 ÷ 2 = 7 005 091 + 0;
  • 7 005 091 ÷ 2 = 3 502 545 + 1;
  • 3 502 545 ÷ 2 = 1 751 272 + 1;
  • 1 751 272 ÷ 2 = 875 636 + 0;
  • 875 636 ÷ 2 = 437 818 + 0;
  • 437 818 ÷ 2 = 218 909 + 0;
  • 218 909 ÷ 2 = 109 454 + 1;
  • 109 454 ÷ 2 = 54 727 + 0;
  • 54 727 ÷ 2 = 27 363 + 1;
  • 27 363 ÷ 2 = 13 681 + 1;
  • 13 681 ÷ 2 = 6 840 + 1;
  • 6 840 ÷ 2 = 3 420 + 0;
  • 3 420 ÷ 2 = 1 710 + 0;
  • 1 710 ÷ 2 = 855 + 0;
  • 855 ÷ 2 = 427 + 1;
  • 427 ÷ 2 = 213 + 1;
  • 213 ÷ 2 = 106 + 1;
  • 106 ÷ 2 = 53 + 0;
  • 53 ÷ 2 = 26 + 1;
  • 26 ÷ 2 = 13 + 0;
  • 13 ÷ 2 = 6 + 1;
  • 6 ÷ 2 = 3 + 0;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

2. Construct the base 2 representation of the integer part of the number, by taking all the remainders starting from the bottom of the list constructed above:

1 110 001 010 101 010 000 011 000 110 010 011 001(10) =


1101 0101 1100 0111 0100 0110 0110 1101 0000 1101 1101 0101 0011 1001 1010 1101 1001 1001 0110 0101 1010 1101 0011 1000 1110 0011 0000 1101 0111 1001(2)

3. Normalize the binary representation of the number, shifting the decimal mark 119 positions to the left so that only one non zero digit remains to the left of it:

1 110 001 010 101 010 000 011 000 110 010 011 001(10) =


1101 0101 1100 0111 0100 0110 0110 1101 0000 1101 1101 0101 0011 1001 1010 1101 1001 1001 0110 0101 1010 1101 0011 1000 1110 0011 0000 1101 0111 1001(2) =


1101 0101 1100 0111 0100 0110 0110 1101 0000 1101 1101 0101 0011 1001 1010 1101 1001 1001 0110 0101 1010 1101 0011 1000 1110 0011 0000 1101 0111 1001(2) × 20 =


1.1010 1011 1000 1110 1000 1100 1101 1010 0001 1011 1010 1010 0111 0011 0101 1011 0011 0010 1100 1011 0101 1010 0111 0001 1100 0110 0001 1010 1111 001(2) × 2119

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


Mantissa (not normalized): 1.1010 1011 1000 1110 1000 1100 1101 1010 0001 1011 1010 1010 0111 0011 0101 1011 0011 0010 1100 1011 0101 1010 0111 0001 1100 0110 0001 1010 1111 001

4. 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:

Exponent (adjusted) =


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


119 + 2(11-1) - 1 =


(119 + 1 023)(10) =


1 142(10)


  • division = quotient + remainder;
  • 1 142 ÷ 2 = 571 + 0;
  • 571 ÷ 2 = 285 + 1;
  • 285 ÷ 2 = 142 + 1;
  • 142 ÷ 2 = 71 + 0;
  • 71 ÷ 2 = 35 + 1;
  • 35 ÷ 2 = 17 + 1;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

Exponent (adjusted) =


1142(10) =


100 0111 0110(2)

5. Normalize mantissa, remove the leading (the leftmost) bit, since it's allways 1 (and the decimal point, if the case) then 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. 1010 1011 1000 1110 1000 1100 1101 1010 0001 1011 1010 1010 0111 001 1010 1101 1001 1001 0110 0101 1010 1101 0011 1000 1110 0011 0000 1101 0111 1001 =


1010 1011 1000 1110 1000 1100 1101 1010 0001 1011 1010 1010 0111

Conclusion:

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


Mantissa (52 bits) =
1010 1011 1000 1110 1000 1100 1101 1010 0001 1011 1010 1010 0111

Number 1 110 001 010 101 010 000 011 000 110 010 011 001 converted from decimal system (base 10)
to
64 bit double precision IEEE 754 binary floating point:
0 - 100 0111 0110 - 1010 1011 1000 1110 1000 1100 1101 1010 0001 1011 1010 1010 0111

(64 bits IEEE 754)
  • Sign (1 bit):

    • 0

      63
  • Exponent (11 bits):

    • 1

      62
    • 0

      61
    • 0

      60
    • 0

      59
    • 1

      58
    • 1

      57
    • 1

      56
    • 0

      55
    • 1

      54
    • 1

      53
    • 0

      52
  • Mantissa (52 bits):

    • 1

      51
    • 0

      50
    • 1

      49
    • 0

      48
    • 1

      47
    • 0

      46
    • 1

      45
    • 1

      44
    • 1

      43
    • 0

      42
    • 0

      41
    • 0

      40
    • 1

      39
    • 1

      38
    • 1

      37
    • 0

      36
    • 1

      35
    • 0

      34
    • 0

      33
    • 0

      32
    • 1

      31
    • 1

      30
    • 0

      29
    • 0

      28
    • 1

      27
    • 1

      26
    • 0

      25
    • 1

      24
    • 1

      23
    • 0

      22
    • 1

      21
    • 0

      20
    • 0

      19
    • 0

      18
    • 0

      17
    • 1

      16
    • 1

      15
    • 0

      14
    • 1

      13
    • 1

      12
    • 1

      11
    • 0

      10
    • 1

      9
    • 0

      8
    • 1

      7
    • 0

      6
    • 1

      5
    • 0

      4
    • 0

      3
    • 1

      2
    • 1

      1
    • 1

      0

1 110 001 010 101 010 000 011 000 110 010 011 001 = ? ... 1 110 001 010 101 010 000 011 000 110 010 011 001 = ?


Convert to 64 bit double precision IEEE 754 binary floating point standard

A number in 64 bit double precision IEEE 754 binary floating point standard representation requires three building elements: sign (it takes one bit and it's either 0 for positive or 1 for negative numbers), exponent (11 bits), mantissa (52 bits)

Latest decimal numbers converted from base ten to 64 bit double precision IEEE 754 floating point binary standard representation

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