1 011 100 000 111 000 111 001 111 100 001 000 010 997 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 011 100 000 111 000 111 001 111 100 001 000 010 997(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
1 011 100 000 111 000 111 001 111 100 001 000 010 997(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. 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;
  • 1 011 100 000 111 000 111 001 111 100 001 000 010 997 ÷ 2 = 505 550 000 055 500 055 500 555 550 000 500 005 498 + 1;
  • 505 550 000 055 500 055 500 555 550 000 500 005 498 ÷ 2 = 252 775 000 027 750 027 750 277 775 000 250 002 749 + 0;
  • 252 775 000 027 750 027 750 277 775 000 250 002 749 ÷ 2 = 126 387 500 013 875 013 875 138 887 500 125 001 374 + 1;
  • 126 387 500 013 875 013 875 138 887 500 125 001 374 ÷ 2 = 63 193 750 006 937 506 937 569 443 750 062 500 687 + 0;
  • 63 193 750 006 937 506 937 569 443 750 062 500 687 ÷ 2 = 31 596 875 003 468 753 468 784 721 875 031 250 343 + 1;
  • 31 596 875 003 468 753 468 784 721 875 031 250 343 ÷ 2 = 15 798 437 501 734 376 734 392 360 937 515 625 171 + 1;
  • 15 798 437 501 734 376 734 392 360 937 515 625 171 ÷ 2 = 7 899 218 750 867 188 367 196 180 468 757 812 585 + 1;
  • 7 899 218 750 867 188 367 196 180 468 757 812 585 ÷ 2 = 3 949 609 375 433 594 183 598 090 234 378 906 292 + 1;
  • 3 949 609 375 433 594 183 598 090 234 378 906 292 ÷ 2 = 1 974 804 687 716 797 091 799 045 117 189 453 146 + 0;
  • 1 974 804 687 716 797 091 799 045 117 189 453 146 ÷ 2 = 987 402 343 858 398 545 899 522 558 594 726 573 + 0;
  • 987 402 343 858 398 545 899 522 558 594 726 573 ÷ 2 = 493 701 171 929 199 272 949 761 279 297 363 286 + 1;
  • 493 701 171 929 199 272 949 761 279 297 363 286 ÷ 2 = 246 850 585 964 599 636 474 880 639 648 681 643 + 0;
  • 246 850 585 964 599 636 474 880 639 648 681 643 ÷ 2 = 123 425 292 982 299 818 237 440 319 824 340 821 + 1;
  • 123 425 292 982 299 818 237 440 319 824 340 821 ÷ 2 = 61 712 646 491 149 909 118 720 159 912 170 410 + 1;
  • 61 712 646 491 149 909 118 720 159 912 170 410 ÷ 2 = 30 856 323 245 574 954 559 360 079 956 085 205 + 0;
  • 30 856 323 245 574 954 559 360 079 956 085 205 ÷ 2 = 15 428 161 622 787 477 279 680 039 978 042 602 + 1;
  • 15 428 161 622 787 477 279 680 039 978 042 602 ÷ 2 = 7 714 080 811 393 738 639 840 019 989 021 301 + 0;
  • 7 714 080 811 393 738 639 840 019 989 021 301 ÷ 2 = 3 857 040 405 696 869 319 920 009 994 510 650 + 1;
  • 3 857 040 405 696 869 319 920 009 994 510 650 ÷ 2 = 1 928 520 202 848 434 659 960 004 997 255 325 + 0;
  • 1 928 520 202 848 434 659 960 004 997 255 325 ÷ 2 = 964 260 101 424 217 329 980 002 498 627 662 + 1;
  • 964 260 101 424 217 329 980 002 498 627 662 ÷ 2 = 482 130 050 712 108 664 990 001 249 313 831 + 0;
  • 482 130 050 712 108 664 990 001 249 313 831 ÷ 2 = 241 065 025 356 054 332 495 000 624 656 915 + 1;
  • 241 065 025 356 054 332 495 000 624 656 915 ÷ 2 = 120 532 512 678 027 166 247 500 312 328 457 + 1;
  • 120 532 512 678 027 166 247 500 312 328 457 ÷ 2 = 60 266 256 339 013 583 123 750 156 164 228 + 1;
  • 60 266 256 339 013 583 123 750 156 164 228 ÷ 2 = 30 133 128 169 506 791 561 875 078 082 114 + 0;
  • 30 133 128 169 506 791 561 875 078 082 114 ÷ 2 = 15 066 564 084 753 395 780 937 539 041 057 + 0;
  • 15 066 564 084 753 395 780 937 539 041 057 ÷ 2 = 7 533 282 042 376 697 890 468 769 520 528 + 1;
  • 7 533 282 042 376 697 890 468 769 520 528 ÷ 2 = 3 766 641 021 188 348 945 234 384 760 264 + 0;
  • 3 766 641 021 188 348 945 234 384 760 264 ÷ 2 = 1 883 320 510 594 174 472 617 192 380 132 + 0;
  • 1 883 320 510 594 174 472 617 192 380 132 ÷ 2 = 941 660 255 297 087 236 308 596 190 066 + 0;
  • 941 660 255 297 087 236 308 596 190 066 ÷ 2 = 470 830 127 648 543 618 154 298 095 033 + 0;
  • 470 830 127 648 543 618 154 298 095 033 ÷ 2 = 235 415 063 824 271 809 077 149 047 516 + 1;
  • 235 415 063 824 271 809 077 149 047 516 ÷ 2 = 117 707 531 912 135 904 538 574 523 758 + 0;
  • 117 707 531 912 135 904 538 574 523 758 ÷ 2 = 58 853 765 956 067 952 269 287 261 879 + 0;
  • 58 853 765 956 067 952 269 287 261 879 ÷ 2 = 29 426 882 978 033 976 134 643 630 939 + 1;
  • 29 426 882 978 033 976 134 643 630 939 ÷ 2 = 14 713 441 489 016 988 067 321 815 469 + 1;
  • 14 713 441 489 016 988 067 321 815 469 ÷ 2 = 7 356 720 744 508 494 033 660 907 734 + 1;
  • 7 356 720 744 508 494 033 660 907 734 ÷ 2 = 3 678 360 372 254 247 016 830 453 867 + 0;
  • 3 678 360 372 254 247 016 830 453 867 ÷ 2 = 1 839 180 186 127 123 508 415 226 933 + 1;
  • 1 839 180 186 127 123 508 415 226 933 ÷ 2 = 919 590 093 063 561 754 207 613 466 + 1;
  • 919 590 093 063 561 754 207 613 466 ÷ 2 = 459 795 046 531 780 877 103 806 733 + 0;
  • 459 795 046 531 780 877 103 806 733 ÷ 2 = 229 897 523 265 890 438 551 903 366 + 1;
  • 229 897 523 265 890 438 551 903 366 ÷ 2 = 114 948 761 632 945 219 275 951 683 + 0;
  • 114 948 761 632 945 219 275 951 683 ÷ 2 = 57 474 380 816 472 609 637 975 841 + 1;
  • 57 474 380 816 472 609 637 975 841 ÷ 2 = 28 737 190 408 236 304 818 987 920 + 1;
  • 28 737 190 408 236 304 818 987 920 ÷ 2 = 14 368 595 204 118 152 409 493 960 + 0;
  • 14 368 595 204 118 152 409 493 960 ÷ 2 = 7 184 297 602 059 076 204 746 980 + 0;
  • 7 184 297 602 059 076 204 746 980 ÷ 2 = 3 592 148 801 029 538 102 373 490 + 0;
  • 3 592 148 801 029 538 102 373 490 ÷ 2 = 1 796 074 400 514 769 051 186 745 + 0;
  • 1 796 074 400 514 769 051 186 745 ÷ 2 = 898 037 200 257 384 525 593 372 + 1;
  • 898 037 200 257 384 525 593 372 ÷ 2 = 449 018 600 128 692 262 796 686 + 0;
  • 449 018 600 128 692 262 796 686 ÷ 2 = 224 509 300 064 346 131 398 343 + 0;
  • 224 509 300 064 346 131 398 343 ÷ 2 = 112 254 650 032 173 065 699 171 + 1;
  • 112 254 650 032 173 065 699 171 ÷ 2 = 56 127 325 016 086 532 849 585 + 1;
  • 56 127 325 016 086 532 849 585 ÷ 2 = 28 063 662 508 043 266 424 792 + 1;
  • 28 063 662 508 043 266 424 792 ÷ 2 = 14 031 831 254 021 633 212 396 + 0;
  • 14 031 831 254 021 633 212 396 ÷ 2 = 7 015 915 627 010 816 606 198 + 0;
  • 7 015 915 627 010 816 606 198 ÷ 2 = 3 507 957 813 505 408 303 099 + 0;
  • 3 507 957 813 505 408 303 099 ÷ 2 = 1 753 978 906 752 704 151 549 + 1;
  • 1 753 978 906 752 704 151 549 ÷ 2 = 876 989 453 376 352 075 774 + 1;
  • 876 989 453 376 352 075 774 ÷ 2 = 438 494 726 688 176 037 887 + 0;
  • 438 494 726 688 176 037 887 ÷ 2 = 219 247 363 344 088 018 943 + 1;
  • 219 247 363 344 088 018 943 ÷ 2 = 109 623 681 672 044 009 471 + 1;
  • 109 623 681 672 044 009 471 ÷ 2 = 54 811 840 836 022 004 735 + 1;
  • 54 811 840 836 022 004 735 ÷ 2 = 27 405 920 418 011 002 367 + 1;
  • 27 405 920 418 011 002 367 ÷ 2 = 13 702 960 209 005 501 183 + 1;
  • 13 702 960 209 005 501 183 ÷ 2 = 6 851 480 104 502 750 591 + 1;
  • 6 851 480 104 502 750 591 ÷ 2 = 3 425 740 052 251 375 295 + 1;
  • 3 425 740 052 251 375 295 ÷ 2 = 1 712 870 026 125 687 647 + 1;
  • 1 712 870 026 125 687 647 ÷ 2 = 856 435 013 062 843 823 + 1;
  • 856 435 013 062 843 823 ÷ 2 = 428 217 506 531 421 911 + 1;
  • 428 217 506 531 421 911 ÷ 2 = 214 108 753 265 710 955 + 1;
  • 214 108 753 265 710 955 ÷ 2 = 107 054 376 632 855 477 + 1;
  • 107 054 376 632 855 477 ÷ 2 = 53 527 188 316 427 738 + 1;
  • 53 527 188 316 427 738 ÷ 2 = 26 763 594 158 213 869 + 0;
  • 26 763 594 158 213 869 ÷ 2 = 13 381 797 079 106 934 + 1;
  • 13 381 797 079 106 934 ÷ 2 = 6 690 898 539 553 467 + 0;
  • 6 690 898 539 553 467 ÷ 2 = 3 345 449 269 776 733 + 1;
  • 3 345 449 269 776 733 ÷ 2 = 1 672 724 634 888 366 + 1;
  • 1 672 724 634 888 366 ÷ 2 = 836 362 317 444 183 + 0;
  • 836 362 317 444 183 ÷ 2 = 418 181 158 722 091 + 1;
  • 418 181 158 722 091 ÷ 2 = 209 090 579 361 045 + 1;
  • 209 090 579 361 045 ÷ 2 = 104 545 289 680 522 + 1;
  • 104 545 289 680 522 ÷ 2 = 52 272 644 840 261 + 0;
  • 52 272 644 840 261 ÷ 2 = 26 136 322 420 130 + 1;
  • 26 136 322 420 130 ÷ 2 = 13 068 161 210 065 + 0;
  • 13 068 161 210 065 ÷ 2 = 6 534 080 605 032 + 1;
  • 6 534 080 605 032 ÷ 2 = 3 267 040 302 516 + 0;
  • 3 267 040 302 516 ÷ 2 = 1 633 520 151 258 + 0;
  • 1 633 520 151 258 ÷ 2 = 816 760 075 629 + 0;
  • 816 760 075 629 ÷ 2 = 408 380 037 814 + 1;
  • 408 380 037 814 ÷ 2 = 204 190 018 907 + 0;
  • 204 190 018 907 ÷ 2 = 102 095 009 453 + 1;
  • 102 095 009 453 ÷ 2 = 51 047 504 726 + 1;
  • 51 047 504 726 ÷ 2 = 25 523 752 363 + 0;
  • 25 523 752 363 ÷ 2 = 12 761 876 181 + 1;
  • 12 761 876 181 ÷ 2 = 6 380 938 090 + 1;
  • 6 380 938 090 ÷ 2 = 3 190 469 045 + 0;
  • 3 190 469 045 ÷ 2 = 1 595 234 522 + 1;
  • 1 595 234 522 ÷ 2 = 797 617 261 + 0;
  • 797 617 261 ÷ 2 = 398 808 630 + 1;
  • 398 808 630 ÷ 2 = 199 404 315 + 0;
  • 199 404 315 ÷ 2 = 99 702 157 + 1;
  • 99 702 157 ÷ 2 = 49 851 078 + 1;
  • 49 851 078 ÷ 2 = 24 925 539 + 0;
  • 24 925 539 ÷ 2 = 12 462 769 + 1;
  • 12 462 769 ÷ 2 = 6 231 384 + 1;
  • 6 231 384 ÷ 2 = 3 115 692 + 0;
  • 3 115 692 ÷ 2 = 1 557 846 + 0;
  • 1 557 846 ÷ 2 = 778 923 + 0;
  • 778 923 ÷ 2 = 389 461 + 1;
  • 389 461 ÷ 2 = 194 730 + 1;
  • 194 730 ÷ 2 = 97 365 + 0;
  • 97 365 ÷ 2 = 48 682 + 1;
  • 48 682 ÷ 2 = 24 341 + 0;
  • 24 341 ÷ 2 = 12 170 + 1;
  • 12 170 ÷ 2 = 6 085 + 0;
  • 6 085 ÷ 2 = 3 042 + 1;
  • 3 042 ÷ 2 = 1 521 + 0;
  • 1 521 ÷ 2 = 760 + 1;
  • 760 ÷ 2 = 380 + 0;
  • 380 ÷ 2 = 190 + 0;
  • 190 ÷ 2 = 95 + 0;
  • 95 ÷ 2 = 47 + 1;
  • 47 ÷ 2 = 23 + 1;
  • 23 ÷ 2 = 11 + 1;
  • 11 ÷ 2 = 5 + 1;
  • 5 ÷ 2 = 2 + 1;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

2. Construct the base 2 representation of the positive number.

Take all the remainders starting from the bottom of the list constructed above.

1 011 100 000 111 000 111 001 111 100 001 000 010 997(10) =


10 1111 1000 1010 1010 1100 0110 1101 0101 1011 0100 0101 0111 0110 1011 1111 1111 1110 1100 0111 0010 0001 1010 1101 1100 1000 0100 1110 1010 1011 0100 1111 0101(2)


3. Normalize the binary representation of the number.

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


1 011 100 000 111 000 111 001 111 100 001 000 010 997(10) =


10 1111 1000 1010 1010 1100 0110 1101 0101 1011 0100 0101 0111 0110 1011 1111 1111 1110 1100 0111 0010 0001 1010 1101 1100 1000 0100 1110 1010 1011 0100 1111 0101(2) =


10 1111 1000 1010 1010 1100 0110 1101 0101 1011 0100 0101 0111 0110 1011 1111 1111 1110 1100 0111 0010 0001 1010 1101 1100 1000 0100 1110 1010 1011 0100 1111 0101(2) × 20 =


1.0111 1100 0101 0101 0110 0011 0110 1010 1101 1010 0010 1011 1011 0101 1111 1111 1111 0110 0011 1001 0000 1101 0110 1110 0100 0010 0111 0101 0101 1010 0111 1010 1(2) × 2129


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


Mantissa (not normalized):
1.0111 1100 0101 0101 0110 0011 0110 1010 1101 1010 0010 1011 1011 0101 1111 1111 1111 0110 0011 1001 0000 1101 0110 1110 0100 0010 0111 0101 0101 1010 0111 1010 1


5. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


129 + 2(11-1) - 1 =


(129 + 1 023)(10) =


1 152(10)


6. 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 152 ÷ 2 = 576 + 0;
  • 576 ÷ 2 = 288 + 0;
  • 288 ÷ 2 = 144 + 0;
  • 144 ÷ 2 = 72 + 0;
  • 72 ÷ 2 = 36 + 0;
  • 36 ÷ 2 = 18 + 0;
  • 18 ÷ 2 = 9 + 0;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

7. Construct the base 2 representation of the adjusted exponent.

Take all the remainders starting from the bottom of the list constructed above.


Exponent (adjusted) =


1152(10) =


100 1000 0000(2)


8. 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. 0111 1100 0101 0101 0110 0011 0110 1010 1101 1010 0010 1011 1011 0 1011 1111 1111 1110 1100 0111 0010 0001 1010 1101 1100 1000 0100 1110 1010 1011 0100 1111 0101 =


0111 1100 0101 0101 0110 0011 0110 1010 1101 1010 0010 1011 1011


9. 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 1000 0000


Mantissa (52 bits) =
0111 1100 0101 0101 0110 0011 0110 1010 1101 1010 0010 1011 1011


Decimal number 1 011 100 000 111 000 111 001 111 100 001 000 010 997 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 100 1000 0000 - 0111 1100 0101 0101 0110 0011 0110 1010 1101 1010 0010 1011 1011

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