0.000 000 000 000 000 000 000 138 064 880 4 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 000 000 000 000 138 064 880 4(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 000 000 000 000 138 064 880 4(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 000 000 000 000 138 064 880 4.

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 000 000 000 000 138 064 880 4 × 2 = 0 + 0.000 000 000 000 000 000 000 276 129 760 8;
  • 2) 0.000 000 000 000 000 000 000 276 129 760 8 × 2 = 0 + 0.000 000 000 000 000 000 000 552 259 521 6;
  • 3) 0.000 000 000 000 000 000 000 552 259 521 6 × 2 = 0 + 0.000 000 000 000 000 000 001 104 519 043 2;
  • 4) 0.000 000 000 000 000 000 001 104 519 043 2 × 2 = 0 + 0.000 000 000 000 000 000 002 209 038 086 4;
  • 5) 0.000 000 000 000 000 000 002 209 038 086 4 × 2 = 0 + 0.000 000 000 000 000 000 004 418 076 172 8;
  • 6) 0.000 000 000 000 000 000 004 418 076 172 8 × 2 = 0 + 0.000 000 000 000 000 000 008 836 152 345 6;
  • 7) 0.000 000 000 000 000 000 008 836 152 345 6 × 2 = 0 + 0.000 000 000 000 000 000 017 672 304 691 2;
  • 8) 0.000 000 000 000 000 000 017 672 304 691 2 × 2 = 0 + 0.000 000 000 000 000 000 035 344 609 382 4;
  • 9) 0.000 000 000 000 000 000 035 344 609 382 4 × 2 = 0 + 0.000 000 000 000 000 000 070 689 218 764 8;
  • 10) 0.000 000 000 000 000 000 070 689 218 764 8 × 2 = 0 + 0.000 000 000 000 000 000 141 378 437 529 6;
  • 11) 0.000 000 000 000 000 000 141 378 437 529 6 × 2 = 0 + 0.000 000 000 000 000 000 282 756 875 059 2;
  • 12) 0.000 000 000 000 000 000 282 756 875 059 2 × 2 = 0 + 0.000 000 000 000 000 000 565 513 750 118 4;
  • 13) 0.000 000 000 000 000 000 565 513 750 118 4 × 2 = 0 + 0.000 000 000 000 000 001 131 027 500 236 8;
  • 14) 0.000 000 000 000 000 001 131 027 500 236 8 × 2 = 0 + 0.000 000 000 000 000 002 262 055 000 473 6;
  • 15) 0.000 000 000 000 000 002 262 055 000 473 6 × 2 = 0 + 0.000 000 000 000 000 004 524 110 000 947 2;
  • 16) 0.000 000 000 000 000 004 524 110 000 947 2 × 2 = 0 + 0.000 000 000 000 000 009 048 220 001 894 4;
  • 17) 0.000 000 000 000 000 009 048 220 001 894 4 × 2 = 0 + 0.000 000 000 000 000 018 096 440 003 788 8;
  • 18) 0.000 000 000 000 000 018 096 440 003 788 8 × 2 = 0 + 0.000 000 000 000 000 036 192 880 007 577 6;
  • 19) 0.000 000 000 000 000 036 192 880 007 577 6 × 2 = 0 + 0.000 000 000 000 000 072 385 760 015 155 2;
  • 20) 0.000 000 000 000 000 072 385 760 015 155 2 × 2 = 0 + 0.000 000 000 000 000 144 771 520 030 310 4;
  • 21) 0.000 000 000 000 000 144 771 520 030 310 4 × 2 = 0 + 0.000 000 000 000 000 289 543 040 060 620 8;
  • 22) 0.000 000 000 000 000 289 543 040 060 620 8 × 2 = 0 + 0.000 000 000 000 000 579 086 080 121 241 6;
  • 23) 0.000 000 000 000 000 579 086 080 121 241 6 × 2 = 0 + 0.000 000 000 000 001 158 172 160 242 483 2;
  • 24) 0.000 000 000 000 001 158 172 160 242 483 2 × 2 = 0 + 0.000 000 000 000 002 316 344 320 484 966 4;
  • 25) 0.000 000 000 000 002 316 344 320 484 966 4 × 2 = 0 + 0.000 000 000 000 004 632 688 640 969 932 8;
  • 26) 0.000 000 000 000 004 632 688 640 969 932 8 × 2 = 0 + 0.000 000 000 000 009 265 377 281 939 865 6;
  • 27) 0.000 000 000 000 009 265 377 281 939 865 6 × 2 = 0 + 0.000 000 000 000 018 530 754 563 879 731 2;
  • 28) 0.000 000 000 000 018 530 754 563 879 731 2 × 2 = 0 + 0.000 000 000 000 037 061 509 127 759 462 4;
  • 29) 0.000 000 000 000 037 061 509 127 759 462 4 × 2 = 0 + 0.000 000 000 000 074 123 018 255 518 924 8;
  • 30) 0.000 000 000 000 074 123 018 255 518 924 8 × 2 = 0 + 0.000 000 000 000 148 246 036 511 037 849 6;
  • 31) 0.000 000 000 000 148 246 036 511 037 849 6 × 2 = 0 + 0.000 000 000 000 296 492 073 022 075 699 2;
  • 32) 0.000 000 000 000 296 492 073 022 075 699 2 × 2 = 0 + 0.000 000 000 000 592 984 146 044 151 398 4;
  • 33) 0.000 000 000 000 592 984 146 044 151 398 4 × 2 = 0 + 0.000 000 000 001 185 968 292 088 302 796 8;
  • 34) 0.000 000 000 001 185 968 292 088 302 796 8 × 2 = 0 + 0.000 000 000 002 371 936 584 176 605 593 6;
  • 35) 0.000 000 000 002 371 936 584 176 605 593 6 × 2 = 0 + 0.000 000 000 004 743 873 168 353 211 187 2;
  • 36) 0.000 000 000 004 743 873 168 353 211 187 2 × 2 = 0 + 0.000 000 000 009 487 746 336 706 422 374 4;
  • 37) 0.000 000 000 009 487 746 336 706 422 374 4 × 2 = 0 + 0.000 000 000 018 975 492 673 412 844 748 8;
  • 38) 0.000 000 000 018 975 492 673 412 844 748 8 × 2 = 0 + 0.000 000 000 037 950 985 346 825 689 497 6;
  • 39) 0.000 000 000 037 950 985 346 825 689 497 6 × 2 = 0 + 0.000 000 000 075 901 970 693 651 378 995 2;
  • 40) 0.000 000 000 075 901 970 693 651 378 995 2 × 2 = 0 + 0.000 000 000 151 803 941 387 302 757 990 4;
  • 41) 0.000 000 000 151 803 941 387 302 757 990 4 × 2 = 0 + 0.000 000 000 303 607 882 774 605 515 980 8;
  • 42) 0.000 000 000 303 607 882 774 605 515 980 8 × 2 = 0 + 0.000 000 000 607 215 765 549 211 031 961 6;
  • 43) 0.000 000 000 607 215 765 549 211 031 961 6 × 2 = 0 + 0.000 000 001 214 431 531 098 422 063 923 2;
  • 44) 0.000 000 001 214 431 531 098 422 063 923 2 × 2 = 0 + 0.000 000 002 428 863 062 196 844 127 846 4;
  • 45) 0.000 000 002 428 863 062 196 844 127 846 4 × 2 = 0 + 0.000 000 004 857 726 124 393 688 255 692 8;
  • 46) 0.000 000 004 857 726 124 393 688 255 692 8 × 2 = 0 + 0.000 000 009 715 452 248 787 376 511 385 6;
  • 47) 0.000 000 009 715 452 248 787 376 511 385 6 × 2 = 0 + 0.000 000 019 430 904 497 574 753 022 771 2;
  • 48) 0.000 000 019 430 904 497 574 753 022 771 2 × 2 = 0 + 0.000 000 038 861 808 995 149 506 045 542 4;
  • 49) 0.000 000 038 861 808 995 149 506 045 542 4 × 2 = 0 + 0.000 000 077 723 617 990 299 012 091 084 8;
  • 50) 0.000 000 077 723 617 990 299 012 091 084 8 × 2 = 0 + 0.000 000 155 447 235 980 598 024 182 169 6;
  • 51) 0.000 000 155 447 235 980 598 024 182 169 6 × 2 = 0 + 0.000 000 310 894 471 961 196 048 364 339 2;
  • 52) 0.000 000 310 894 471 961 196 048 364 339 2 × 2 = 0 + 0.000 000 621 788 943 922 392 096 728 678 4;
  • 53) 0.000 000 621 788 943 922 392 096 728 678 4 × 2 = 0 + 0.000 001 243 577 887 844 784 193 457 356 8;
  • 54) 0.000 001 243 577 887 844 784 193 457 356 8 × 2 = 0 + 0.000 002 487 155 775 689 568 386 914 713 6;
  • 55) 0.000 002 487 155 775 689 568 386 914 713 6 × 2 = 0 + 0.000 004 974 311 551 379 136 773 829 427 2;
  • 56) 0.000 004 974 311 551 379 136 773 829 427 2 × 2 = 0 + 0.000 009 948 623 102 758 273 547 658 854 4;
  • 57) 0.000 009 948 623 102 758 273 547 658 854 4 × 2 = 0 + 0.000 019 897 246 205 516 547 095 317 708 8;
  • 58) 0.000 019 897 246 205 516 547 095 317 708 8 × 2 = 0 + 0.000 039 794 492 411 033 094 190 635 417 6;
  • 59) 0.000 039 794 492 411 033 094 190 635 417 6 × 2 = 0 + 0.000 079 588 984 822 066 188 381 270 835 2;
  • 60) 0.000 079 588 984 822 066 188 381 270 835 2 × 2 = 0 + 0.000 159 177 969 644 132 376 762 541 670 4;
  • 61) 0.000 159 177 969 644 132 376 762 541 670 4 × 2 = 0 + 0.000 318 355 939 288 264 753 525 083 340 8;
  • 62) 0.000 318 355 939 288 264 753 525 083 340 8 × 2 = 0 + 0.000 636 711 878 576 529 507 050 166 681 6;
  • 63) 0.000 636 711 878 576 529 507 050 166 681 6 × 2 = 0 + 0.001 273 423 757 153 059 014 100 333 363 2;
  • 64) 0.001 273 423 757 153 059 014 100 333 363 2 × 2 = 0 + 0.002 546 847 514 306 118 028 200 666 726 4;
  • 65) 0.002 546 847 514 306 118 028 200 666 726 4 × 2 = 0 + 0.005 093 695 028 612 236 056 401 333 452 8;
  • 66) 0.005 093 695 028 612 236 056 401 333 452 8 × 2 = 0 + 0.010 187 390 057 224 472 112 802 666 905 6;
  • 67) 0.010 187 390 057 224 472 112 802 666 905 6 × 2 = 0 + 0.020 374 780 114 448 944 225 605 333 811 2;
  • 68) 0.020 374 780 114 448 944 225 605 333 811 2 × 2 = 0 + 0.040 749 560 228 897 888 451 210 667 622 4;
  • 69) 0.040 749 560 228 897 888 451 210 667 622 4 × 2 = 0 + 0.081 499 120 457 795 776 902 421 335 244 8;
  • 70) 0.081 499 120 457 795 776 902 421 335 244 8 × 2 = 0 + 0.162 998 240 915 591 553 804 842 670 489 6;
  • 71) 0.162 998 240 915 591 553 804 842 670 489 6 × 2 = 0 + 0.325 996 481 831 183 107 609 685 340 979 2;
  • 72) 0.325 996 481 831 183 107 609 685 340 979 2 × 2 = 0 + 0.651 992 963 662 366 215 219 370 681 958 4;
  • 73) 0.651 992 963 662 366 215 219 370 681 958 4 × 2 = 1 + 0.303 985 927 324 732 430 438 741 363 916 8;
  • 74) 0.303 985 927 324 732 430 438 741 363 916 8 × 2 = 0 + 0.607 971 854 649 464 860 877 482 727 833 6;
  • 75) 0.607 971 854 649 464 860 877 482 727 833 6 × 2 = 1 + 0.215 943 709 298 929 721 754 965 455 667 2;
  • 76) 0.215 943 709 298 929 721 754 965 455 667 2 × 2 = 0 + 0.431 887 418 597 859 443 509 930 911 334 4;
  • 77) 0.431 887 418 597 859 443 509 930 911 334 4 × 2 = 0 + 0.863 774 837 195 718 887 019 861 822 668 8;
  • 78) 0.863 774 837 195 718 887 019 861 822 668 8 × 2 = 1 + 0.727 549 674 391 437 774 039 723 645 337 6;
  • 79) 0.727 549 674 391 437 774 039 723 645 337 6 × 2 = 1 + 0.455 099 348 782 875 548 079 447 290 675 2;
  • 80) 0.455 099 348 782 875 548 079 447 290 675 2 × 2 = 0 + 0.910 198 697 565 751 096 158 894 581 350 4;
  • 81) 0.910 198 697 565 751 096 158 894 581 350 4 × 2 = 1 + 0.820 397 395 131 502 192 317 789 162 700 8;
  • 82) 0.820 397 395 131 502 192 317 789 162 700 8 × 2 = 1 + 0.640 794 790 263 004 384 635 578 325 401 6;
  • 83) 0.640 794 790 263 004 384 635 578 325 401 6 × 2 = 1 + 0.281 589 580 526 008 769 271 156 650 803 2;
  • 84) 0.281 589 580 526 008 769 271 156 650 803 2 × 2 = 0 + 0.563 179 161 052 017 538 542 313 301 606 4;
  • 85) 0.563 179 161 052 017 538 542 313 301 606 4 × 2 = 1 + 0.126 358 322 104 035 077 084 626 603 212 8;
  • 86) 0.126 358 322 104 035 077 084 626 603 212 8 × 2 = 0 + 0.252 716 644 208 070 154 169 253 206 425 6;
  • 87) 0.252 716 644 208 070 154 169 253 206 425 6 × 2 = 0 + 0.505 433 288 416 140 308 338 506 412 851 2;
  • 88) 0.505 433 288 416 140 308 338 506 412 851 2 × 2 = 1 + 0.010 866 576 832 280 616 677 012 825 702 4;
  • 89) 0.010 866 576 832 280 616 677 012 825 702 4 × 2 = 0 + 0.021 733 153 664 561 233 354 025 651 404 8;
  • 90) 0.021 733 153 664 561 233 354 025 651 404 8 × 2 = 0 + 0.043 466 307 329 122 466 708 051 302 809 6;
  • 91) 0.043 466 307 329 122 466 708 051 302 809 6 × 2 = 0 + 0.086 932 614 658 244 933 416 102 605 619 2;
  • 92) 0.086 932 614 658 244 933 416 102 605 619 2 × 2 = 0 + 0.173 865 229 316 489 866 832 205 211 238 4;
  • 93) 0.173 865 229 316 489 866 832 205 211 238 4 × 2 = 0 + 0.347 730 458 632 979 733 664 410 422 476 8;
  • 94) 0.347 730 458 632 979 733 664 410 422 476 8 × 2 = 0 + 0.695 460 917 265 959 467 328 820 844 953 6;
  • 95) 0.695 460 917 265 959 467 328 820 844 953 6 × 2 = 1 + 0.390 921 834 531 918 934 657 641 689 907 2;
  • 96) 0.390 921 834 531 918 934 657 641 689 907 2 × 2 = 0 + 0.781 843 669 063 837 869 315 283 379 814 4;
  • 97) 0.781 843 669 063 837 869 315 283 379 814 4 × 2 = 1 + 0.563 687 338 127 675 738 630 566 759 628 8;
  • 98) 0.563 687 338 127 675 738 630 566 759 628 8 × 2 = 1 + 0.127 374 676 255 351 477 261 133 519 257 6;
  • 99) 0.127 374 676 255 351 477 261 133 519 257 6 × 2 = 0 + 0.254 749 352 510 702 954 522 267 038 515 2;
  • 100) 0.254 749 352 510 702 954 522 267 038 515 2 × 2 = 0 + 0.509 498 705 021 405 909 044 534 077 030 4;
  • 101) 0.509 498 705 021 405 909 044 534 077 030 4 × 2 = 1 + 0.018 997 410 042 811 818 089 068 154 060 8;
  • 102) 0.018 997 410 042 811 818 089 068 154 060 8 × 2 = 0 + 0.037 994 820 085 623 636 178 136 308 121 6;
  • 103) 0.037 994 820 085 623 636 178 136 308 121 6 × 2 = 0 + 0.075 989 640 171 247 272 356 272 616 243 2;
  • 104) 0.075 989 640 171 247 272 356 272 616 243 2 × 2 = 0 + 0.151 979 280 342 494 544 712 545 232 486 4;
  • 105) 0.151 979 280 342 494 544 712 545 232 486 4 × 2 = 0 + 0.303 958 560 684 989 089 425 090 464 972 8;
  • 106) 0.303 958 560 684 989 089 425 090 464 972 8 × 2 = 0 + 0.607 917 121 369 978 178 850 180 929 945 6;
  • 107) 0.607 917 121 369 978 178 850 180 929 945 6 × 2 = 1 + 0.215 834 242 739 956 357 700 361 859 891 2;
  • 108) 0.215 834 242 739 956 357 700 361 859 891 2 × 2 = 0 + 0.431 668 485 479 912 715 400 723 719 782 4;
  • 109) 0.431 668 485 479 912 715 400 723 719 782 4 × 2 = 0 + 0.863 336 970 959 825 430 801 447 439 564 8;
  • 110) 0.863 336 970 959 825 430 801 447 439 564 8 × 2 = 1 + 0.726 673 941 919 650 861 602 894 879 129 6;
  • 111) 0.726 673 941 919 650 861 602 894 879 129 6 × 2 = 1 + 0.453 347 883 839 301 723 205 789 758 259 2;
  • 112) 0.453 347 883 839 301 723 205 789 758 259 2 × 2 = 0 + 0.906 695 767 678 603 446 411 579 516 518 4;
  • 113) 0.906 695 767 678 603 446 411 579 516 518 4 × 2 = 1 + 0.813 391 535 357 206 892 823 159 033 036 8;
  • 114) 0.813 391 535 357 206 892 823 159 033 036 8 × 2 = 1 + 0.626 783 070 714 413 785 646 318 066 073 6;
  • 115) 0.626 783 070 714 413 785 646 318 066 073 6 × 2 = 1 + 0.253 566 141 428 827 571 292 636 132 147 2;
  • 116) 0.253 566 141 428 827 571 292 636 132 147 2 × 2 = 0 + 0.507 132 282 857 655 142 585 272 264 294 4;
  • 117) 0.507 132 282 857 655 142 585 272 264 294 4 × 2 = 1 + 0.014 264 565 715 310 285 170 544 528 588 8;
  • 118) 0.014 264 565 715 310 285 170 544 528 588 8 × 2 = 0 + 0.028 529 131 430 620 570 341 089 057 177 6;
  • 119) 0.028 529 131 430 620 570 341 089 057 177 6 × 2 = 0 + 0.057 058 262 861 241 140 682 178 114 355 2;
  • 120) 0.057 058 262 861 241 140 682 178 114 355 2 × 2 = 0 + 0.114 116 525 722 482 281 364 356 228 710 4;
  • 121) 0.114 116 525 722 482 281 364 356 228 710 4 × 2 = 0 + 0.228 233 051 444 964 562 728 712 457 420 8;
  • 122) 0.228 233 051 444 964 562 728 712 457 420 8 × 2 = 0 + 0.456 466 102 889 929 125 457 424 914 841 6;
  • 123) 0.456 466 102 889 929 125 457 424 914 841 6 × 2 = 0 + 0.912 932 205 779 858 250 914 849 829 683 2;
  • 124) 0.912 932 205 779 858 250 914 849 829 683 2 × 2 = 1 + 0.825 864 411 559 716 501 829 699 659 366 4;
  • 125) 0.825 864 411 559 716 501 829 699 659 366 4 × 2 = 1 + 0.651 728 823 119 433 003 659 399 318 732 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 000 000 000 000 138 064 880 4(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1010 0110 1110 1001 0000 0010 1100 1000 0010 0110 1110 1000 0001 1(2)

5. Positive number before normalization:

0.000 000 000 000 000 000 000 138 064 880 4(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1010 0110 1110 1001 0000 0010 1100 1000 0010 0110 1110 1000 0001 1(2)

6. Normalize the binary representation of the number.

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


0.000 000 000 000 000 000 000 138 064 880 4(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1010 0110 1110 1001 0000 0010 1100 1000 0010 0110 1110 1000 0001 1(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1010 0110 1110 1001 0000 0010 1100 1000 0010 0110 1110 1000 0001 1(2) × 20 =


1.0100 1101 1101 0010 0000 0101 1001 0000 0100 1101 1101 0000 0011(2) × 2-73


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


Mantissa (not normalized):
1.0100 1101 1101 0010 0000 0101 1001 0000 0100 1101 1101 0000 0011


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


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


(-73 + 1 023)(10) =


950(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;
  • 950 ÷ 2 = 475 + 0;
  • 475 ÷ 2 = 237 + 1;
  • 237 ÷ 2 = 118 + 1;
  • 118 ÷ 2 = 59 + 0;
  • 59 ÷ 2 = 29 + 1;
  • 29 ÷ 2 = 14 + 1;
  • 14 ÷ 2 = 7 + 0;
  • 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) =


950(10) =


011 1011 0110(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. 0100 1101 1101 0010 0000 0101 1001 0000 0100 1101 1101 0000 0011 =


0100 1101 1101 0010 0000 0101 1001 0000 0100 1101 1101 0000 0011


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 1011 0110


Mantissa (52 bits) =
0100 1101 1101 0010 0000 0101 1001 0000 0100 1101 1101 0000 0011


Decimal number 0.000 000 000 000 000 000 000 138 064 880 4 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 011 1011 0110 - 0100 1101 1101 0010 0000 0101 1001 0000 0100 1101 1101 0000 0011


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