-0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal -0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9(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 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9(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. Start with the positive version of the number:

|-0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9| = 0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9


2. 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;

3. 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)


4. Convert to binary (base 2) the fractional part: 0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9.

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 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9 × 2 = 0 + 0.000 000 090 838 762 011 264 605 701 738 017 971 835 770 225 653 8;
  • 2) 0.000 000 090 838 762 011 264 605 701 738 017 971 835 770 225 653 8 × 2 = 0 + 0.000 000 181 677 524 022 529 211 403 476 035 943 671 540 451 307 6;
  • 3) 0.000 000 181 677 524 022 529 211 403 476 035 943 671 540 451 307 6 × 2 = 0 + 0.000 000 363 355 048 045 058 422 806 952 071 887 343 080 902 615 2;
  • 4) 0.000 000 363 355 048 045 058 422 806 952 071 887 343 080 902 615 2 × 2 = 0 + 0.000 000 726 710 096 090 116 845 613 904 143 774 686 161 805 230 4;
  • 5) 0.000 000 726 710 096 090 116 845 613 904 143 774 686 161 805 230 4 × 2 = 0 + 0.000 001 453 420 192 180 233 691 227 808 287 549 372 323 610 460 8;
  • 6) 0.000 001 453 420 192 180 233 691 227 808 287 549 372 323 610 460 8 × 2 = 0 + 0.000 002 906 840 384 360 467 382 455 616 575 098 744 647 220 921 6;
  • 7) 0.000 002 906 840 384 360 467 382 455 616 575 098 744 647 220 921 6 × 2 = 0 + 0.000 005 813 680 768 720 934 764 911 233 150 197 489 294 441 843 2;
  • 8) 0.000 005 813 680 768 720 934 764 911 233 150 197 489 294 441 843 2 × 2 = 0 + 0.000 011 627 361 537 441 869 529 822 466 300 394 978 588 883 686 4;
  • 9) 0.000 011 627 361 537 441 869 529 822 466 300 394 978 588 883 686 4 × 2 = 0 + 0.000 023 254 723 074 883 739 059 644 932 600 789 957 177 767 372 8;
  • 10) 0.000 023 254 723 074 883 739 059 644 932 600 789 957 177 767 372 8 × 2 = 0 + 0.000 046 509 446 149 767 478 119 289 865 201 579 914 355 534 745 6;
  • 11) 0.000 046 509 446 149 767 478 119 289 865 201 579 914 355 534 745 6 × 2 = 0 + 0.000 093 018 892 299 534 956 238 579 730 403 159 828 711 069 491 2;
  • 12) 0.000 093 018 892 299 534 956 238 579 730 403 159 828 711 069 491 2 × 2 = 0 + 0.000 186 037 784 599 069 912 477 159 460 806 319 657 422 138 982 4;
  • 13) 0.000 186 037 784 599 069 912 477 159 460 806 319 657 422 138 982 4 × 2 = 0 + 0.000 372 075 569 198 139 824 954 318 921 612 639 314 844 277 964 8;
  • 14) 0.000 372 075 569 198 139 824 954 318 921 612 639 314 844 277 964 8 × 2 = 0 + 0.000 744 151 138 396 279 649 908 637 843 225 278 629 688 555 929 6;
  • 15) 0.000 744 151 138 396 279 649 908 637 843 225 278 629 688 555 929 6 × 2 = 0 + 0.001 488 302 276 792 559 299 817 275 686 450 557 259 377 111 859 2;
  • 16) 0.001 488 302 276 792 559 299 817 275 686 450 557 259 377 111 859 2 × 2 = 0 + 0.002 976 604 553 585 118 599 634 551 372 901 114 518 754 223 718 4;
  • 17) 0.002 976 604 553 585 118 599 634 551 372 901 114 518 754 223 718 4 × 2 = 0 + 0.005 953 209 107 170 237 199 269 102 745 802 229 037 508 447 436 8;
  • 18) 0.005 953 209 107 170 237 199 269 102 745 802 229 037 508 447 436 8 × 2 = 0 + 0.011 906 418 214 340 474 398 538 205 491 604 458 075 016 894 873 6;
  • 19) 0.011 906 418 214 340 474 398 538 205 491 604 458 075 016 894 873 6 × 2 = 0 + 0.023 812 836 428 680 948 797 076 410 983 208 916 150 033 789 747 2;
  • 20) 0.023 812 836 428 680 948 797 076 410 983 208 916 150 033 789 747 2 × 2 = 0 + 0.047 625 672 857 361 897 594 152 821 966 417 832 300 067 579 494 4;
  • 21) 0.047 625 672 857 361 897 594 152 821 966 417 832 300 067 579 494 4 × 2 = 0 + 0.095 251 345 714 723 795 188 305 643 932 835 664 600 135 158 988 8;
  • 22) 0.095 251 345 714 723 795 188 305 643 932 835 664 600 135 158 988 8 × 2 = 0 + 0.190 502 691 429 447 590 376 611 287 865 671 329 200 270 317 977 6;
  • 23) 0.190 502 691 429 447 590 376 611 287 865 671 329 200 270 317 977 6 × 2 = 0 + 0.381 005 382 858 895 180 753 222 575 731 342 658 400 540 635 955 2;
  • 24) 0.381 005 382 858 895 180 753 222 575 731 342 658 400 540 635 955 2 × 2 = 0 + 0.762 010 765 717 790 361 506 445 151 462 685 316 801 081 271 910 4;
  • 25) 0.762 010 765 717 790 361 506 445 151 462 685 316 801 081 271 910 4 × 2 = 1 + 0.524 021 531 435 580 723 012 890 302 925 370 633 602 162 543 820 8;
  • 26) 0.524 021 531 435 580 723 012 890 302 925 370 633 602 162 543 820 8 × 2 = 1 + 0.048 043 062 871 161 446 025 780 605 850 741 267 204 325 087 641 6;
  • 27) 0.048 043 062 871 161 446 025 780 605 850 741 267 204 325 087 641 6 × 2 = 0 + 0.096 086 125 742 322 892 051 561 211 701 482 534 408 650 175 283 2;
  • 28) 0.096 086 125 742 322 892 051 561 211 701 482 534 408 650 175 283 2 × 2 = 0 + 0.192 172 251 484 645 784 103 122 423 402 965 068 817 300 350 566 4;
  • 29) 0.192 172 251 484 645 784 103 122 423 402 965 068 817 300 350 566 4 × 2 = 0 + 0.384 344 502 969 291 568 206 244 846 805 930 137 634 600 701 132 8;
  • 30) 0.384 344 502 969 291 568 206 244 846 805 930 137 634 600 701 132 8 × 2 = 0 + 0.768 689 005 938 583 136 412 489 693 611 860 275 269 201 402 265 6;
  • 31) 0.768 689 005 938 583 136 412 489 693 611 860 275 269 201 402 265 6 × 2 = 1 + 0.537 378 011 877 166 272 824 979 387 223 720 550 538 402 804 531 2;
  • 32) 0.537 378 011 877 166 272 824 979 387 223 720 550 538 402 804 531 2 × 2 = 1 + 0.074 756 023 754 332 545 649 958 774 447 441 101 076 805 609 062 4;
  • 33) 0.074 756 023 754 332 545 649 958 774 447 441 101 076 805 609 062 4 × 2 = 0 + 0.149 512 047 508 665 091 299 917 548 894 882 202 153 611 218 124 8;
  • 34) 0.149 512 047 508 665 091 299 917 548 894 882 202 153 611 218 124 8 × 2 = 0 + 0.299 024 095 017 330 182 599 835 097 789 764 404 307 222 436 249 6;
  • 35) 0.299 024 095 017 330 182 599 835 097 789 764 404 307 222 436 249 6 × 2 = 0 + 0.598 048 190 034 660 365 199 670 195 579 528 808 614 444 872 499 2;
  • 36) 0.598 048 190 034 660 365 199 670 195 579 528 808 614 444 872 499 2 × 2 = 1 + 0.196 096 380 069 320 730 399 340 391 159 057 617 228 889 744 998 4;
  • 37) 0.196 096 380 069 320 730 399 340 391 159 057 617 228 889 744 998 4 × 2 = 0 + 0.392 192 760 138 641 460 798 680 782 318 115 234 457 779 489 996 8;
  • 38) 0.392 192 760 138 641 460 798 680 782 318 115 234 457 779 489 996 8 × 2 = 0 + 0.784 385 520 277 282 921 597 361 564 636 230 468 915 558 979 993 6;
  • 39) 0.784 385 520 277 282 921 597 361 564 636 230 468 915 558 979 993 6 × 2 = 1 + 0.568 771 040 554 565 843 194 723 129 272 460 937 831 117 959 987 2;
  • 40) 0.568 771 040 554 565 843 194 723 129 272 460 937 831 117 959 987 2 × 2 = 1 + 0.137 542 081 109 131 686 389 446 258 544 921 875 662 235 919 974 4;
  • 41) 0.137 542 081 109 131 686 389 446 258 544 921 875 662 235 919 974 4 × 2 = 0 + 0.275 084 162 218 263 372 778 892 517 089 843 751 324 471 839 948 8;
  • 42) 0.275 084 162 218 263 372 778 892 517 089 843 751 324 471 839 948 8 × 2 = 0 + 0.550 168 324 436 526 745 557 785 034 179 687 502 648 943 679 897 6;
  • 43) 0.550 168 324 436 526 745 557 785 034 179 687 502 648 943 679 897 6 × 2 = 1 + 0.100 336 648 873 053 491 115 570 068 359 375 005 297 887 359 795 2;
  • 44) 0.100 336 648 873 053 491 115 570 068 359 375 005 297 887 359 795 2 × 2 = 0 + 0.200 673 297 746 106 982 231 140 136 718 750 010 595 774 719 590 4;
  • 45) 0.200 673 297 746 106 982 231 140 136 718 750 010 595 774 719 590 4 × 2 = 0 + 0.401 346 595 492 213 964 462 280 273 437 500 021 191 549 439 180 8;
  • 46) 0.401 346 595 492 213 964 462 280 273 437 500 021 191 549 439 180 8 × 2 = 0 + 0.802 693 190 984 427 928 924 560 546 875 000 042 383 098 878 361 6;
  • 47) 0.802 693 190 984 427 928 924 560 546 875 000 042 383 098 878 361 6 × 2 = 1 + 0.605 386 381 968 855 857 849 121 093 750 000 084 766 197 756 723 2;
  • 48) 0.605 386 381 968 855 857 849 121 093 750 000 084 766 197 756 723 2 × 2 = 1 + 0.210 772 763 937 711 715 698 242 187 500 000 169 532 395 513 446 4;
  • 49) 0.210 772 763 937 711 715 698 242 187 500 000 169 532 395 513 446 4 × 2 = 0 + 0.421 545 527 875 423 431 396 484 375 000 000 339 064 791 026 892 8;
  • 50) 0.421 545 527 875 423 431 396 484 375 000 000 339 064 791 026 892 8 × 2 = 0 + 0.843 091 055 750 846 862 792 968 750 000 000 678 129 582 053 785 6;
  • 51) 0.843 091 055 750 846 862 792 968 750 000 000 678 129 582 053 785 6 × 2 = 1 + 0.686 182 111 501 693 725 585 937 500 000 001 356 259 164 107 571 2;
  • 52) 0.686 182 111 501 693 725 585 937 500 000 001 356 259 164 107 571 2 × 2 = 1 + 0.372 364 223 003 387 451 171 875 000 000 002 712 518 328 215 142 4;
  • 53) 0.372 364 223 003 387 451 171 875 000 000 002 712 518 328 215 142 4 × 2 = 0 + 0.744 728 446 006 774 902 343 750 000 000 005 425 036 656 430 284 8;
  • 54) 0.744 728 446 006 774 902 343 750 000 000 005 425 036 656 430 284 8 × 2 = 1 + 0.489 456 892 013 549 804 687 500 000 000 010 850 073 312 860 569 6;
  • 55) 0.489 456 892 013 549 804 687 500 000 000 010 850 073 312 860 569 6 × 2 = 0 + 0.978 913 784 027 099 609 375 000 000 000 021 700 146 625 721 139 2;
  • 56) 0.978 913 784 027 099 609 375 000 000 000 021 700 146 625 721 139 2 × 2 = 1 + 0.957 827 568 054 199 218 750 000 000 000 043 400 293 251 442 278 4;
  • 57) 0.957 827 568 054 199 218 750 000 000 000 043 400 293 251 442 278 4 × 2 = 1 + 0.915 655 136 108 398 437 500 000 000 000 086 800 586 502 884 556 8;
  • 58) 0.915 655 136 108 398 437 500 000 000 000 086 800 586 502 884 556 8 × 2 = 1 + 0.831 310 272 216 796 875 000 000 000 000 173 601 173 005 769 113 6;
  • 59) 0.831 310 272 216 796 875 000 000 000 000 173 601 173 005 769 113 6 × 2 = 1 + 0.662 620 544 433 593 750 000 000 000 000 347 202 346 011 538 227 2;
  • 60) 0.662 620 544 433 593 750 000 000 000 000 347 202 346 011 538 227 2 × 2 = 1 + 0.325 241 088 867 187 500 000 000 000 000 694 404 692 023 076 454 4;
  • 61) 0.325 241 088 867 187 500 000 000 000 000 694 404 692 023 076 454 4 × 2 = 0 + 0.650 482 177 734 375 000 000 000 000 001 388 809 384 046 152 908 8;
  • 62) 0.650 482 177 734 375 000 000 000 000 001 388 809 384 046 152 908 8 × 2 = 1 + 0.300 964 355 468 750 000 000 000 000 002 777 618 768 092 305 817 6;
  • 63) 0.300 964 355 468 750 000 000 000 000 002 777 618 768 092 305 817 6 × 2 = 0 + 0.601 928 710 937 500 000 000 000 000 005 555 237 536 184 611 635 2;
  • 64) 0.601 928 710 937 500 000 000 000 000 005 555 237 536 184 611 635 2 × 2 = 1 + 0.203 857 421 875 000 000 000 000 000 011 110 475 072 369 223 270 4;
  • 65) 0.203 857 421 875 000 000 000 000 000 011 110 475 072 369 223 270 4 × 2 = 0 + 0.407 714 843 750 000 000 000 000 000 022 220 950 144 738 446 540 8;
  • 66) 0.407 714 843 750 000 000 000 000 000 022 220 950 144 738 446 540 8 × 2 = 0 + 0.815 429 687 500 000 000 000 000 000 044 441 900 289 476 893 081 6;
  • 67) 0.815 429 687 500 000 000 000 000 000 044 441 900 289 476 893 081 6 × 2 = 1 + 0.630 859 375 000 000 000 000 000 000 088 883 800 578 953 786 163 2;
  • 68) 0.630 859 375 000 000 000 000 000 000 088 883 800 578 953 786 163 2 × 2 = 1 + 0.261 718 750 000 000 000 000 000 000 177 767 601 157 907 572 326 4;
  • 69) 0.261 718 750 000 000 000 000 000 000 177 767 601 157 907 572 326 4 × 2 = 0 + 0.523 437 500 000 000 000 000 000 000 355 535 202 315 815 144 652 8;
  • 70) 0.523 437 500 000 000 000 000 000 000 355 535 202 315 815 144 652 8 × 2 = 1 + 0.046 875 000 000 000 000 000 000 000 711 070 404 631 630 289 305 6;
  • 71) 0.046 875 000 000 000 000 000 000 000 711 070 404 631 630 289 305 6 × 2 = 0 + 0.093 750 000 000 000 000 000 000 001 422 140 809 263 260 578 611 2;
  • 72) 0.093 750 000 000 000 000 000 000 001 422 140 809 263 260 578 611 2 × 2 = 0 + 0.187 500 000 000 000 000 000 000 002 844 281 618 526 521 157 222 4;
  • 73) 0.187 500 000 000 000 000 000 000 002 844 281 618 526 521 157 222 4 × 2 = 0 + 0.375 000 000 000 000 000 000 000 005 688 563 237 053 042 314 444 8;
  • 74) 0.375 000 000 000 000 000 000 000 005 688 563 237 053 042 314 444 8 × 2 = 0 + 0.750 000 000 000 000 000 000 000 011 377 126 474 106 084 628 889 6;
  • 75) 0.750 000 000 000 000 000 000 000 011 377 126 474 106 084 628 889 6 × 2 = 1 + 0.500 000 000 000 000 000 000 000 022 754 252 948 212 169 257 779 2;
  • 76) 0.500 000 000 000 000 000 000 000 022 754 252 948 212 169 257 779 2 × 2 = 1 + 0.000 000 000 000 000 000 000 000 045 508 505 896 424 338 515 558 4;
  • 77) 0.000 000 000 000 000 000 000 000 045 508 505 896 424 338 515 558 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 091 017 011 792 848 677 031 116 8;

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).


