0.000 000 000 000 000 000 000 000 347 9 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 000 000 000 000 000 347 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 000 000 000 000 000 347 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 000 000 000 000 000 347 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 000 000 000 000 000 347 9 × 2 = 0 + 0.000 000 000 000 000 000 000 000 695 8;
  • 2) 0.000 000 000 000 000 000 000 000 695 8 × 2 = 0 + 0.000 000 000 000 000 000 000 001 391 6;
  • 3) 0.000 000 000 000 000 000 000 001 391 6 × 2 = 0 + 0.000 000 000 000 000 000 000 002 783 2;
  • 4) 0.000 000 000 000 000 000 000 002 783 2 × 2 = 0 + 0.000 000 000 000 000 000 000 005 566 4;
  • 5) 0.000 000 000 000 000 000 000 005 566 4 × 2 = 0 + 0.000 000 000 000 000 000 000 011 132 8;
  • 6) 0.000 000 000 000 000 000 000 011 132 8 × 2 = 0 + 0.000 000 000 000 000 000 000 022 265 6;
  • 7) 0.000 000 000 000 000 000 000 022 265 6 × 2 = 0 + 0.000 000 000 000 000 000 000 044 531 2;
  • 8) 0.000 000 000 000 000 000 000 044 531 2 × 2 = 0 + 0.000 000 000 000 000 000 000 089 062 4;
  • 9) 0.000 000 000 000 000 000 000 089 062 4 × 2 = 0 + 0.000 000 000 000 000 000 000 178 124 8;
  • 10) 0.000 000 000 000 000 000 000 178 124 8 × 2 = 0 + 0.000 000 000 000 000 000 000 356 249 6;
  • 11) 0.000 000 000 000 000 000 000 356 249 6 × 2 = 0 + 0.000 000 000 000 000 000 000 712 499 2;
  • 12) 0.000 000 000 000 000 000 000 712 499 2 × 2 = 0 + 0.000 000 000 000 000 000 001 424 998 4;
  • 13) 0.000 000 000 000 000 000 001 424 998 4 × 2 = 0 + 0.000 000 000 000 000 000 002 849 996 8;
  • 14) 0.000 000 000 000 000 000 002 849 996 8 × 2 = 0 + 0.000 000 000 000 000 000 005 699 993 6;
  • 15) 0.000 000 000 000 000 000 005 699 993 6 × 2 = 0 + 0.000 000 000 000 000 000 011 399 987 2;
  • 16) 0.000 000 000 000 000 000 011 399 987 2 × 2 = 0 + 0.000 000 000 000 000 000 022 799 974 4;
  • 17) 0.000 000 000 000 000 000 022 799 974 4 × 2 = 0 + 0.000 000 000 000 000 000 045 599 948 8;
  • 18) 0.000 000 000 000 000 000 045 599 948 8 × 2 = 0 + 0.000 000 000 000 000 000 091 199 897 6;
  • 19) 0.000 000 000 000 000 000 091 199 897 6 × 2 = 0 + 0.000 000 000 000 000 000 182 399 795 2;
  • 20) 0.000 000 000 000 000 000 182 399 795 2 × 2 = 0 + 0.000 000 000 000 000 000 364 799 590 4;
  • 21) 0.000 000 000 000 000 000 364 799 590 4 × 2 = 0 + 0.000 000 000 000 000 000 729 599 180 8;
  • 22) 0.000 000 000 000 000 000 729 599 180 8 × 2 = 0 + 0.000 000 000 000 000 001 459 198 361 6;
  • 23) 0.000 000 000 000 000 001 459 198 361 6 × 2 = 0 + 0.000 000 000 000 000 002 918 396 723 2;
  • 24) 0.000 000 000 000 000 002 918 396 723 2 × 2 = 0 + 0.000 000 000 000 000 005 836 793 446 4;
  • 25) 0.000 000 000 000 000 005 836 793 446 4 × 2 = 0 + 0.000 000 000 000 000 011 673 586 892 8;
  • 26) 0.000 000 000 000 000 011 673 586 892 8 × 2 = 0 + 0.000 000 000 000 000 023 347 173 785 6;
  • 27) 0.000 000 000 000 000 023 347 173 785 6 × 2 = 0 + 0.000 000 000 000 000 046 694 347 571 2;
  • 28) 0.000 000 000 000 000 046 694 347 571 2 × 2 = 0 + 0.000 000 000 000 000 093 388 695 142 4;
  • 29) 0.000 000 000 000 000 093 388 695 142 4 × 2 = 0 + 0.000 000 000 000 000 186 777 390 284 8;
  • 30) 0.000 000 000 000 000 186 777 390 284 8 × 2 = 0 + 0.000 000 000 000 000 373 554 780 569 6;
  • 31) 0.000 000 000 000 000 373 554 780 569 6 × 2 = 0 + 0.000 000 000 000 000 747 109 561 139 2;
  • 32) 0.000 000 000 000 000 747 109 561 139 2 × 2 = 0 + 0.000 000 000 000 001 494 219 122 278 4;
  • 33) 0.000 000 000 000 001 494 219 122 278 4 × 2 = 0 + 0.000 000 000 000 002 988 438 244 556 8;
  • 34) 0.000 000 000 000 002 988 438 244 556 8 × 2 = 0 + 0.000 000 000 000 005 976 876 489 113 6;
  • 35) 0.000 000 000 000 005 976 876 489 113 6 × 2 = 0 + 0.000 000 000 000 011 953 752 978 227 2;
  • 36) 0.000 000 000 000 011 953 752 978 227 2 × 2 = 0 + 0.000 000 000 000 023 907 505 956 454 4;
  • 37) 0.000 000 000 000 023 907 505 956 454 4 × 2 = 0 + 0.000 000 000 000 047 815 011 912 908 8;
  • 38) 0.000 000 000 000 047 815 011 912 908 8 × 2 = 0 + 0.000 000 000 000 095 630 023 825 817 6;
  • 39) 0.000 000 000 000 095 630 023 825 817 6 × 2 = 0 + 0.000 000 000 000 191 260 047 651 635 2;
  • 40) 0.000 000 000 000 191 260 047 651 635 2 × 2 = 0 + 0.000 000 000 000 382 520 095 303 270 4;
  • 41) 0.000 000 000 000 382 520 095 303 270 4 × 2 = 0 + 0.000 000 000 000 765 040 190 606 540 8;
  • 42) 0.000 000 000 000 765 040 190 606 540 8 × 2 = 0 + 0.000 000 000 001 530 080 381 213 081 6;
  • 43) 0.000 000 000 001 530 080 381 213 081 6 × 2 = 0 + 0.000 000 000 003 060 160 762 426 163 2;
  • 44) 0.000 000 000 003 060 160 762 426 163 2 × 2 = 0 + 0.000 000 000 006 120 321 524 852 326 4;
  • 45) 0.000 000 000 006 120 321 524 852 326 4 × 2 = 0 + 0.000 000 000 012 240 643 049 704 652 8;
  • 46) 0.000 000 000 012 240 643 049 704 652 8 × 2 = 0 + 0.000 000 000 024 481 286 099 409 305 6;
  • 47) 0.000 000 000 024 481 286 099 409 305 6 × 2 = 0 + 0.000 000 000 048 962 572 198 818 611 2;
  • 48) 0.000 000 000 048 962 572 198 818 611 2 × 2 = 0 + 0.000 000 000 097 925 144 397 637 222 4;
  • 49) 0.000 000 000 097 925 144 397 637 222 4 × 2 = 0 + 0.000 000 000 195 850 288 795 274 444 8;
  • 50) 0.000 000 000 195 850 288 795 274 444 8 × 2 = 0 + 0.000 000 000 391 700 577 590 548 889 6;
  • 51) 0.000 000 000 391 700 577 590 548 889 6 × 2 = 0 + 0.000 000 000 783 401 155 181 097 779 2;
  • 52) 0.000 000 000 783 401 155 181 097 779 2 × 2 = 0 + 0.000 000 001 566 802 310 362 195 558 4;
  • 53) 0.000 000 001 566 802 310 362 195 558 4 × 2 = 0 + 0.000 000 003 133 604 620 724 391 116 8;
  • 54) 0.000 000 003 133 604 620 724 391 116 8 × 2 = 0 + 0.000 000 006 267 209 241 448 782 233 6;
  • 55) 0.000 000 006 267 209 241 448 782 233 6 × 2 = 0 + 0.000 000 012 534 418 482 897 564 467 2;
  • 56) 0.000 000 012 534 418 482 897 564 467 2 × 2 = 0 + 0.000 000 025 068 836 965 795 128 934 4;
  • 57) 0.000 000 025 068 836 965 795 128 934 4 × 2 = 0 + 0.000 000 050 137 673 931 590 257 868 8;
  • 58) 0.000 000 050 137 673 931 590 257 868 8 × 2 = 0 + 0.000 000 100 275 347 863 180 515 737 6;
  • 59) 0.000 000 100 275 347 863 180 515 737 6 × 2 = 0 + 0.000 000 200 550 695 726 361 031 475 2;
  • 60) 0.000 000 200 550 695 726 361 031 475 2 × 2 = 0 + 0.000 000 401 101 391 452 722 062 950 4;
  • 61) 0.000 000 401 101 391 452 722 062 950 4 × 2 = 0 + 0.000 000 802 202 782 905 444 125 900 8;
  • 62) 0.000 000 802 202 782 905 444 125 900 8 × 2 = 0 + 0.000 001 604 405 565 810 888 251 801 6;
  • 63) 0.000 001 604 405 565 810 888 251 801 6 × 2 = 0 + 0.000 003 208 811 131 621 776 503 603 2;
  • 64) 0.000 003 208 811 131 621 776 503 603 2 × 2 = 0 + 0.000 006 417 622 263 243 553 007 206 4;
  • 65) 0.000 006 417 622 263 243 553 007 206 4 × 2 = 0 + 0.000 012 835 244 526 487 106 014 412 8;
  • 66) 0.000 012 835 244 526 487 106 014 412 8 × 2 = 0 + 0.000 025 670 489 052 974 212 028 825 6;
  • 67) 0.000 025 670 489 052 974 212 028 825 6 × 2 = 0 + 0.000 051 340 978 105 948 424 057 651 2;
  • 68) 0.000 051 340 978 105 948 424 057 651 2 × 2 = 0 + 0.000 102 681 956 211 896 848 115 302 4;
  • 69) 0.000 102 681 956 211 896 848 115 302 4 × 2 = 0 + 0.000 205 363 912 423 793 696 230 604 8;
  • 70) 0.000 205 363 912 423 793 696 230 604 8 × 2 = 0 + 0.000 410 727 824 847 587 392 461 209 6;
  • 71) 0.000 410 727 824 847 587 392 461 209 6 × 2 = 0 + 0.000 821 455 649 695 174 784 922 419 2;
  • 72) 0.000 821 455 649 695 174 784 922 419 2 × 2 = 0 + 0.001 642 911 299 390 349 569 844 838 4;
  • 73) 0.001 642 911 299 390 349 569 844 838 4 × 2 = 0 + 0.003 285 822 598 780 699 139 689 676 8;
  • 74) 0.003 285 822 598 780 699 139 689 676 8 × 2 = 0 + 0.006 571 645 197 561 398 279 379 353 6;
  • 75) 0.006 571 645 197 561 398 279 379 353 6 × 2 = 0 + 0.013 143 290 395 122 796 558 758 707 2;
  • 76) 0.013 143 290 395 122 796 558 758 707 2 × 2 = 0 + 0.026 286 580 790 245 593 117 517 414 4;
  • 77) 0.026 286 580 790 245 593 117 517 414 4 × 2 = 0 + 0.052 573 161 580 491 186 235 034 828 8;
  • 78) 0.052 573 161 580 491 186 235 034 828 8 × 2 = 0 + 0.105 146 323 160 982 372 470 069 657 6;
  • 79) 0.105 146 323 160 982 372 470 069 657 6 × 2 = 0 + 0.210 292 646 321 964 744 940 139 315 2;
  • 80) 0.210 292 646 321 964 744 940 139 315 2 × 2 = 0 + 0.420 585 292 643 929 489 880 278 630 4;
  • 81) 0.420 585 292 643 929 489 880 278 630 4 × 2 = 0 + 0.841 170 585 287 858 979 760 557 260 8;
  • 82) 0.841 170 585 287 858 979 760 557 260 8 × 2 = 1 + 0.682 341 170 575 717 959 521 114 521 6;
  • 83) 0.682 341 170 575 717 959 521 114 521 6 × 2 = 1 + 0.364 682 341 151 435 919 042 229 043 2;
  • 84) 0.364 682 341 151 435 919 042 229 043 2 × 2 = 0 + 0.729 364 682 302 871 838 084 458 086 4;
  • 85) 0.729 364 682 302 871 838 084 458 086 4 × 2 = 1 + 0.458 729 364 605 743 676 168 916 172 8;
  • 86) 0.458 729 364 605 743 676 168 916 172 8 × 2 = 0 + 0.917 458 729 211 487 352 337 832 345 6;
  • 87) 0.917 458 729 211 487 352 337 832 345 6 × 2 = 1 + 0.834 917 458 422 974 704 675 664 691 2;
  • 88) 0.834 917 458 422 974 704 675 664 691 2 × 2 = 1 + 0.669 834 916 845 949 409 351 329 382 4;
  • 89) 0.669 834 916 845 949 409 351 329 382 4 × 2 = 1 + 0.339 669 833 691 898 818 702 658 764 8;
  • 90) 0.339 669 833 691 898 818 702 658 764 8 × 2 = 0 + 0.679 339 667 383 797 637 405 317 529 6;
  • 91) 0.679 339 667 383 797 637 405 317 529 6 × 2 = 1 + 0.358 679 334 767 595 274 810 635 059 2;
  • 92) 0.358 679 334 767 595 274 810 635 059 2 × 2 = 0 + 0.717 358 669 535 190 549 621 270 118 4;
  • 93) 0.717 358 669 535 190 549 621 270 118 4 × 2 = 1 + 0.434 717 339 070 381 099 242 540 236 8;
  • 94) 0.434 717 339 070 381 099 242 540 236 8 × 2 = 0 + 0.869 434 678 140 762 198 485 080 473 6;
  • 95) 0.869 434 678 140 762 198 485 080 473 6 × 2 = 1 + 0.738 869 356 281 524 396 970 160 947 2;
  • 96) 0.738 869 356 281 524 396 970 160 947 2 × 2 = 1 + 0.477 738 712 563 048 793 940 321 894 4;
  • 97) 0.477 738 712 563 048 793 940 321 894 4 × 2 = 0 + 0.955 477 425 126 097 587 880 643 788 8;
  • 98) 0.955 477 425 126 097 587 880 643 788 8 × 2 = 1 + 0.910 954 850 252 195 175 761 287 577 6;
  • 99) 0.910 954 850 252 195 175 761 287 577 6 × 2 = 1 + 0.821 909 700 504 390 351 522 575 155 2;
  • 100) 0.821 909 700 504 390 351 522 575 155 2 × 2 = 1 + 0.643 819 401 008 780 703 045 150 310 4;
  • 101) 0.643 819 401 008 780 703 045 150 310 4 × 2 = 1 + 0.287 638 802 017 561 406 090 300 620 8;
  • 102) 0.287 638 802 017 561 406 090 300 620 8 × 2 = 0 + 0.575 277 604 035 122 812 180 601 241 6;
  • 103) 0.575 277 604 035 122 812 180 601 241 6 × 2 = 1 + 0.150 555 208 070 245 624 361 202 483 2;
  • 104) 0.150 555 208 070 245 624 361 202 483 2 × 2 = 0 + 0.301 110 416 140 491 248 722 404 966 4;
  • 105) 0.301 110 416 140 491 248 722 404 966 4 × 2 = 0 + 0.602 220 832 280 982 497 444 809 932 8;
  • 106) 0.602 220 832 280 982 497 444 809 932 8 × 2 = 1 + 0.204 441 664 561 964 994 889 619 865 6;
  • 107) 0.204 441 664 561 964 994 889 619 865 6 × 2 = 0 + 0.408 883 329 123 929 989 779 239 731 2;
  • 108) 0.408 883 329 123 929 989 779 239 731 2 × 2 = 0 + 0.817 766 658 247 859 979 558 479 462 4;
  • 109) 0.817 766 658 247 859 979 558 479 462 4 × 2 = 1 + 0.635 533 316 495 719 959 116 958 924 8;
  • 110) 0.635 533 316 495 719 959 116 958 924 8 × 2 = 1 + 0.271 066 632 991 439 918 233 917 849 6;
  • 111) 0.271 066 632 991 439 918 233 917 849 6 × 2 = 0 + 0.542 133 265 982 879 836 467 835 699 2;
  • 112) 0.542 133 265 982 879 836 467 835 699 2 × 2 = 1 + 0.084 266 531 965 759 672 935 671 398 4;
  • 113) 0.084 266 531 965 759 672 935 671 398 4 × 2 = 0 + 0.168 533 063 931 519 345 871 342 796 8;
  • 114) 0.168 533 063 931 519 345 871 342 796 8 × 2 = 0 + 0.337 066 127 863 038 691 742 685 593 6;
  • 115) 0.337 066 127 863 038 691 742 685 593 6 × 2 = 0 + 0.674 132 255 726 077 383 485 371 187 2;
  • 116) 0.674 132 255 726 077 383 485 371 187 2 × 2 = 1 + 0.348 264 511 452 154 766 970 742 374 4;
  • 117) 0.348 264 511 452 154 766 970 742 374 4 × 2 = 0 + 0.696 529 022 904 309 533 941 484 748 8;
  • 118) 0.696 529 022 904 309 533 941 484 748 8 × 2 = 1 + 0.393 058 045 808 619 067 882 969 497 6;
  • 119) 0.393 058 045 808 619 067 882 969 497 6 × 2 = 0 + 0.786 116 091 617 238 135 765 938 995 2;
  • 120) 0.786 116 091 617 238 135 765 938 995 2 × 2 = 1 + 0.572 232 183 234 476 271 531 877 990 4;
  • 121) 0.572 232 183 234 476 271 531 877 990 4 × 2 = 1 + 0.144 464 366 468 952 543 063 755 980 8;
  • 122) 0.144 464 366 468 952 543 063 755 980 8 × 2 = 0 + 0.288 928 732 937 905 086 127 511 961 6;
  • 123) 0.288 928 732 937 905 086 127 511 961 6 × 2 = 0 + 0.577 857 465 875 810 172 255 023 923 2;
  • 124) 0.577 857 465 875 810 172 255 023 923 2 × 2 = 1 + 0.155 714 931 751 620 344 510 047 846 4;
  • 125) 0.155 714 931 751 620 344 510 047 846 4 × 2 = 0 + 0.311 429 863 503 240 689 020 095 692 8;
  • 126) 0.311 429 863 503 240 689 020 095 692 8 × 2 = 0 + 0.622 859 727 006 481 378 040 191 385 6;
  • 127) 0.622 859 727 006 481 378 040 191 385 6 × 2 = 1 + 0.245 719 454 012 962 756 080 382 771 2;
  • 128) 0.245 719 454 012 962 756 080 382 771 2 × 2 = 0 + 0.491 438 908 025 925 512 160 765 542 4;
  • 129) 0.491 438 908 025 925 512 160 765 542 4 × 2 = 0 + 0.982 877 816 051 851 024 321 531 084 8;
  • 130) 0.982 877 816 051 851 024 321 531 084 8 × 2 = 1 + 0.965 755 632 103 702 048 643 062 169 6;
  • 131) 0.965 755 632 103 702 048 643 062 169 6 × 2 = 1 + 0.931 511 264 207 404 097 286 124 339 2;
  • 132) 0.931 511 264 207 404 097 286 124 339 2 × 2 = 1 + 0.863 022 528 414 808 194 572 248 678 4;
  • 133) 0.863 022 528 414 808 194 572 248 678 4 × 2 = 1 + 0.726 045 056 829 616 389 144 497 356 8;
  • 134) 0.726 045 056 829 616 389 144 497 356 8 × 2 = 1 + 0.452 090 113 659 232 778 288 994 713 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 000 000 000 000 000 347 9(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1011 1010 1011 0111 1010 0100 1101 0001 0101 1001 0010 0111 11(2)

5. Positive number before normalization:

0.000 000 000 000 000 000 000 000 347 9(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1011 1010 1011 0111 1010 0100 1101 0001 0101 1001 0010 0111 11(2)

6. Normalize the binary representation of the number.

Shift the decimal mark 82 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 000 347 9(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1011 1010 1011 0111 1010 0100 1101 0001 0101 1001 0010 0111 11(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1011 1010 1011 0111 1010 0100 1101 0001 0101 1001 0010 0111 11(2) × 20 =


1.1010 1110 1010 1101 1110 1001 0011 0100 0101 0110 0100 1001 1111(2) × 2-82


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


Mantissa (not normalized):
1.1010 1110 1010 1101 1110 1001 0011 0100 0101 0110 0100 1001 1111


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


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


(-82 + 1 023)(10) =


941(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;
  • 941 ÷ 2 = 470 + 1;
  • 470 ÷ 2 = 235 + 0;
  • 235 ÷ 2 = 117 + 1;
  • 117 ÷ 2 = 58 + 1;
  • 58 ÷ 2 = 29 + 0;
  • 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) =


941(10) =


011 1010 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. 1010 1110 1010 1101 1110 1001 0011 0100 0101 0110 0100 1001 1111 =


1010 1110 1010 1101 1110 1001 0011 0100 0101 0110 0100 1001 1111


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


Mantissa (52 bits) =
1010 1110 1010 1101 1110 1001 0011 0100 0101 0110 0100 1001 1111


Decimal number 0.000 000 000 000 000 000 000 000 347 9 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 011 1010 1101 - 1010 1110 1010 1101 1110 1001 0011 0100 0101 0110 0100 1001 1111


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