0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 140 9 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 140 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 000 111 011 110 110 111 100 000 011 101 001 111 140 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. 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 140 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 000 111 011 110 110 111 100 000 011 101 001 111 140 9 × 2 = 0 + 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 281 8;
  • 2) 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 281 8 × 2 = 0 + 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 563 6;
  • 3) 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 563 6 × 2 = 0 + 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 127 2;
  • 4) 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 127 2 × 2 = 0 + 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 254 4;
  • 5) 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 254 4 × 2 = 0 + 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 508 8;
  • 6) 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 508 8 × 2 = 0 + 0.000 000 007 104 711 047 047 110 400 000 710 464 071 113 017 6;
  • 7) 0.000 000 007 104 711 047 047 110 400 000 710 464 071 113 017 6 × 2 = 0 + 0.000 000 014 209 422 094 094 220 800 001 420 928 142 226 035 2;
  • 8) 0.000 000 014 209 422 094 094 220 800 001 420 928 142 226 035 2 × 2 = 0 + 0.000 000 028 418 844 188 188 441 600 002 841 856 284 452 070 4;
  • 9) 0.000 000 028 418 844 188 188 441 600 002 841 856 284 452 070 4 × 2 = 0 + 0.000 000 056 837 688 376 376 883 200 005 683 712 568 904 140 8;
  • 10) 0.000 000 056 837 688 376 376 883 200 005 683 712 568 904 140 8 × 2 = 0 + 0.000 000 113 675 376 752 753 766 400 011 367 425 137 808 281 6;
  • 11) 0.000 000 113 675 376 752 753 766 400 011 367 425 137 808 281 6 × 2 = 0 + 0.000 000 227 350 753 505 507 532 800 022 734 850 275 616 563 2;
  • 12) 0.000 000 227 350 753 505 507 532 800 022 734 850 275 616 563 2 × 2 = 0 + 0.000 000 454 701 507 011 015 065 600 045 469 700 551 233 126 4;
  • 13) 0.000 000 454 701 507 011 015 065 600 045 469 700 551 233 126 4 × 2 = 0 + 0.000 000 909 403 014 022 030 131 200 090 939 401 102 466 252 8;
  • 14) 0.000 000 909 403 014 022 030 131 200 090 939 401 102 466 252 8 × 2 = 0 + 0.000 001 818 806 028 044 060 262 400 181 878 802 204 932 505 6;
  • 15) 0.000 001 818 806 028 044 060 262 400 181 878 802 204 932 505 6 × 2 = 0 + 0.000 003 637 612 056 088 120 524 800 363 757 604 409 865 011 2;
  • 16) 0.000 003 637 612 056 088 120 524 800 363 757 604 409 865 011 2 × 2 = 0 + 0.000 007 275 224 112 176 241 049 600 727 515 208 819 730 022 4;
  • 17) 0.000 007 275 224 112 176 241 049 600 727 515 208 819 730 022 4 × 2 = 0 + 0.000 014 550 448 224 352 482 099 201 455 030 417 639 460 044 8;
  • 18) 0.000 014 550 448 224 352 482 099 201 455 030 417 639 460 044 8 × 2 = 0 + 0.000 029 100 896 448 704 964 198 402 910 060 835 278 920 089 6;
  • 19) 0.000 029 100 896 448 704 964 198 402 910 060 835 278 920 089 6 × 2 = 0 + 0.000 058 201 792 897 409 928 396 805 820 121 670 557 840 179 2;
  • 20) 0.000 058 201 792 897 409 928 396 805 820 121 670 557 840 179 2 × 2 = 0 + 0.000 116 403 585 794 819 856 793 611 640 243 341 115 680 358 4;
  • 21) 0.000 116 403 585 794 819 856 793 611 640 243 341 115 680 358 4 × 2 = 0 + 0.000 232 807 171 589 639 713 587 223 280 486 682 231 360 716 8;
  • 22) 0.000 232 807 171 589 639 713 587 223 280 486 682 231 360 716 8 × 2 = 0 + 0.000 465 614 343 179 279 427 174 446 560 973 364 462 721 433 6;
  • 23) 0.000 465 614 343 179 279 427 174 446 560 973 364 462 721 433 6 × 2 = 0 + 0.000 931 228 686 358 558 854 348 893 121 946 728 925 442 867 2;
  • 24) 0.000 931 228 686 358 558 854 348 893 121 946 728 925 442 867 2 × 2 = 0 + 0.001 862 457 372 717 117 708 697 786 243 893 457 850 885 734 4;
  • 25) 0.001 862 457 372 717 117 708 697 786 243 893 457 850 885 734 4 × 2 = 0 + 0.003 724 914 745 434 235 417 395 572 487 786 915 701 771 468 8;
  • 26) 0.003 724 914 745 434 235 417 395 572 487 786 915 701 771 468 8 × 2 = 0 + 0.007 449 829 490 868 470 834 791 144 975 573 831 403 542 937 6;
  • 27) 0.007 449 829 490 868 470 834 791 144 975 573 831 403 542 937 6 × 2 = 0 + 0.014 899 658 981 736 941 669 582 289 951 147 662 807 085 875 2;
  • 28) 0.014 899 658 981 736 941 669 582 289 951 147 662 807 085 875 2 × 2 = 0 + 0.029 799 317 963 473 883 339 164 579 902 295 325 614 171 750 4;
  • 29) 0.029 799 317 963 473 883 339 164 579 902 295 325 614 171 750 4 × 2 = 0 + 0.059 598 635 926 947 766 678 329 159 804 590 651 228 343 500 8;
  • 30) 0.059 598 635 926 947 766 678 329 159 804 590 651 228 343 500 8 × 2 = 0 + 0.119 197 271 853 895 533 356 658 319 609 181 302 456 687 001 6;
  • 31) 0.119 197 271 853 895 533 356 658 319 609 181 302 456 687 001 6 × 2 = 0 + 0.238 394 543 707 791 066 713 316 639 218 362 604 913 374 003 2;
  • 32) 0.238 394 543 707 791 066 713 316 639 218 362 604 913 374 003 2 × 2 = 0 + 0.476 789 087 415 582 133 426 633 278 436 725 209 826 748 006 4;
  • 33) 0.476 789 087 415 582 133 426 633 278 436 725 209 826 748 006 4 × 2 = 0 + 0.953 578 174 831 164 266 853 266 556 873 450 419 653 496 012 8;
  • 34) 0.953 578 174 831 164 266 853 266 556 873 450 419 653 496 012 8 × 2 = 1 + 0.907 156 349 662 328 533 706 533 113 746 900 839 306 992 025 6;
  • 35) 0.907 156 349 662 328 533 706 533 113 746 900 839 306 992 025 6 × 2 = 1 + 0.814 312 699 324 657 067 413 066 227 493 801 678 613 984 051 2;
  • 36) 0.814 312 699 324 657 067 413 066 227 493 801 678 613 984 051 2 × 2 = 1 + 0.628 625 398 649 314 134 826 132 454 987 603 357 227 968 102 4;
  • 37) 0.628 625 398 649 314 134 826 132 454 987 603 357 227 968 102 4 × 2 = 1 + 0.257 250 797 298 628 269 652 264 909 975 206 714 455 936 204 8;
  • 38) 0.257 250 797 298 628 269 652 264 909 975 206 714 455 936 204 8 × 2 = 0 + 0.514 501 594 597 256 539 304 529 819 950 413 428 911 872 409 6;
  • 39) 0.514 501 594 597 256 539 304 529 819 950 413 428 911 872 409 6 × 2 = 1 + 0.029 003 189 194 513 078 609 059 639 900 826 857 823 744 819 2;
  • 40) 0.029 003 189 194 513 078 609 059 639 900 826 857 823 744 819 2 × 2 = 0 + 0.058 006 378 389 026 157 218 119 279 801 653 715 647 489 638 4;
  • 41) 0.058 006 378 389 026 157 218 119 279 801 653 715 647 489 638 4 × 2 = 0 + 0.116 012 756 778 052 314 436 238 559 603 307 431 294 979 276 8;
  • 42) 0.116 012 756 778 052 314 436 238 559 603 307 431 294 979 276 8 × 2 = 0 + 0.232 025 513 556 104 628 872 477 119 206 614 862 589 958 553 6;
  • 43) 0.232 025 513 556 104 628 872 477 119 206 614 862 589 958 553 6 × 2 = 0 + 0.464 051 027 112 209 257 744 954 238 413 229 725 179 917 107 2;
  • 44) 0.464 051 027 112 209 257 744 954 238 413 229 725 179 917 107 2 × 2 = 0 + 0.928 102 054 224 418 515 489 908 476 826 459 450 359 834 214 4;
  • 45) 0.928 102 054 224 418 515 489 908 476 826 459 450 359 834 214 4 × 2 = 1 + 0.856 204 108 448 837 030 979 816 953 652 918 900 719 668 428 8;
  • 46) 0.856 204 108 448 837 030 979 816 953 652 918 900 719 668 428 8 × 2 = 1 + 0.712 408 216 897 674 061 959 633 907 305 837 801 439 336 857 6;
  • 47) 0.712 408 216 897 674 061 959 633 907 305 837 801 439 336 857 6 × 2 = 1 + 0.424 816 433 795 348 123 919 267 814 611 675 602 878 673 715 2;
  • 48) 0.424 816 433 795 348 123 919 267 814 611 675 602 878 673 715 2 × 2 = 0 + 0.849 632 867 590 696 247 838 535 629 223 351 205 757 347 430 4;
  • 49) 0.849 632 867 590 696 247 838 535 629 223 351 205 757 347 430 4 × 2 = 1 + 0.699 265 735 181 392 495 677 071 258 446 702 411 514 694 860 8;
  • 50) 0.699 265 735 181 392 495 677 071 258 446 702 411 514 694 860 8 × 2 = 1 + 0.398 531 470 362 784 991 354 142 516 893 404 823 029 389 721 6;
  • 51) 0.398 531 470 362 784 991 354 142 516 893 404 823 029 389 721 6 × 2 = 0 + 0.797 062 940 725 569 982 708 285 033 786 809 646 058 779 443 2;
  • 52) 0.797 062 940 725 569 982 708 285 033 786 809 646 058 779 443 2 × 2 = 1 + 0.594 125 881 451 139 965 416 570 067 573 619 292 117 558 886 4;
  • 53) 0.594 125 881 451 139 965 416 570 067 573 619 292 117 558 886 4 × 2 = 1 + 0.188 251 762 902 279 930 833 140 135 147 238 584 235 117 772 8;
  • 54) 0.188 251 762 902 279 930 833 140 135 147 238 584 235 117 772 8 × 2 = 0 + 0.376 503 525 804 559 861 666 280 270 294 477 168 470 235 545 6;
  • 55) 0.376 503 525 804 559 861 666 280 270 294 477 168 470 235 545 6 × 2 = 0 + 0.753 007 051 609 119 723 332 560 540 588 954 336 940 471 091 2;
  • 56) 0.753 007 051 609 119 723 332 560 540 588 954 336 940 471 091 2 × 2 = 1 + 0.506 014 103 218 239 446 665 121 081 177 908 673 880 942 182 4;
  • 57) 0.506 014 103 218 239 446 665 121 081 177 908 673 880 942 182 4 × 2 = 1 + 0.012 028 206 436 478 893 330 242 162 355 817 347 761 884 364 8;
  • 58) 0.012 028 206 436 478 893 330 242 162 355 817 347 761 884 364 8 × 2 = 0 + 0.024 056 412 872 957 786 660 484 324 711 634 695 523 768 729 6;
  • 59) 0.024 056 412 872 957 786 660 484 324 711 634 695 523 768 729 6 × 2 = 0 + 0.048 112 825 745 915 573 320 968 649 423 269 391 047 537 459 2;
  • 60) 0.048 112 825 745 915 573 320 968 649 423 269 391 047 537 459 2 × 2 = 0 + 0.096 225 651 491 831 146 641 937 298 846 538 782 095 074 918 4;
  • 61) 0.096 225 651 491 831 146 641 937 298 846 538 782 095 074 918 4 × 2 = 0 + 0.192 451 302 983 662 293 283 874 597 693 077 564 190 149 836 8;
  • 62) 0.192 451 302 983 662 293 283 874 597 693 077 564 190 149 836 8 × 2 = 0 + 0.384 902 605 967 324 586 567 749 195 386 155 128 380 299 673 6;
  • 63) 0.384 902 605 967 324 586 567 749 195 386 155 128 380 299 673 6 × 2 = 0 + 0.769 805 211 934 649 173 135 498 390 772 310 256 760 599 347 2;
  • 64) 0.769 805 211 934 649 173 135 498 390 772 310 256 760 599 347 2 × 2 = 1 + 0.539 610 423 869 298 346 270 996 781 544 620 513 521 198 694 4;
  • 65) 0.539 610 423 869 298 346 270 996 781 544 620 513 521 198 694 4 × 2 = 1 + 0.079 220 847 738 596 692 541 993 563 089 241 027 042 397 388 8;
  • 66) 0.079 220 847 738 596 692 541 993 563 089 241 027 042 397 388 8 × 2 = 0 + 0.158 441 695 477 193 385 083 987 126 178 482 054 084 794 777 6;
  • 67) 0.158 441 695 477 193 385 083 987 126 178 482 054 084 794 777 6 × 2 = 0 + 0.316 883 390 954 386 770 167 974 252 356 964 108 169 589 555 2;
  • 68) 0.316 883 390 954 386 770 167 974 252 356 964 108 169 589 555 2 × 2 = 0 + 0.633 766 781 908 773 540 335 948 504 713 928 216 339 179 110 4;
  • 69) 0.633 766 781 908 773 540 335 948 504 713 928 216 339 179 110 4 × 2 = 1 + 0.267 533 563 817 547 080 671 897 009 427 856 432 678 358 220 8;
  • 70) 0.267 533 563 817 547 080 671 897 009 427 856 432 678 358 220 8 × 2 = 0 + 0.535 067 127 635 094 161 343 794 018 855 712 865 356 716 441 6;
  • 71) 0.535 067 127 635 094 161 343 794 018 855 712 865 356 716 441 6 × 2 = 1 + 0.070 134 255 270 188 322 687 588 037 711 425 730 713 432 883 2;
  • 72) 0.070 134 255 270 188 322 687 588 037 711 425 730 713 432 883 2 × 2 = 0 + 0.140 268 510 540 376 645 375 176 075 422 851 461 426 865 766 4;
  • 73) 0.140 268 510 540 376 645 375 176 075 422 851 461 426 865 766 4 × 2 = 0 + 0.280 537 021 080 753 290 750 352 150 845 702 922 853 731 532 8;
  • 74) 0.280 537 021 080 753 290 750 352 150 845 702 922 853 731 532 8 × 2 = 0 + 0.561 074 042 161 506 581 500 704 301 691 405 845 707 463 065 6;
  • 75) 0.561 074 042 161 506 581 500 704 301 691 405 845 707 463 065 6 × 2 = 1 + 0.122 148 084 323 013 163 001 408 603 382 811 691 414 926 131 2;
  • 76) 0.122 148 084 323 013 163 001 408 603 382 811 691 414 926 131 2 × 2 = 0 + 0.244 296 168 646 026 326 002 817 206 765 623 382 829 852 262 4;
  • 77) 0.244 296 168 646 026 326 002 817 206 765 623 382 829 852 262 4 × 2 = 0 + 0.488 592 337 292 052 652 005 634 413 531 246 765 659 704 524 8;
  • 78) 0.488 592 337 292 052 652 005 634 413 531 246 765 659 704 524 8 × 2 = 0 + 0.977 184 674 584 105 304 011 268 827 062 493 531 319 409 049 6;
  • 79) 0.977 184 674 584 105 304 011 268 827 062 493 531 319 409 049 6 × 2 = 1 + 0.954 369 349 168 210 608 022 537 654 124 987 062 638 818 099 2;
  • 80) 0.954 369 349 168 210 608 022 537 654 124 987 062 638 818 099 2 × 2 = 1 + 0.908 738 698 336 421 216 045 075 308 249 974 125 277 636 198 4;
  • 81) 0.908 738 698 336 421 216 045 075 308 249 974 125 277 636 198 4 × 2 = 1 + 0.817 477 396 672 842 432 090 150 616 499 948 250 555 272 396 8;
  • 82) 0.817 477 396 672 842 432 090 150 616 499 948 250 555 272 396 8 × 2 = 1 + 0.634 954 793 345 684 864 180 301 232 999 896 501 110 544 793 6;
  • 83) 0.634 954 793 345 684 864 180 301 232 999 896 501 110 544 793 6 × 2 = 1 + 0.269 909 586 691 369 728 360 602 465 999 793 002 221 089 587 2;
  • 84) 0.269 909 586 691 369 728 360 602 465 999 793 002 221 089 587 2 × 2 = 0 + 0.539 819 173 382 739 456 721 204 931 999 586 004 442 179 174 4;
  • 85) 0.539 819 173 382 739 456 721 204 931 999 586 004 442 179 174 4 × 2 = 1 + 0.079 638 346 765 478 913 442 409 863 999 172 008 884 358 348 8;
  • 86) 0.079 638 346 765 478 913 442 409 863 999 172 008 884 358 348 8 × 2 = 0 + 0.159 276 693 530 957 826 884 819 727 998 344 017 768 716 697 6;

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 140 9(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 140 9(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 140 9(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 140 9 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