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

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 134 1 × 2 = 0 + 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 268 2;
  • 2) 0.000 000 000 222 022 220 220 222 200 000 022 202 002 222 268 2 × 2 = 0 + 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 536 4;
  • 3) 0.000 000 000 444 044 440 440 444 400 000 044 404 004 444 536 4 × 2 = 0 + 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 072 8;
  • 4) 0.000 000 000 888 088 880 880 888 800 000 088 808 008 889 072 8 × 2 = 0 + 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 145 6;
  • 5) 0.000 000 001 776 177 761 761 777 600 000 177 616 017 778 145 6 × 2 = 0 + 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 291 2;
  • 6) 0.000 000 003 552 355 523 523 555 200 000 355 232 035 556 291 2 × 2 = 0 + 0.000 000 007 104 711 047 047 110 400 000 710 464 071 112 582 4;
  • 7) 0.000 000 007 104 711 047 047 110 400 000 710 464 071 112 582 4 × 2 = 0 + 0.000 000 014 209 422 094 094 220 800 001 420 928 142 225 164 8;
  • 8) 0.000 000 014 209 422 094 094 220 800 001 420 928 142 225 164 8 × 2 = 0 + 0.000 000 028 418 844 188 188 441 600 002 841 856 284 450 329 6;
  • 9) 0.000 000 028 418 844 188 188 441 600 002 841 856 284 450 329 6 × 2 = 0 + 0.000 000 056 837 688 376 376 883 200 005 683 712 568 900 659 2;
  • 10) 0.000 000 056 837 688 376 376 883 200 005 683 712 568 900 659 2 × 2 = 0 + 0.000 000 113 675 376 752 753 766 400 011 367 425 137 801 318 4;
  • 11) 0.000 000 113 675 376 752 753 766 400 011 367 425 137 801 318 4 × 2 = 0 + 0.000 000 227 350 753 505 507 532 800 022 734 850 275 602 636 8;
  • 12) 0.000 000 227 350 753 505 507 532 800 022 734 850 275 602 636 8 × 2 = 0 + 0.000 000 454 701 507 011 015 065 600 045 469 700 551 205 273 6;
  • 13) 0.000 000 454 701 507 011 015 065 600 045 469 700 551 205 273 6 × 2 = 0 + 0.000 000 909 403 014 022 030 131 200 090 939 401 102 410 547 2;
  • 14) 0.000 000 909 403 014 022 030 131 200 090 939 401 102 410 547 2 × 2 = 0 + 0.000 001 818 806 028 044 060 262 400 181 878 802 204 821 094 4;
  • 15) 0.000 001 818 806 028 044 060 262 400 181 878 802 204 821 094 4 × 2 = 0 + 0.000 003 637 612 056 088 120 524 800 363 757 604 409 642 188 8;
  • 16) 0.000 003 637 612 056 088 120 524 800 363 757 604 409 642 188 8 × 2 = 0 + 0.000 007 275 224 112 176 241 049 600 727 515 208 819 284 377 6;
  • 17) 0.000 007 275 224 112 176 241 049 600 727 515 208 819 284 377 6 × 2 = 0 + 0.000 014 550 448 224 352 482 099 201 455 030 417 638 568 755 2;
  • 18) 0.000 014 550 448 224 352 482 099 201 455 030 417 638 568 755 2 × 2 = 0 + 0.000 029 100 896 448 704 964 198 402 910 060 835 277 137 510 4;
  • 19) 0.000 029 100 896 448 704 964 198 402 910 060 835 277 137 510 4 × 2 = 0 + 0.000 058 201 792 897 409 928 396 805 820 121 670 554 275 020 8;
  • 20) 0.000 058 201 792 897 409 928 396 805 820 121 670 554 275 020 8 × 2 = 0 + 0.000 116 403 585 794 819 856 793 611 640 243 341 108 550 041 6;
  • 21) 0.000 116 403 585 794 819 856 793 611 640 243 341 108 550 041 6 × 2 = 0 + 0.000 232 807 171 589 639 713 587 223 280 486 682 217 100 083 2;
  • 22) 0.000 232 807 171 589 639 713 587 223 280 486 682 217 100 083 2 × 2 = 0 + 0.000 465 614 343 179 279 427 174 446 560 973 364 434 200 166 4;
  • 23) 0.000 465 614 343 179 279 427 174 446 560 973 364 434 200 166 4 × 2 = 0 + 0.000 931 228 686 358 558 854 348 893 121 946 728 868 400 332 8;
  • 24) 0.000 931 228 686 358 558 854 348 893 121 946 728 868 400 332 8 × 2 = 0 + 0.001 862 457 372 717 117 708 697 786 243 893 457 736 800 665 6;
  • 25) 0.001 862 457 372 717 117 708 697 786 243 893 457 736 800 665 6 × 2 = 0 + 0.003 724 914 745 434 235 417 395 572 487 786 915 473 601 331 2;
  • 26) 0.003 724 914 745 434 235 417 395 572 487 786 915 473 601 331 2 × 2 = 0 + 0.007 449 829 490 868 470 834 791 144 975 573 830 947 202 662 4;
  • 27) 0.007 449 829 490 868 470 834 791 144 975 573 830 947 202 662 4 × 2 = 0 + 0.014 899 658 981 736 941 669 582 289 951 147 661 894 405 324 8;
  • 28) 0.014 899 658 981 736 941 669 582 289 951 147 661 894 405 324 8 × 2 = 0 + 0.029 799 317 963 473 883 339 164 579 902 295 323 788 810 649 6;
  • 29) 0.029 799 317 963 473 883 339 164 579 902 295 323 788 810 649 6 × 2 = 0 + 0.059 598 635 926 947 766 678 329 159 804 590 647 577 621 299 2;
  • 30) 0.059 598 635 926 947 766 678 329 159 804 590 647 577 621 299 2 × 2 = 0 + 0.119 197 271 853 895 533 356 658 319 609 181 295 155 242 598 4;
  • 31) 0.119 197 271 853 895 533 356 658 319 609 181 295 155 242 598 4 × 2 = 0 + 0.238 394 543 707 791 066 713 316 639 218 362 590 310 485 196 8;
  • 32) 0.238 394 543 707 791 066 713 316 639 218 362 590 310 485 196 8 × 2 = 0 + 0.476 789 087 415 582 133 426 633 278 436 725 180 620 970 393 6;
  • 33) 0.476 789 087 415 582 133 426 633 278 436 725 180 620 970 393 6 × 2 = 0 + 0.953 578 174 831 164 266 853 266 556 873 450 361 241 940 787 2;
  • 34) 0.953 578 174 831 164 266 853 266 556 873 450 361 241 940 787 2 × 2 = 1 + 0.907 156 349 662 328 533 706 533 113 746 900 722 483 881 574 4;
  • 35) 0.907 156 349 662 328 533 706 533 113 746 900 722 483 881 574 4 × 2 = 1 + 0.814 312 699 324 657 067 413 066 227 493 801 444 967 763 148 8;
  • 36) 0.814 312 699 324 657 067 413 066 227 493 801 444 967 763 148 8 × 2 = 1 + 0.628 625 398 649 314 134 826 132 454 987 602 889 935 526 297 6;
  • 37) 0.628 625 398 649 314 134 826 132 454 987 602 889 935 526 297 6 × 2 = 1 + 0.257 250 797 298 628 269 652 264 909 975 205 779 871 052 595 2;
  • 38) 0.257 250 797 298 628 269 652 264 909 975 205 779 871 052 595 2 × 2 = 0 + 0.514 501 594 597 256 539 304 529 819 950 411 559 742 105 190 4;
  • 39) 0.514 501 594 597 256 539 304 529 819 950 411 559 742 105 190 4 × 2 = 1 + 0.029 003 189 194 513 078 609 059 639 900 823 119 484 210 380 8;
  • 40) 0.029 003 189 194 513 078 609 059 639 900 823 119 484 210 380 8 × 2 = 0 + 0.058 006 378 389 026 157 218 119 279 801 646 238 968 420 761 6;
  • 41) 0.058 006 378 389 026 157 218 119 279 801 646 238 968 420 761 6 × 2 = 0 + 0.116 012 756 778 052 314 436 238 559 603 292 477 936 841 523 2;
  • 42) 0.116 012 756 778 052 314 436 238 559 603 292 477 936 841 523 2 × 2 = 0 + 0.232 025 513 556 104 628 872 477 119 206 584 955 873 683 046 4;
  • 43) 0.232 025 513 556 104 628 872 477 119 206 584 955 873 683 046 4 × 2 = 0 + 0.464 051 027 112 209 257 744 954 238 413 169 911 747 366 092 8;
  • 44) 0.464 051 027 112 209 257 744 954 238 413 169 911 747 366 092 8 × 2 = 0 + 0.928 102 054 224 418 515 489 908 476 826 339 823 494 732 185 6;
  • 45) 0.928 102 054 224 418 515 489 908 476 826 339 823 494 732 185 6 × 2 = 1 + 0.856 204 108 448 837 030 979 816 953 652 679 646 989 464 371 2;
  • 46) 0.856 204 108 448 837 030 979 816 953 652 679 646 989 464 371 2 × 2 = 1 + 0.712 408 216 897 674 061 959 633 907 305 359 293 978 928 742 4;
  • 47) 0.712 408 216 897 674 061 959 633 907 305 359 293 978 928 742 4 × 2 = 1 + 0.424 816 433 795 348 123 919 267 814 610 718 587 957 857 484 8;
  • 48) 0.424 816 433 795 348 123 919 267 814 610 718 587 957 857 484 8 × 2 = 0 + 0.849 632 867 590 696 247 838 535 629 221 437 175 915 714 969 6;
  • 49) 0.849 632 867 590 696 247 838 535 629 221 437 175 915 714 969 6 × 2 = 1 + 0.699 265 735 181 392 495 677 071 258 442 874 351 831 429 939 2;
  • 50) 0.699 265 735 181 392 495 677 071 258 442 874 351 831 429 939 2 × 2 = 1 + 0.398 531 470 362 784 991 354 142 516 885 748 703 662 859 878 4;
  • 51) 0.398 531 470 362 784 991 354 142 516 885 748 703 662 859 878 4 × 2 = 0 + 0.797 062 940 725 569 982 708 285 033 771 497 407 325 719 756 8;
  • 52) 0.797 062 940 725 569 982 708 285 033 771 497 407 325 719 756 8 × 2 = 1 + 0.594 125 881 451 139 965 416 570 067 542 994 814 651 439 513 6;
  • 53) 0.594 125 881 451 139 965 416 570 067 542 994 814 651 439 513 6 × 2 = 1 + 0.188 251 762 902 279 930 833 140 135 085 989 629 302 879 027 2;
  • 54) 0.188 251 762 902 279 930 833 140 135 085 989 629 302 879 027 2 × 2 = 0 + 0.376 503 525 804 559 861 666 280 270 171 979 258 605 758 054 4;
  • 55) 0.376 503 525 804 559 861 666 280 270 171 979 258 605 758 054 4 × 2 = 0 + 0.753 007 051 609 119 723 332 560 540 343 958 517 211 516 108 8;
  • 56) 0.753 007 051 609 119 723 332 560 540 343 958 517 211 516 108 8 × 2 = 1 + 0.506 014 103 218 239 446 665 121 080 687 917 034 423 032 217 6;
  • 57) 0.506 014 103 218 239 446 665 121 080 687 917 034 423 032 217 6 × 2 = 1 + 0.012 028 206 436 478 893 330 242 161 375 834 068 846 064 435 2;
  • 58) 0.012 028 206 436 478 893 330 242 161 375 834 068 846 064 435 2 × 2 = 0 + 0.024 056 412 872 957 786 660 484 322 751 668 137 692 128 870 4;
  • 59) 0.024 056 412 872 957 786 660 484 322 751 668 137 692 128 870 4 × 2 = 0 + 0.048 112 825 745 915 573 320 968 645 503 336 275 384 257 740 8;
  • 60) 0.048 112 825 745 915 573 320 968 645 503 336 275 384 257 740 8 × 2 = 0 + 0.096 225 651 491 831 146 641 937 291 006 672 550 768 515 481 6;
  • 61) 0.096 225 651 491 831 146 641 937 291 006 672 550 768 515 481 6 × 2 = 0 + 0.192 451 302 983 662 293 283 874 582 013 345 101 537 030 963 2;
  • 62) 0.192 451 302 983 662 293 283 874 582 013 345 101 537 030 963 2 × 2 = 0 + 0.384 902 605 967 324 586 567 749 164 026 690 203 074 061 926 4;
  • 63) 0.384 902 605 967 324 586 567 749 164 026 690 203 074 061 926 4 × 2 = 0 + 0.769 805 211 934 649 173 135 498 328 053 380 406 148 123 852 8;
  • 64) 0.769 805 211 934 649 173 135 498 328 053 380 406 148 123 852 8 × 2 = 1 + 0.539 610 423 869 298 346 270 996 656 106 760 812 296 247 705 6;
  • 65) 0.539 610 423 869 298 346 270 996 656 106 760 812 296 247 705 6 × 2 = 1 + 0.079 220 847 738 596 692 541 993 312 213 521 624 592 495 411 2;
  • 66) 0.079 220 847 738 596 692 541 993 312 213 521 624 592 495 411 2 × 2 = 0 + 0.158 441 695 477 193 385 083 986 624 427 043 249 184 990 822 4;
  • 67) 0.158 441 695 477 193 385 083 986 624 427 043 249 184 990 822 4 × 2 = 0 + 0.316 883 390 954 386 770 167 973 248 854 086 498 369 981 644 8;
  • 68) 0.316 883 390 954 386 770 167 973 248 854 086 498 369 981 644 8 × 2 = 0 + 0.633 766 781 908 773 540 335 946 497 708 172 996 739 963 289 6;
  • 69) 0.633 766 781 908 773 540 335 946 497 708 172 996 739 963 289 6 × 2 = 1 + 0.267 533 563 817 547 080 671 892 995 416 345 993 479 926 579 2;
  • 70) 0.267 533 563 817 547 080 671 892 995 416 345 993 479 926 579 2 × 2 = 0 + 0.535 067 127 635 094 161 343 785 990 832 691 986 959 853 158 4;
  • 71) 0.535 067 127 635 094 161 343 785 990 832 691 986 959 853 158 4 × 2 = 1 + 0.070 134 255 270 188 322 687 571 981 665 383 973 919 706 316 8;
  • 72) 0.070 134 255 270 188 322 687 571 981 665 383 973 919 706 316 8 × 2 = 0 + 0.140 268 510 540 376 645 375 143 963 330 767 947 839 412 633 6;
  • 73) 0.140 268 510 540 376 645 375 143 963 330 767 947 839 412 633 6 × 2 = 0 + 0.280 537 021 080 753 290 750 287 926 661 535 895 678 825 267 2;
  • 74) 0.280 537 021 080 753 290 750 287 926 661 535 895 678 825 267 2 × 2 = 0 + 0.561 074 042 161 506 581 500 575 853 323 071 791 357 650 534 4;
  • 75) 0.561 074 042 161 506 581 500 575 853 323 071 791 357 650 534 4 × 2 = 1 + 0.122 148 084 323 013 163 001 151 706 646 143 582 715 301 068 8;
  • 76) 0.122 148 084 323 013 163 001 151 706 646 143 582 715 301 068 8 × 2 = 0 + 0.244 296 168 646 026 326 002 303 413 292 287 165 430 602 137 6;
  • 77) 0.244 296 168 646 026 326 002 303 413 292 287 165 430 602 137 6 × 2 = 0 + 0.488 592 337 292 052 652 004 606 826 584 574 330 861 204 275 2;
  • 78) 0.488 592 337 292 052 652 004 606 826 584 574 330 861 204 275 2 × 2 = 0 + 0.977 184 674 584 105 304 009 213 653 169 148 661 722 408 550 4;
  • 79) 0.977 184 674 584 105 304 009 213 653 169 148 661 722 408 550 4 × 2 = 1 + 0.954 369 349 168 210 608 018 427 306 338 297 323 444 817 100 8;
  • 80) 0.954 369 349 168 210 608 018 427 306 338 297 323 444 817 100 8 × 2 = 1 + 0.908 738 698 336 421 216 036 854 612 676 594 646 889 634 201 6;
  • 81) 0.908 738 698 336 421 216 036 854 612 676 594 646 889 634 201 6 × 2 = 1 + 0.817 477 396 672 842 432 073 709 225 353 189 293 779 268 403 2;
  • 82) 0.817 477 396 672 842 432 073 709 225 353 189 293 779 268 403 2 × 2 = 1 + 0.634 954 793 345 684 864 147 418 450 706 378 587 558 536 806 4;
  • 83) 0.634 954 793 345 684 864 147 418 450 706 378 587 558 536 806 4 × 2 = 1 + 0.269 909 586 691 369 728 294 836 901 412 757 175 117 073 612 8;
  • 84) 0.269 909 586 691 369 728 294 836 901 412 757 175 117 073 612 8 × 2 = 0 + 0.539 819 173 382 739 456 589 673 802 825 514 350 234 147 225 6;
  • 85) 0.539 819 173 382 739 456 589 673 802 825 514 350 234 147 225 6 × 2 = 1 + 0.079 638 346 765 478 913 179 347 605 651 028 700 468 294 451 2;
  • 86) 0.079 638 346 765 478 913 179 347 605 651 028 700 468 294 451 2 × 2 = 0 + 0.159 276 693 530 957 826 358 695 211 302 057 400 936 588 902 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 134 1(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 134 1(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 134 1(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 134 1 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