0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 139 6 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 139 6(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 111 011 110 110 111 100 000 011 101 001 111 139 6(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 111 011 110 110 111 100 000 011 101 001 111 139 6.

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 111 011 110 110 111 100 000 011 101 001 111 139 6 × 2 = 0 + 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 279 2;
  • 2) 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 279 2 × 2 = 0 + 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 558 4;
  • 3) 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 558 4 × 2 = 0 + 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 116 8;
  • 4) 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 116 8 × 2 = 0 + 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 233 6;
  • 5) 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 233 6 × 2 = 0 + 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 467 2;
  • 6) 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 467 2 × 2 = 0 + 0.000 000 007 104 711 047 047 110 400 000 710 464 071 112 934 4;
  • 7) 0.000 000 007 104 711 047 047 110 400 000 710 464 071 112 934 4 × 2 = 0 + 0.000 000 014 209 422 094 094 220 800 001 420 928 142 225 868 8;
  • 8) 0.000 000 014 209 422 094 094 220 800 001 420 928 142 225 868 8 × 2 = 0 + 0.000 000 028 418 844 188 188 441 600 002 841 856 284 451 737 6;
  • 9) 0.000 000 028 418 844 188 188 441 600 002 841 856 284 451 737 6 × 2 = 0 + 0.000 000 056 837 688 376 376 883 200 005 683 712 568 903 475 2;
  • 10) 0.000 000 056 837 688 376 376 883 200 005 683 712 568 903 475 2 × 2 = 0 + 0.000 000 113 675 376 752 753 766 400 011 367 425 137 806 950 4;
  • 11) 0.000 000 113 675 376 752 753 766 400 011 367 425 137 806 950 4 × 2 = 0 + 0.000 000 227 350 753 505 507 532 800 022 734 850 275 613 900 8;
  • 12) 0.000 000 227 350 753 505 507 532 800 022 734 850 275 613 900 8 × 2 = 0 + 0.000 000 454 701 507 011 015 065 600 045 469 700 551 227 801 6;
  • 13) 0.000 000 454 701 507 011 015 065 600 045 469 700 551 227 801 6 × 2 = 0 + 0.000 000 909 403 014 022 030 131 200 090 939 401 102 455 603 2;
  • 14) 0.000 000 909 403 014 022 030 131 200 090 939 401 102 455 603 2 × 2 = 0 + 0.000 001 818 806 028 044 060 262 400 181 878 802 204 911 206 4;
  • 15) 0.000 001 818 806 028 044 060 262 400 181 878 802 204 911 206 4 × 2 = 0 + 0.000 003 637 612 056 088 120 524 800 363 757 604 409 822 412 8;
  • 16) 0.000 003 637 612 056 088 120 524 800 363 757 604 409 822 412 8 × 2 = 0 + 0.000 007 275 224 112 176 241 049 600 727 515 208 819 644 825 6;
  • 17) 0.000 007 275 224 112 176 241 049 600 727 515 208 819 644 825 6 × 2 = 0 + 0.000 014 550 448 224 352 482 099 201 455 030 417 639 289 651 2;
  • 18) 0.000 014 550 448 224 352 482 099 201 455 030 417 639 289 651 2 × 2 = 0 + 0.000 029 100 896 448 704 964 198 402 910 060 835 278 579 302 4;
  • 19) 0.000 029 100 896 448 704 964 198 402 910 060 835 278 579 302 4 × 2 = 0 + 0.000 058 201 792 897 409 928 396 805 820 121 670 557 158 604 8;
  • 20) 0.000 058 201 792 897 409 928 396 805 820 121 670 557 158 604 8 × 2 = 0 + 0.000 116 403 585 794 819 856 793 611 640 243 341 114 317 209 6;
  • 21) 0.000 116 403 585 794 819 856 793 611 640 243 341 114 317 209 6 × 2 = 0 + 0.000 232 807 171 589 639 713 587 223 280 486 682 228 634 419 2;
  • 22) 0.000 232 807 171 589 639 713 587 223 280 486 682 228 634 419 2 × 2 = 0 + 0.000 465 614 343 179 279 427 174 446 560 973 364 457 268 838 4;
  • 23) 0.000 465 614 343 179 279 427 174 446 560 973 364 457 268 838 4 × 2 = 0 + 0.000 931 228 686 358 558 854 348 893 121 946 728 914 537 676 8;
  • 24) 0.000 931 228 686 358 558 854 348 893 121 946 728 914 537 676 8 × 2 = 0 + 0.001 862 457 372 717 117 708 697 786 243 893 457 829 075 353 6;
  • 25) 0.001 862 457 372 717 117 708 697 786 243 893 457 829 075 353 6 × 2 = 0 + 0.003 724 914 745 434 235 417 395 572 487 786 915 658 150 707 2;
  • 26) 0.003 724 914 745 434 235 417 395 572 487 786 915 658 150 707 2 × 2 = 0 + 0.007 449 829 490 868 470 834 791 144 975 573 831 316 301 414 4;
  • 27) 0.007 449 829 490 868 470 834 791 144 975 573 831 316 301 414 4 × 2 = 0 + 0.014 899 658 981 736 941 669 582 289 951 147 662 632 602 828 8;
  • 28) 0.014 899 658 981 736 941 669 582 289 951 147 662 632 602 828 8 × 2 = 0 + 0.029 799 317 963 473 883 339 164 579 902 295 325 265 205 657 6;
  • 29) 0.029 799 317 963 473 883 339 164 579 902 295 325 265 205 657 6 × 2 = 0 + 0.059 598 635 926 947 766 678 329 159 804 590 650 530 411 315 2;
  • 30) 0.059 598 635 926 947 766 678 329 159 804 590 650 530 411 315 2 × 2 = 0 + 0.119 197 271 853 895 533 356 658 319 609 181 301 060 822 630 4;
  • 31) 0.119 197 271 853 895 533 356 658 319 609 181 301 060 822 630 4 × 2 = 0 + 0.238 394 543 707 791 066 713 316 639 218 362 602 121 645 260 8;
  • 32) 0.238 394 543 707 791 066 713 316 639 218 362 602 121 645 260 8 × 2 = 0 + 0.476 789 087 415 582 133 426 633 278 436 725 204 243 290 521 6;
  • 33) 0.476 789 087 415 582 133 426 633 278 436 725 204 243 290 521 6 × 2 = 0 + 0.953 578 174 831 164 266 853 266 556 873 450 408 486 581 043 2;
  • 34) 0.953 578 174 831 164 266 853 266 556 873 450 408 486 581 043 2 × 2 = 1 + 0.907 156 349 662 328 533 706 533 113 746 900 816 973 162 086 4;
  • 35) 0.907 156 349 662 328 533 706 533 113 746 900 816 973 162 086 4 × 2 = 1 + 0.814 312 699 324 657 067 413 066 227 493 801 633 946 324 172 8;
  • 36) 0.814 312 699 324 657 067 413 066 227 493 801 633 946 324 172 8 × 2 = 1 + 0.628 625 398 649 314 134 826 132 454 987 603 267 892 648 345 6;
  • 37) 0.628 625 398 649 314 134 826 132 454 987 603 267 892 648 345 6 × 2 = 1 + 0.257 250 797 298 628 269 652 264 909 975 206 535 785 296 691 2;
  • 38) 0.257 250 797 298 628 269 652 264 909 975 206 535 785 296 691 2 × 2 = 0 + 0.514 501 594 597 256 539 304 529 819 950 413 071 570 593 382 4;
  • 39) 0.514 501 594 597 256 539 304 529 819 950 413 071 570 593 382 4 × 2 = 1 + 0.029 003 189 194 513 078 609 059 639 900 826 143 141 186 764 8;
  • 40) 0.029 003 189 194 513 078 609 059 639 900 826 143 141 186 764 8 × 2 = 0 + 0.058 006 378 389 026 157 218 119 279 801 652 286 282 373 529 6;
  • 41) 0.058 006 378 389 026 157 218 119 279 801 652 286 282 373 529 6 × 2 = 0 + 0.116 012 756 778 052 314 436 238 559 603 304 572 564 747 059 2;
  • 42) 0.116 012 756 778 052 314 436 238 559 603 304 572 564 747 059 2 × 2 = 0 + 0.232 025 513 556 104 628 872 477 119 206 609 145 129 494 118 4;
  • 43) 0.232 025 513 556 104 628 872 477 119 206 609 145 129 494 118 4 × 2 = 0 + 0.464 051 027 112 209 257 744 954 238 413 218 290 258 988 236 8;
  • 44) 0.464 051 027 112 209 257 744 954 238 413 218 290 258 988 236 8 × 2 = 0 + 0.928 102 054 224 418 515 489 908 476 826 436 580 517 976 473 6;
  • 45) 0.928 102 054 224 418 515 489 908 476 826 436 580 517 976 473 6 × 2 = 1 + 0.856 204 108 448 837 030 979 816 953 652 873 161 035 952 947 2;
  • 46) 0.856 204 108 448 837 030 979 816 953 652 873 161 035 952 947 2 × 2 = 1 + 0.712 408 216 897 674 061 959 633 907 305 746 322 071 905 894 4;
  • 47) 0.712 408 216 897 674 061 959 633 907 305 746 322 071 905 894 4 × 2 = 1 + 0.424 816 433 795 348 123 919 267 814 611 492 644 143 811 788 8;
  • 48) 0.424 816 433 795 348 123 919 267 814 611 492 644 143 811 788 8 × 2 = 0 + 0.849 632 867 590 696 247 838 535 629 222 985 288 287 623 577 6;
  • 49) 0.849 632 867 590 696 247 838 535 629 222 985 288 287 623 577 6 × 2 = 1 + 0.699 265 735 181 392 495 677 071 258 445 970 576 575 247 155 2;
  • 50) 0.699 265 735 181 392 495 677 071 258 445 970 576 575 247 155 2 × 2 = 1 + 0.398 531 470 362 784 991 354 142 516 891 941 153 150 494 310 4;
  • 51) 0.398 531 470 362 784 991 354 142 516 891 941 153 150 494 310 4 × 2 = 0 + 0.797 062 940 725 569 982 708 285 033 783 882 306 300 988 620 8;
  • 52) 0.797 062 940 725 569 982 708 285 033 783 882 306 300 988 620 8 × 2 = 1 + 0.594 125 881 451 139 965 416 570 067 567 764 612 601 977 241 6;
  • 53) 0.594 125 881 451 139 965 416 570 067 567 764 612 601 977 241 6 × 2 = 1 + 0.188 251 762 902 279 930 833 140 135 135 529 225 203 954 483 2;
  • 54) 0.188 251 762 902 279 930 833 140 135 135 529 225 203 954 483 2 × 2 = 0 + 0.376 503 525 804 559 861 666 280 270 271 058 450 407 908 966 4;
  • 55) 0.376 503 525 804 559 861 666 280 270 271 058 450 407 908 966 4 × 2 = 0 + 0.753 007 051 609 119 723 332 560 540 542 116 900 815 817 932 8;
  • 56) 0.753 007 051 609 119 723 332 560 540 542 116 900 815 817 932 8 × 2 = 1 + 0.506 014 103 218 239 446 665 121 081 084 233 801 631 635 865 6;
  • 57) 0.506 014 103 218 239 446 665 121 081 084 233 801 631 635 865 6 × 2 = 1 + 0.012 028 206 436 478 893 330 242 162 168 467 603 263 271 731 2;
  • 58) 0.012 028 206 436 478 893 330 242 162 168 467 603 263 271 731 2 × 2 = 0 + 0.024 056 412 872 957 786 660 484 324 336 935 206 526 543 462 4;
  • 59) 0.024 056 412 872 957 786 660 484 324 336 935 206 526 543 462 4 × 2 = 0 + 0.048 112 825 745 915 573 320 968 648 673 870 413 053 086 924 8;
  • 60) 0.048 112 825 745 915 573 320 968 648 673 870 413 053 086 924 8 × 2 = 0 + 0.096 225 651 491 831 146 641 937 297 347 740 826 106 173 849 6;
  • 61) 0.096 225 651 491 831 146 641 937 297 347 740 826 106 173 849 6 × 2 = 0 + 0.192 451 302 983 662 293 283 874 594 695 481 652 212 347 699 2;
  • 62) 0.192 451 302 983 662 293 283 874 594 695 481 652 212 347 699 2 × 2 = 0 + 0.384 902 605 967 324 586 567 749 189 390 963 304 424 695 398 4;
  • 63) 0.384 902 605 967 324 586 567 749 189 390 963 304 424 695 398 4 × 2 = 0 + 0.769 805 211 934 649 173 135 498 378 781 926 608 849 390 796 8;
  • 64) 0.769 805 211 934 649 173 135 498 378 781 926 608 849 390 796 8 × 2 = 1 + 0.539 610 423 869 298 346 270 996 757 563 853 217 698 781 593 6;
  • 65) 0.539 610 423 869 298 346 270 996 757 563 853 217 698 781 593 6 × 2 = 1 + 0.079 220 847 738 596 692 541 993 515 127 706 435 397 563 187 2;
  • 66) 0.079 220 847 738 596 692 541 993 515 127 706 435 397 563 187 2 × 2 = 0 + 0.158 441 695 477 193 385 083 987 030 255 412 870 795 126 374 4;
  • 67) 0.158 441 695 477 193 385 083 987 030 255 412 870 795 126 374 4 × 2 = 0 + 0.316 883 390 954 386 770 167 974 060 510 825 741 590 252 748 8;
  • 68) 0.316 883 390 954 386 770 167 974 060 510 825 741 590 252 748 8 × 2 = 0 + 0.633 766 781 908 773 540 335 948 121 021 651 483 180 505 497 6;
  • 69) 0.633 766 781 908 773 540 335 948 121 021 651 483 180 505 497 6 × 2 = 1 + 0.267 533 563 817 547 080 671 896 242 043 302 966 361 010 995 2;
  • 70) 0.267 533 563 817 547 080 671 896 242 043 302 966 361 010 995 2 × 2 = 0 + 0.535 067 127 635 094 161 343 792 484 086 605 932 722 021 990 4;
  • 71) 0.535 067 127 635 094 161 343 792 484 086 605 932 722 021 990 4 × 2 = 1 + 0.070 134 255 270 188 322 687 584 968 173 211 865 444 043 980 8;
  • 72) 0.070 134 255 270 188 322 687 584 968 173 211 865 444 043 980 8 × 2 = 0 + 0.140 268 510 540 376 645 375 169 936 346 423 730 888 087 961 6;
  • 73) 0.140 268 510 540 376 645 375 169 936 346 423 730 888 087 961 6 × 2 = 0 + 0.280 537 021 080 753 290 750 339 872 692 847 461 776 175 923 2;
  • 74) 0.280 537 021 080 753 290 750 339 872 692 847 461 776 175 923 2 × 2 = 0 + 0.561 074 042 161 506 581 500 679 745 385 694 923 552 351 846 4;
  • 75) 0.561 074 042 161 506 581 500 679 745 385 694 923 552 351 846 4 × 2 = 1 + 0.122 148 084 323 013 163 001 359 490 771 389 847 104 703 692 8;
  • 76) 0.122 148 084 323 013 163 001 359 490 771 389 847 104 703 692 8 × 2 = 0 + 0.244 296 168 646 026 326 002 718 981 542 779 694 209 407 385 6;
  • 77) 0.244 296 168 646 026 326 002 718 981 542 779 694 209 407 385 6 × 2 = 0 + 0.488 592 337 292 052 652 005 437 963 085 559 388 418 814 771 2;
  • 78) 0.488 592 337 292 052 652 005 437 963 085 559 388 418 814 771 2 × 2 = 0 + 0.977 184 674 584 105 304 010 875 926 171 118 776 837 629 542 4;
  • 79) 0.977 184 674 584 105 304 010 875 926 171 118 776 837 629 542 4 × 2 = 1 + 0.954 369 349 168 210 608 021 751 852 342 237 553 675 259 084 8;
  • 80) 0.954 369 349 168 210 608 021 751 852 342 237 553 675 259 084 8 × 2 = 1 + 0.908 738 698 336 421 216 043 503 704 684 475 107 350 518 169 6;
  • 81) 0.908 738 698 336 421 216 043 503 704 684 475 107 350 518 169 6 × 2 = 1 + 0.817 477 396 672 842 432 087 007 409 368 950 214 701 036 339 2;
  • 82) 0.817 477 396 672 842 432 087 007 409 368 950 214 701 036 339 2 × 2 = 1 + 0.634 954 793 345 684 864 174 014 818 737 900 429 402 072 678 4;
  • 83) 0.634 954 793 345 684 864 174 014 818 737 900 429 402 072 678 4 × 2 = 1 + 0.269 909 586 691 369 728 348 029 637 475 800 858 804 145 356 8;
  • 84) 0.269 909 586 691 369 728 348 029 637 475 800 858 804 145 356 8 × 2 = 0 + 0.539 819 173 382 739 456 696 059 274 951 601 717 608 290 713 6;
  • 85) 0.539 819 173 382 739 456 696 059 274 951 601 717 608 290 713 6 × 2 = 1 + 0.079 638 346 765 478 913 392 118 549 903 203 435 216 581 427 2;
  • 86) 0.079 638 346 765 478 913 392 118 549 903 203 435 216 581 427 2 × 2 = 0 + 0.159 276 693 530 957 826 784 237 099 806 406 870 433 162 854 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 111 011 110 110 111 100 000 011 101 001 111 139 6(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0111 1010 0000 1110 1101 1001 1000 0001 1000 1010 0010 0011 1110 10(2)

5. Positive number before normalization:

0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 139 6(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0111 1010 0000 1110 1101 1001 1000 0001 1000 1010 0010 0011 1110 10(2)

6. Normalize the binary representation of the number.

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


0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 139 6(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0111 1010 0000 1110 1101 1001 1000 0001 1000 1010 0010 0011 1110 10(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0111 1010 0000 1110 1101 1001 1000 0001 1000 1010 0010 0011 1110 10(2) × 20 =


1.1110 1000 0011 1011 0110 0110 0000 0110 0010 1000 1000 1111 1010(2) × 2-34


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


Mantissa (not normalized):
1.1110 1000 0011 1011 0110 0110 0000 0110 0010 1000 1000 1111 1010


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


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


(-34 + 1 023)(10) =


989(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;
  • 989 ÷ 2 = 494 + 1;
  • 494 ÷ 2 = 247 + 0;
  • 247 ÷ 2 = 123 + 1;
  • 123 ÷ 2 = 61 + 1;
  • 61 ÷ 2 = 30 + 1;
  • 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) =


989(10) =


011 1101 1101(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. 1110 1000 0011 1011 0110 0110 0000 0110 0010 1000 1000 1111 1010 =


1110 1000 0011 1011 0110 0110 0000 0110 0010 1000 1000 1111 1010


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 1101 1101


Mantissa (52 bits) =
1110 1000 0011 1011 0110 0110 0000 0110 0010 1000 1000 1111 1010


Decimal number 0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 139 6 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 011 1101 1101 - 1110 1000 0011 1011 0110 0110 0000 0110 0010 1000 1000 1111 1010

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