5. 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 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9(10) =


0.0000 0000 0000 0000 0000 0000 1100 0011 0001 0011 0010 0011 0011 0101 1111 0101 0011 0100 0011 0(2)

6. Positive number before normalization:

0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9(10) =


0.0000 0000 0000 0000 0000 0000 1100 0011 0001 0011 0010 0011 0011 0101 1111 0101 0011 0100 0011 0(2)

7. Normalize the binary representation of the number.

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


0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9(10) =


0.0000 0000 0000 0000 0000 0000 1100 0011 0001 0011 0010 0011 0011 0101 1111 0101 0011 0100 0011 0(2) =


0.0000 0000 0000 0000 0000 0000 1100 0011 0001 0011 0010 0011 0011 0101 1111 0101 0011 0100 0011 0(2) × 20 =


1.1000 0110 0010 0110 0100 0110 0110 1011 1110 1010 0110 1000 0110(2) × 2-25


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


Mantissa (not normalized):
1.1000 0110 0010 0110 0100 0110 0110 1011 1110 1010 0110 1000 0110


9. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


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


(-25 + 1 023)(10) =


998(10)


10. 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;
  • 998 ÷ 2 = 499 + 0;
  • 499 ÷ 2 = 249 + 1;
  • 249 ÷ 2 = 124 + 1;
  • 124 ÷ 2 = 62 + 0;
  • 62 ÷ 2 = 31 + 0;
  • 31 ÷ 2 = 15 + 1;
  • 15 ÷ 2 = 7 + 1;
  • 7 ÷ 2 = 3 + 1;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

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

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


Exponent (adjusted) =


998(10) =


011 1110 0110(2)


12. 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. 1000 0110 0010 0110 0100 0110 0110 1011 1110 1010 0110 1000 0110 =


1000 0110 0010 0110 0100 0110 0110 1011 1110 1010 0110 1000 0110


13. The three elements that make up the number's 64 bit double precision IEEE 754 binary floating point representation:

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


Exponent (11 bits) =
011 1110 0110


Mantissa (52 bits) =
1000 0110 0010 0110 0100 0110 0110 1011 1110 1010 0110 1000 0110


Decimal number -0.000 000 045 419 381 005 632 302 850 869 008 985 917 885 112 826 9 converted to 64 bit double precision IEEE 754 binary floating point representation:

1 - 011 1110 0110 - 1000 0110 0010 0110 0100 0110 0110 1011 1110 1010 0110 1000 0110


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