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

Convert decimal 111 110 001 000 001 011 110 001 001 111 010 000 111 100 106(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
111 110 001 000 001 011 110 001 001 111 010 000 111 100 106(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;
  • 111 110 001 000 001 011 110 001 001 111 010 000 111 100 106 ÷ 2 = 55 555 000 500 000 505 555 000 500 555 505 000 055 550 053 + 0;
  • 55 555 000 500 000 505 555 000 500 555 505 000 055 550 053 ÷ 2 = 27 777 500 250 000 252 777 500 250 277 752 500 027 775 026 + 1;
  • 27 777 500 250 000 252 777 500 250 277 752 500 027 775 026 ÷ 2 = 13 888 750 125 000 126 388 750 125 138 876 250 013 887 513 + 0;
  • 13 888 750 125 000 126 388 750 125 138 876 250 013 887 513 ÷ 2 = 6 944 375 062 500 063 194 375 062 569 438 125 006 943 756 + 1;
  • 6 944 375 062 500 063 194 375 062 569 438 125 006 943 756 ÷ 2 = 3 472 187 531 250 031 597 187 531 284 719 062 503 471 878 + 0;
  • 3 472 187 531 250 031 597 187 531 284 719 062 503 471 878 ÷ 2 = 1 736 093 765 625 015 798 593 765 642 359 531 251 735 939 + 0;
  • 1 736 093 765 625 015 798 593 765 642 359 531 251 735 939 ÷ 2 = 868 046 882 812 507 899 296 882 821 179 765 625 867 969 + 1;
  • 868 046 882 812 507 899 296 882 821 179 765 625 867 969 ÷ 2 = 434 023 441 406 253 949 648 441 410 589 882 812 933 984 + 1;
  • 434 023 441 406 253 949 648 441 410 589 882 812 933 984 ÷ 2 = 217 011 720 703 126 974 824 220 705 294 941 406 466 992 + 0;
  • 217 011 720 703 126 974 824 220 705 294 941 406 466 992 ÷ 2 = 108 505 860 351 563 487 412 110 352 647 470 703 233 496 + 0;
  • 108 505 860 351 563 487 412 110 352 647 470 703 233 496 ÷ 2 = 54 252 930 175 781 743 706 055 176 323 735 351 616 748 + 0;
  • 54 252 930 175 781 743 706 055 176 323 735 351 616 748 ÷ 2 = 27 126 465 087 890 871 853 027 588 161 867 675 808 374 + 0;
  • 27 126 465 087 890 871 853 027 588 161 867 675 808 374 ÷ 2 = 13 563 232 543 945 435 926 513 794 080 933 837 904 187 + 0;
  • 13 563 232 543 945 435 926 513 794 080 933 837 904 187 ÷ 2 = 6 781 616 271 972 717 963 256 897 040 466 918 952 093 + 1;
  • 6 781 616 271 972 717 963 256 897 040 466 918 952 093 ÷ 2 = 3 390 808 135 986 358 981 628 448 520 233 459 476 046 + 1;
  • 3 390 808 135 986 358 981 628 448 520 233 459 476 046 ÷ 2 = 1 695 404 067 993 179 490 814 224 260 116 729 738 023 + 0;
  • 1 695 404 067 993 179 490 814 224 260 116 729 738 023 ÷ 2 = 847 702 033 996 589 745 407 112 130 058 364 869 011 + 1;
  • 847 702 033 996 589 745 407 112 130 058 364 869 011 ÷ 2 = 423 851 016 998 294 872 703 556 065 029 182 434 505 + 1;
  • 423 851 016 998 294 872 703 556 065 029 182 434 505 ÷ 2 = 211 925 508 499 147 436 351 778 032 514 591 217 252 + 1;
  • 211 925 508 499 147 436 351 778 032 514 591 217 252 ÷ 2 = 105 962 754 249 573 718 175 889 016 257 295 608 626 + 0;
  • 105 962 754 249 573 718 175 889 016 257 295 608 626 ÷ 2 = 52 981 377 124 786 859 087 944 508 128 647 804 313 + 0;
  • 52 981 377 124 786 859 087 944 508 128 647 804 313 ÷ 2 = 26 490 688 562 393 429 543 972 254 064 323 902 156 + 1;
  • 26 490 688 562 393 429 543 972 254 064 323 902 156 ÷ 2 = 13 245 344 281 196 714 771 986 127 032 161 951 078 + 0;
  • 13 245 344 281 196 714 771 986 127 032 161 951 078 ÷ 2 = 6 622 672 140 598 357 385 993 063 516 080 975 539 + 0;
  • 6 622 672 140 598 357 385 993 063 516 080 975 539 ÷ 2 = 3 311 336 070 299 178 692 996 531 758 040 487 769 + 1;
  • 3 311 336 070 299 178 692 996 531 758 040 487 769 ÷ 2 = 1 655 668 035 149 589 346 498 265 879 020 243 884 + 1;
  • 1 655 668 035 149 589 346 498 265 879 020 243 884 ÷ 2 = 827 834 017 574 794 673 249 132 939 510 121 942 + 0;
  • 827 834 017 574 794 673 249 132 939 510 121 942 ÷ 2 = 413 917 008 787 397 336 624 566 469 755 060 971 + 0;
  • 413 917 008 787 397 336 624 566 469 755 060 971 ÷ 2 = 206 958 504 393 698 668 312 283 234 877 530 485 + 1;
  • 206 958 504 393 698 668 312 283 234 877 530 485 ÷ 2 = 103 479 252 196 849 334 156 141 617 438 765 242 + 1;
  • 103 479 252 196 849 334 156 141 617 438 765 242 ÷ 2 = 51 739 626 098 424 667 078 070 808 719 382 621 + 0;
  • 51 739 626 098 424 667 078 070 808 719 382 621 ÷ 2 = 25 869 813 049 212 333 539 035 404 359 691 310 + 1;
  • 25 869 813 049 212 333 539 035 404 359 691 310 ÷ 2 = 12 934 906 524 606 166 769 517 702 179 845 655 + 0;
  • 12 934 906 524 606 166 769 517 702 179 845 655 ÷ 2 = 6 467 453 262 303 083 384 758 851 089 922 827 + 1;
  • 6 467 453 262 303 083 384 758 851 089 922 827 ÷ 2 = 3 233 726 631 151 541 692 379 425 544 961 413 + 1;
  • 3 233 726 631 151 541 692 379 425 544 961 413 ÷ 2 = 1 616 863 315 575 770 846 189 712 772 480 706 + 1;
  • 1 616 863 315 575 770 846 189 712 772 480 706 ÷ 2 = 808 431 657 787 885 423 094 856 386 240 353 + 0;
  • 808 431 657 787 885 423 094 856 386 240 353 ÷ 2 = 404 215 828 893 942 711 547 428 193 120 176 + 1;
  • 404 215 828 893 942 711 547 428 193 120 176 ÷ 2 = 202 107 914 446 971 355 773 714 096 560 088 + 0;
  • 202 107 914 446 971 355 773 714 096 560 088 ÷ 2 = 101 053 957 223 485 677 886 857 048 280 044 + 0;
  • 101 053 957 223 485 677 886 857 048 280 044 ÷ 2 = 50 526 978 611 742 838 943 428 524 140 022 + 0;
  • 50 526 978 611 742 838 943 428 524 140 022 ÷ 2 = 25 263 489 305 871 419 471 714 262 070 011 + 0;
  • 25 263 489 305 871 419 471 714 262 070 011 ÷ 2 = 12 631 744 652 935 709 735 857 131 035 005 + 1;
  • 12 631 744 652 935 709 735 857 131 035 005 ÷ 2 = 6 315 872 326 467 854 867 928 565 517 502 + 1;
  • 6 315 872 326 467 854 867 928 565 517 502 ÷ 2 = 3 157 936 163 233 927 433 964 282 758 751 + 0;
  • 3 157 936 163 233 927 433 964 282 758 751 ÷ 2 = 1 578 968 081 616 963 716 982 141 379 375 + 1;
  • 1 578 968 081 616 963 716 982 141 379 375 ÷ 2 = 789 484 040 808 481 858 491 070 689 687 + 1;
  • 789 484 040 808 481 858 491 070 689 687 ÷ 2 = 394 742 020 404 240 929 245 535 344 843 + 1;
  • 394 742 020 404 240 929 245 535 344 843 ÷ 2 = 197 371 010 202 120 464 622 767 672 421 + 1;
  • 197 371 010 202 120 464 622 767 672 421 ÷ 2 = 98 685 505 101 060 232 311 383 836 210 + 1;
  • 98 685 505 101 060 232 311 383 836 210 ÷ 2 = 49 342 752 550 530 116 155 691 918 105 + 0;
  • 49 342 752 550 530 116 155 691 918 105 ÷ 2 = 24 671 376 275 265 058 077 845 959 052 + 1;
  • 24 671 376 275 265 058 077 845 959 052 ÷ 2 = 12 335 688 137 632 529 038 922 979 526 + 0;
  • 12 335 688 137 632 529 038 922 979 526 ÷ 2 = 6 167 844 068 816 264 519 461 489 763 + 0;
  • 6 167 844 068 816 264 519 461 489 763 ÷ 2 = 3 083 922 034 408 132 259 730 744 881 + 1;
  • 3 083 922 034 408 132 259 730 744 881 ÷ 2 = 1 541 961 017 204 066 129 865 372 440 + 1;
  • 1 541 961 017 204 066 129 865 372 440 ÷ 2 = 770 980 508 602 033 064 932 686 220 + 0;
  • 770 980 508 602 033 064 932 686 220 ÷ 2 = 385 490 254 301 016 532 466 343 110 + 0;
  • 385 490 254 301 016 532 466 343 110 ÷ 2 = 192 745 127 150 508 266 233 171 555 + 0;
  • 192 745 127 150 508 266 233 171 555 ÷ 2 = 96 372 563 575 254 133 116 585 777 + 1;
  • 96 372 563 575 254 133 116 585 777 ÷ 2 = 48 186 281 787 627 066 558 292 888 + 1;
  • 48 186 281 787 627 066 558 292 888 ÷ 2 = 24 093 140 893 813 533 279 146 444 + 0;
  • 24 093 140 893 813 533 279 146 444 ÷ 2 = 12 046 570 446 906 766 639 573 222 + 0;
  • 12 046 570 446 906 766 639 573 222 ÷ 2 = 6 023 285 223 453 383 319 786 611 + 0;
  • 6 023 285 223 453 383 319 786 611 ÷ 2 = 3 011 642 611 726 691 659 893 305 + 1;
  • 3 011 642 611 726 691 659 893 305 ÷ 2 = 1 505 821 305 863 345 829 946 652 + 1;
  • 1 505 821 305 863 345 829 946 652 ÷ 2 = 752 910 652 931 672 914 973 326 + 0;
  • 752 910 652 931 672 914 973 326 ÷ 2 = 376 455 326 465 836 457 486 663 + 0;
  • 376 455 326 465 836 457 486 663 ÷ 2 = 188 227 663 232 918 228 743 331 + 1;
  • 188 227 663 232 918 228 743 331 ÷ 2 = 94 113 831 616 459 114 371 665 + 1;
  • 94 113 831 616 459 114 371 665 ÷ 2 = 47 056 915 808 229 557 185 832 + 1;
  • 47 056 915 808 229 557 185 832 ÷ 2 = 23 528 457 904 114 778 592 916 + 0;
  • 23 528 457 904 114 778 592 916 ÷ 2 = 11 764 228 952 057 389 296 458 + 0;
  • 11 764 228 952 057 389 296 458 ÷ 2 = 5 882 114 476 028 694 648 229 + 0;
  • 5 882 114 476 028 694 648 229 ÷ 2 = 2 941 057 238 014 347 324 114 + 1;
  • 2 941 057 238 014 347 324 114 ÷ 2 = 1 470 528 619 007 173 662 057 + 0;
  • 1 470 528 619 007 173 662 057 ÷ 2 = 735 264 309 503 586 831 028 + 1;
  • 735 264 309 503 586 831 028 ÷ 2 = 367 632 154 751 793 415 514 + 0;
  • 367 632 154 751 793 415 514 ÷ 2 = 183 816 077 375 896 707 757 + 0;
  • 183 816 077 375 896 707 757 ÷ 2 = 91 908 038 687 948 353 878 + 1;
  • 91 908 038 687 948 353 878 ÷ 2 = 45 954 019 343 974 176 939 + 0;
  • 45 954 019 343 974 176 939 ÷ 2 = 22 977 009 671 987 088 469 + 1;
  • 22 977 009 671 987 088 469 ÷ 2 = 11 488 504 835 993 544 234 + 1;
  • 11 488 504 835 993 544 234 ÷ 2 = 5 744 252 417 996 772 117 + 0;
  • 5 744 252 417 996 772 117 ÷ 2 = 2 872 126 208 998 386 058 + 1;
  • 2 872 126 208 998 386 058 ÷ 2 = 1 436 063 104 499 193 029 + 0;
  • 1 436 063 104 499 193 029 ÷ 2 = 718 031 552 249 596 514 + 1;
  • 718 031 552 249 596 514 ÷ 2 = 359 015 776 124 798 257 + 0;
  • 359 015 776 124 798 257 ÷ 2 = 179 507 888 062 399 128 + 1;
  • 179 507 888 062 399 128 ÷ 2 = 89 753 944 031 199 564 + 0;
  • 89 753 944 031 199 564 ÷ 2 = 44 876 972 015 599 782 + 0;
  • 44 876 972 015 599 782 ÷ 2 = 22 438 486 007 799 891 + 0;
  • 22 438 486 007 799 891 ÷ 2 = 11 219 243 003 899 945 + 1;
  • 11 219 243 003 899 945 ÷ 2 = 5 609 621 501 949 972 + 1;
  • 5 609 621 501 949 972 ÷ 2 = 2 804 810 750 974 986 + 0;
  • 2 804 810 750 974 986 ÷ 2 = 1 402 405 375 487 493 + 0;
  • 1 402 405 375 487 493 ÷ 2 = 701 202 687 743 746 + 1;
  • 701 202 687 743 746 ÷ 2 = 350 601 343 871 873 + 0;
  • 350 601 343 871 873 ÷ 2 = 175 300 671 935 936 + 1;
  • 175 300 671 935 936 ÷ 2 = 87 650 335 967 968 + 0;
  • 87 650 335 967 968 ÷ 2 = 43 825 167 983 984 + 0;
  • 43 825 167 983 984 ÷ 2 = 21 912 583 991 992 + 0;
  • 21 912 583 991 992 ÷ 2 = 10 956 291 995 996 + 0;
  • 10 956 291 995 996 ÷ 2 = 5 478 145 997 998 + 0;
  • 5 478 145 997 998 ÷ 2 = 2 739 072 998 999 + 0;
  • 2 739 072 998 999 ÷ 2 = 1 369 536 499 499 + 1;
  • 1 369 536 499 499 ÷ 2 = 684 768 249 749 + 1;
  • 684 768 249 749 ÷ 2 = 342 384 124 874 + 1;
  • 342 384 124 874 ÷ 2 = 171 192 062 437 + 0;
  • 171 192 062 437 ÷ 2 = 85 596 031 218 + 1;
  • 85 596 031 218 ÷ 2 = 42 798 015 609 + 0;
  • 42 798 015 609 ÷ 2 = 21 399 007 804 + 1;
  • 21 399 007 804 ÷ 2 = 10 699 503 902 + 0;
  • 10 699 503 902 ÷ 2 = 5 349 751 951 + 0;
  • 5 349 751 951 ÷ 2 = 2 674 875 975 + 1;
  • 2 674 875 975 ÷ 2 = 1 337 437 987 + 1;
  • 1 337 437 987 ÷ 2 = 668 718 993 + 1;
  • 668 718 993 ÷ 2 = 334 359 496 + 1;
  • 334 359 496 ÷ 2 = 167 179 748 + 0;
  • 167 179 748 ÷ 2 = 83 589 874 + 0;
  • 83 589 874 ÷ 2 = 41 794 937 + 0;
  • 41 794 937 ÷ 2 = 20 897 468 + 1;
  • 20 897 468 ÷ 2 = 10 448 734 + 0;
  • 10 448 734 ÷ 2 = 5 224 367 + 0;
  • 5 224 367 ÷ 2 = 2 612 183 + 1;
  • 2 612 183 ÷ 2 = 1 306 091 + 1;
  • 1 306 091 ÷ 2 = 653 045 + 1;
  • 653 045 ÷ 2 = 326 522 + 1;
  • 326 522 ÷ 2 = 163 261 + 0;
  • 163 261 ÷ 2 = 81 630 + 1;
  • 81 630 ÷ 2 = 40 815 + 0;
  • 40 815 ÷ 2 = 20 407 + 1;
  • 20 407 ÷ 2 = 10 203 + 1;
  • 10 203 ÷ 2 = 5 101 + 1;
  • 5 101 ÷ 2 = 2 550 + 1;
  • 2 550 ÷ 2 = 1 275 + 0;
  • 1 275 ÷ 2 = 637 + 1;
  • 637 ÷ 2 = 318 + 1;
  • 318 ÷ 2 = 159 + 0;
  • 159 ÷ 2 = 79 + 1;
  • 79 ÷ 2 = 39 + 1;
  • 39 ÷ 2 = 19 + 1;
  • 19 ÷ 2 = 9 + 1;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 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.

111 110 001 000 001 011 110 001 001 111 010 000 111 100 106(10) =


100 1111 1011 0111 1010 1111 0010 0011 1100 1010 1110 0000 0101 0011 0001 0101 0110 1001 0100 0111 0011 0001 1000 1100 1011 1110 1100 0010 1110 1011 0011 0010 0111 0110 0000 1100 1010(2)


3. Normalize the binary representation of the number.

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


111 110 001 000 001 011 110 001 001 111 010 000 111 100 106(10) =


100 1111 1011 0111 1010 1111 0010 0011 1100 1010 1110 0000 0101 0011 0001 0101 0110 1001 0100 0111 0011 0001 1000 1100 1011 1110 1100 0010 1110 1011 0011 0010 0111 0110 0000 1100 1010(2) =


100 1111 1011 0111 1010 1111 0010 0011 1100 1010 1110 0000 0101 0011 0001 0101 0110 1001 0100 0111 0011 0001 1000 1100 1011 1110 1100 0010 1110 1011 0011 0010 0111 0110 0000 1100 1010(2) × 20 =


1.0011 1110 1101 1110 1011 1100 1000 1111 0010 1011 1000 0001 0100 1100 0101 0101 1010 0101 0001 1100 1100 0110 0011 0010 1111 1011 0000 1011 1010 1100 1100 1001 1101 1000 0011 0010 10(2) × 2146


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


Mantissa (not normalized):
1.0011 1110 1101 1110 1011 1100 1000 1111 0010 1011 1000 0001 0100 1100 0101 0101 1010 0101 0001 1100 1100 0110 0011 0010 1111 1011 0000 1011 1010 1100 1100 1001 1101 1000 0011 0010 10


5. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


146 + 2(11-1) - 1 =


(146 + 1 023)(10) =


1 169(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 169 ÷ 2 = 584 + 1;
  • 584 ÷ 2 = 292 + 0;
  • 292 ÷ 2 = 146 + 0;
  • 146 ÷ 2 = 73 + 0;
  • 73 ÷ 2 = 36 + 1;
  • 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) =


1169(10) =


100 1001 0001(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. 0011 1110 1101 1110 1011 1100 1000 1111 0010 1011 1000 0001 0100 11 0001 0101 0110 1001 0100 0111 0011 0001 1000 1100 1011 1110 1100 0010 1110 1011 0011 0010 0111 0110 0000 1100 1010 =


0011 1110 1101 1110 1011 1100 1000 1111 0010 1011 1000 0001 0100


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 1001 0001


Mantissa (52 bits) =
0011 1110 1101 1110 1011 1100 1000 1111 0010 1011 1000 0001 0100


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

0 - 100 1001 0001 - 0011 1110 1101 1110 1011 1100 1000 1111 0010 1011 1000 0001 0100


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