0.000 000 000 111 011 110 110 111 100 000 011 101 001 111 136 2 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 136 2(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 136 2(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 136 2.

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 136 2 × 2 = 0 + 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 272 4;
  • 2) 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 272 4 × 2 = 0 + 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 544 8;
  • 3) 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 544 8 × 2 = 0 + 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 089 6;
  • 4) 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 089 6 × 2 = 0 + 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 179 2;
  • 5) 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 179 2 × 2 = 0 + 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 358 4;
  • 6) 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 358 4 × 2 = 0 + 0.000 000 007 104 711 047 047 110 400 000 710 464 071 112 716 8;
  • 7) 0.000 000 007 104 711 047 047 110 400 000 710 464 071 112 716 8 × 2 = 0 + 0.000 000 014 209 422 094 094 220 800 001 420 928 142 225 433 6;
  • 8) 0.000 000 014 209 422 094 094 220 800 001 420 928 142 225 433 6 × 2 = 0 + 0.000 000 028 418 844 188 188 441 600 002 841 856 284 450 867 2;
  • 9) 0.000 000 028 418 844 188 188 441 600 002 841 856 284 450 867 2 × 2 = 0 + 0.000 000 056 837 688 376 376 883 200 005 683 712 568 901 734 4;
  • 10) 0.000 000 056 837 688 376 376 883 200 005 683 712 568 901 734 4 × 2 = 0 + 0.000 000 113 675 376 752 753 766 400 011 367 425 137 803 468 8;
  • 11) 0.000 000 113 675 376 752 753 766 400 011 367 425 137 803 468 8 × 2 = 0 + 0.000 000 227 350 753 505 507 532 800 022 734 850 275 606 937 6;
  • 12) 0.000 000 227 350 753 505 507 532 800 022 734 850 275 606 937 6 × 2 = 0 + 0.000 000 454 701 507 011 015 065 600 045 469 700 551 213 875 2;
  • 13) 0.000 000 454 701 507 011 015 065 600 045 469 700 551 213 875 2 × 2 = 0 + 0.000 000 909 403 014 022 030 131 200 090 939 401 102 427 750 4;
  • 14) 0.000 000 909 403 014 022 030 131 200 090 939 401 102 427 750 4 × 2 = 0 + 0.000 001 818 806 028 044 060 262 400 181 878 802 204 855 500 8;
  • 15) 0.000 001 818 806 028 044 060 262 400 181 878 802 204 855 500 8 × 2 = 0 + 0.000 003 637 612 056 088 120 524 800 363 757 604 409 711 001 6;
  • 16) 0.000 003 637 612 056 088 120 524 800 363 757 604 409 711 001 6 × 2 = 0 + 0.000 007 275 224 112 176 241 049 600 727 515 208 819 422 003 2;
  • 17) 0.000 007 275 224 112 176 241 049 600 727 515 208 819 422 003 2 × 2 = 0 + 0.000 014 550 448 224 352 482 099 201 455 030 417 638 844 006 4;
  • 18) 0.000 014 550 448 224 352 482 099 201 455 030 417 638 844 006 4 × 2 = 0 + 0.000 029 100 896 448 704 964 198 402 910 060 835 277 688 012 8;
  • 19) 0.000 029 100 896 448 704 964 198 402 910 060 835 277 688 012 8 × 2 = 0 + 0.000 058 201 792 897 409 928 396 805 820 121 670 555 376 025 6;
  • 20) 0.000 058 201 792 897 409 928 396 805 820 121 670 555 376 025 6 × 2 = 0 + 0.000 116 403 585 794 819 856 793 611 640 243 341 110 752 051 2;
  • 21) 0.000 116 403 585 794 819 856 793 611 640 243 341 110 752 051 2 × 2 = 0 + 0.000 232 807 171 589 639 713 587 223 280 486 682 221 504 102 4;
  • 22) 0.000 232 807 171 589 639 713 587 223 280 486 682 221 504 102 4 × 2 = 0 + 0.000 465 614 343 179 279 427 174 446 560 973 364 443 008 204 8;
  • 23) 0.000 465 614 343 179 279 427 174 446 560 973 364 443 008 204 8 × 2 = 0 + 0.000 931 228 686 358 558 854 348 893 121 946 728 886 016 409 6;
  • 24) 0.000 931 228 686 358 558 854 348 893 121 946 728 886 016 409 6 × 2 = 0 + 0.001 862 457 372 717 117 708 697 786 243 893 457 772 032 819 2;
  • 25) 0.001 862 457 372 717 117 708 697 786 243 893 457 772 032 819 2 × 2 = 0 + 0.003 724 914 745 434 235 417 395 572 487 786 915 544 065 638 4;
  • 26) 0.003 724 914 745 434 235 417 395 572 487 786 915 544 065 638 4 × 2 = 0 + 0.007 449 829 490 868 470 834 791 144 975 573 831 088 131 276 8;
  • 27) 0.007 449 829 490 868 470 834 791 144 975 573 831 088 131 276 8 × 2 = 0 + 0.014 899 658 981 736 941 669 582 289 951 147 662 176 262 553 6;
  • 28) 0.014 899 658 981 736 941 669 582 289 951 147 662 176 262 553 6 × 2 = 0 + 0.029 799 317 963 473 883 339 164 579 902 295 324 352 525 107 2;
  • 29) 0.029 799 317 963 473 883 339 164 579 902 295 324 352 525 107 2 × 2 = 0 + 0.059 598 635 926 947 766 678 329 159 804 590 648 705 050 214 4;
  • 30) 0.059 598 635 926 947 766 678 329 159 804 590 648 705 050 214 4 × 2 = 0 + 0.119 197 271 853 895 533 356 658 319 609 181 297 410 100 428 8;
  • 31) 0.119 197 271 853 895 533 356 658 319 609 181 297 410 100 428 8 × 2 = 0 + 0.238 394 543 707 791 066 713 316 639 218 362 594 820 200 857 6;
  • 32) 0.238 394 543 707 791 066 713 316 639 218 362 594 820 200 857 6 × 2 = 0 + 0.476 789 087 415 582 133 426 633 278 436 725 189 640 401 715 2;
  • 33) 0.476 789 087 415 582 133 426 633 278 436 725 189 640 401 715 2 × 2 = 0 + 0.953 578 174 831 164 266 853 266 556 873 450 379 280 803 430 4;
  • 34) 0.953 578 174 831 164 266 853 266 556 873 450 379 280 803 430 4 × 2 = 1 + 0.907 156 349 662 328 533 706 533 113 746 900 758 561 606 860 8;
  • 35) 0.907 156 349 662 328 533 706 533 113 746 900 758 561 606 860 8 × 2 = 1 + 0.814 312 699 324 657 067 413 066 227 493 801 517 123 213 721 6;
  • 36) 0.814 312 699 324 657 067 413 066 227 493 801 517 123 213 721 6 × 2 = 1 + 0.628 625 398 649 314 134 826 132 454 987 603 034 246 427 443 2;
  • 37) 0.628 625 398 649 314 134 826 132 454 987 603 034 246 427 443 2 × 2 = 1 + 0.257 250 797 298 628 269 652 264 909 975 206 068 492 854 886 4;
  • 38) 0.257 250 797 298 628 269 652 264 909 975 206 068 492 854 886 4 × 2 = 0 + 0.514 501 594 597 256 539 304 529 819 950 412 136 985 709 772 8;
  • 39) 0.514 501 594 597 256 539 304 529 819 950 412 136 985 709 772 8 × 2 = 1 + 0.029 003 189 194 513 078 609 059 639 900 824 273 971 419 545 6;
  • 40) 0.029 003 189 194 513 078 609 059 639 900 824 273 971 419 545 6 × 2 = 0 + 0.058 006 378 389 026 157 218 119 279 801 648 547 942 839 091 2;
  • 41) 0.058 006 378 389 026 157 218 119 279 801 648 547 942 839 091 2 × 2 = 0 + 0.116 012 756 778 052 314 436 238 559 603 297 095 885 678 182 4;
  • 42) 0.116 012 756 778 052 314 436 238 559 603 297 095 885 678 182 4 × 2 = 0 + 0.232 025 513 556 104 628 872 477 119 206 594 191 771 356 364 8;
  • 43) 0.232 025 513 556 104 628 872 477 119 206 594 191 771 356 364 8 × 2 = 0 + 0.464 051 027 112 209 257 744 954 238 413 188 383 542 712 729 6;
  • 44) 0.464 051 027 112 209 257 744 954 238 413 188 383 542 712 729 6 × 2 = 0 + 0.928 102 054 224 418 515 489 908 476 826 376 767 085 425 459 2;
  • 45) 0.928 102 054 224 418 515 489 908 476 826 376 767 085 425 459 2 × 2 = 1 + 0.856 204 108 448 837 030 979 816 953 652 753 534 170 850 918 4;
  • 46) 0.856 204 108 448 837 030 979 816 953 652 753 534 170 850 918 4 × 2 = 1 + 0.712 408 216 897 674 061 959 633 907 305 507 068 341 701 836 8;
  • 47) 0.712 408 216 897 674 061 959 633 907 305 507 068 341 701 836 8 × 2 = 1 + 0.424 816 433 795 348 123 919 267 814 611 014 136 683 403 673 6;
  • 48) 0.424 816 433 795 348 123 919 267 814 611 014 136 683 403 673 6 × 2 = 0 + 0.849 632 867 590 696 247 838 535 629 222 028 273 366 807 347 2;
  • 49) 0.849 632 867 590 696 247 838 535 629 222 028 273 366 807 347 2 × 2 = 1 + 0.699 265 735 181 392 495 677 071 258 444 056 546 733 614 694 4;
  • 50) 0.699 265 735 181 392 495 677 071 258 444 056 546 733 614 694 4 × 2 = 1 + 0.398 531 470 362 784 991 354 142 516 888 113 093 467 229 388 8;
  • 51) 0.398 531 470 362 784 991 354 142 516 888 113 093 467 229 388 8 × 2 = 0 + 0.797 062 940 725 569 982 708 285 033 776 226 186 934 458 777 6;
  • 52) 0.797 062 940 725 569 982 708 285 033 776 226 186 934 458 777 6 × 2 = 1 + 0.594 125 881 451 139 965 416 570 067 552 452 373 868 917 555 2;
  • 53) 0.594 125 881 451 139 965 416 570 067 552 452 373 868 917 555 2 × 2 = 1 + 0.188 251 762 902 279 930 833 140 135 104 904 747 737 835 110 4;
  • 54) 0.188 251 762 902 279 930 833 140 135 104 904 747 737 835 110 4 × 2 = 0 + 0.376 503 525 804 559 861 666 280 270 209 809 495 475 670 220 8;
  • 55) 0.376 503 525 804 559 861 666 280 270 209 809 495 475 670 220 8 × 2 = 0 + 0.753 007 051 609 119 723 332 560 540 419 618 990 951 340 441 6;
  • 56) 0.753 007 051 609 119 723 332 560 540 419 618 990 951 340 441 6 × 2 = 1 + 0.506 014 103 218 239 446 665 121 080 839 237 981 902 680 883 2;
  • 57) 0.506 014 103 218 239 446 665 121 080 839 237 981 902 680 883 2 × 2 = 1 + 0.012 028 206 436 478 893 330 242 161 678 475 963 805 361 766 4;
  • 58) 0.012 028 206 436 478 893 330 242 161 678 475 963 805 361 766 4 × 2 = 0 + 0.024 056 412 872 957 786 660 484 323 356 951 927 610 723 532 8;
  • 59) 0.024 056 412 872 957 786 660 484 323 356 951 927 610 723 532 8 × 2 = 0 + 0.048 112 825 745 915 573 320 968 646 713 903 855 221 447 065 6;
  • 60) 0.048 112 825 745 915 573 320 968 646 713 903 855 221 447 065 6 × 2 = 0 + 0.096 225 651 491 831 146 641 937 293 427 807 710 442 894 131 2;
  • 61) 0.096 225 651 491 831 146 641 937 293 427 807 710 442 894 131 2 × 2 = 0 + 0.192 451 302 983 662 293 283 874 586 855 615 420 885 788 262 4;
  • 62) 0.192 451 302 983 662 293 283 874 586 855 615 420 885 788 262 4 × 2 = 0 + 0.384 902 605 967 324 586 567 749 173 711 230 841 771 576 524 8;
  • 63) 0.384 902 605 967 324 586 567 749 173 711 230 841 771 576 524 8 × 2 = 0 + 0.769 805 211 934 649 173 135 498 347 422 461 683 543 153 049 6;
  • 64) 0.769 805 211 934 649 173 135 498 347 422 461 683 543 153 049 6 × 2 = 1 + 0.539 610 423 869 298 346 270 996 694 844 923 367 086 306 099 2;
  • 65) 0.539 610 423 869 298 346 270 996 694 844 923 367 086 306 099 2 × 2 = 1 + 0.079 220 847 738 596 692 541 993 389 689 846 734 172 612 198 4;
  • 66) 0.079 220 847 738 596 692 541 993 389 689 846 734 172 612 198 4 × 2 = 0 + 0.158 441 695 477 193 385 083 986 779 379 693 468 345 224 396 8;
  • 67) 0.158 441 695 477 193 385 083 986 779 379 693 468 345 224 396 8 × 2 = 0 + 0.316 883 390 954 386 770 167 973 558 759 386 936 690 448 793 6;
  • 68) 0.316 883 390 954 386 770 167 973 558 759 386 936 690 448 793 6 × 2 = 0 + 0.633 766 781 908 773 540 335 947 117 518 773 873 380 897 587 2;
  • 69) 0.633 766 781 908 773 540 335 947 117 518 773 873 380 897 587 2 × 2 = 1 + 0.267 533 563 817 547 080 671 894 235 037 547 746 761 795 174 4;
  • 70) 0.267 533 563 817 547 080 671 894 235 037 547 746 761 795 174 4 × 2 = 0 + 0.535 067 127 635 094 161 343 788 470 075 095 493 523 590 348 8;
  • 71) 0.535 067 127 635 094 161 343 788 470 075 095 493 523 590 348 8 × 2 = 1 + 0.070 134 255 270 188 322 687 576 940 150 190 987 047 180 697 6;
  • 72) 0.070 134 255 270 188 322 687 576 940 150 190 987 047 180 697 6 × 2 = 0 + 0.140 268 510 540 376 645 375 153 880 300 381 974 094 361 395 2;
  • 73) 0.140 268 510 540 376 645 375 153 880 300 381 974 094 361 395 2 × 2 = 0 + 0.280 537 021 080 753 290 750 307 760 600 763 948 188 722 790 4;
  • 74) 0.280 537 021 080 753 290 750 307 760 600 763 948 188 722 790 4 × 2 = 0 + 0.561 074 042 161 506 581 500 615 521 201 527 896 377 445 580 8;
  • 75) 0.561 074 042 161 506 581 500 615 521 201 527 896 377 445 580 8 × 2 = 1 + 0.122 148 084 323 013 163 001 231 042 403 055 792 754 891 161 6;
  • 76) 0.122 148 084 323 013 163 001 231 042 403 055 792 754 891 161 6 × 2 = 0 + 0.244 296 168 646 026 326 002 462 084 806 111 585 509 782 323 2;
  • 77) 0.244 296 168 646 026 326 002 462 084 806 111 585 509 782 323 2 × 2 = 0 + 0.488 592 337 292 052 652 004 924 169 612 223 171 019 564 646 4;
  • 78) 0.488 592 337 292 052 652 004 924 169 612 223 171 019 564 646 4 × 2 = 0 + 0.977 184 674 584 105 304 009 848 339 224 446 342 039 129 292 8;
  • 79) 0.977 184 674 584 105 304 009 848 339 224 446 342 039 129 292 8 × 2 = 1 + 0.954 369 349 168 210 608 019 696 678 448 892 684 078 258 585 6;
  • 80) 0.954 369 349 168 210 608 019 696 678 448 892 684 078 258 585 6 × 2 = 1 + 0.908 738 698 336 421 216 039 393 356 897 785 368 156 517 171 2;
  • 81) 0.908 738 698 336 421 216 039 393 356 897 785 368 156 517 171 2 × 2 = 1 + 0.817 477 396 672 842 432 078 786 713 795 570 736 313 034 342 4;
  • 82) 0.817 477 396 672 842 432 078 786 713 795 570 736 313 034 342 4 × 2 = 1 + 0.634 954 793 345 684 864 157 573 427 591 141 472 626 068 684 8;
  • 83) 0.634 954 793 345 684 864 157 573 427 591 141 472 626 068 684 8 × 2 = 1 + 0.269 909 586 691 369 728 315 146 855 182 282 945 252 137 369 6;
  • 84) 0.269 909 586 691 369 728 315 146 855 182 282 945 252 137 369 6 × 2 = 0 + 0.539 819 173 382 739 456 630 293 710 364 565 890 504 274 739 2;
  • 85) 0.539 819 173 382 739 456 630 293 710 364 565 890 504 274 739 2 × 2 = 1 + 0.079 638 346 765 478 913 260 587 420 729 131 781 008 549 478 4;
  • 86) 0.079 638 346 765 478 913 260 587 420 729 131 781 008 549 478 4 × 2 = 0 + 0.159 276 693 530 957 826 521 174 841 458 263 562 017 098 956 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).


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 136 2(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 136 2(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 136 2(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 136 2 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