0.000 000 000 000 000 000 000 000 342 53 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 000 000 000 000 000 342 53(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 342 53(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 342 53.

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 342 53 × 2 = 0 + 0.000 000 000 000 000 000 000 000 685 06;
  • 2) 0.000 000 000 000 000 000 000 000 685 06 × 2 = 0 + 0.000 000 000 000 000 000 000 001 370 12;
  • 3) 0.000 000 000 000 000 000 000 001 370 12 × 2 = 0 + 0.000 000 000 000 000 000 000 002 740 24;
  • 4) 0.000 000 000 000 000 000 000 002 740 24 × 2 = 0 + 0.000 000 000 000 000 000 000 005 480 48;
  • 5) 0.000 000 000 000 000 000 000 005 480 48 × 2 = 0 + 0.000 000 000 000 000 000 000 010 960 96;
  • 6) 0.000 000 000 000 000 000 000 010 960 96 × 2 = 0 + 0.000 000 000 000 000 000 000 021 921 92;
  • 7) 0.000 000 000 000 000 000 000 021 921 92 × 2 = 0 + 0.000 000 000 000 000 000 000 043 843 84;
  • 8) 0.000 000 000 000 000 000 000 043 843 84 × 2 = 0 + 0.000 000 000 000 000 000 000 087 687 68;
  • 9) 0.000 000 000 000 000 000 000 087 687 68 × 2 = 0 + 0.000 000 000 000 000 000 000 175 375 36;
  • 10) 0.000 000 000 000 000 000 000 175 375 36 × 2 = 0 + 0.000 000 000 000 000 000 000 350 750 72;
  • 11) 0.000 000 000 000 000 000 000 350 750 72 × 2 = 0 + 0.000 000 000 000 000 000 000 701 501 44;
  • 12) 0.000 000 000 000 000 000 000 701 501 44 × 2 = 0 + 0.000 000 000 000 000 000 001 403 002 88;
  • 13) 0.000 000 000 000 000 000 001 403 002 88 × 2 = 0 + 0.000 000 000 000 000 000 002 806 005 76;
  • 14) 0.000 000 000 000 000 000 002 806 005 76 × 2 = 0 + 0.000 000 000 000 000 000 005 612 011 52;
  • 15) 0.000 000 000 000 000 000 005 612 011 52 × 2 = 0 + 0.000 000 000 000 000 000 011 224 023 04;
  • 16) 0.000 000 000 000 000 000 011 224 023 04 × 2 = 0 + 0.000 000 000 000 000 000 022 448 046 08;
  • 17) 0.000 000 000 000 000 000 022 448 046 08 × 2 = 0 + 0.000 000 000 000 000 000 044 896 092 16;
  • 18) 0.000 000 000 000 000 000 044 896 092 16 × 2 = 0 + 0.000 000 000 000 000 000 089 792 184 32;
  • 19) 0.000 000 000 000 000 000 089 792 184 32 × 2 = 0 + 0.000 000 000 000 000 000 179 584 368 64;
  • 20) 0.000 000 000 000 000 000 179 584 368 64 × 2 = 0 + 0.000 000 000 000 000 000 359 168 737 28;
  • 21) 0.000 000 000 000 000 000 359 168 737 28 × 2 = 0 + 0.000 000 000 000 000 000 718 337 474 56;
  • 22) 0.000 000 000 000 000 000 718 337 474 56 × 2 = 0 + 0.000 000 000 000 000 001 436 674 949 12;
  • 23) 0.000 000 000 000 000 001 436 674 949 12 × 2 = 0 + 0.000 000 000 000 000 002 873 349 898 24;
  • 24) 0.000 000 000 000 000 002 873 349 898 24 × 2 = 0 + 0.000 000 000 000 000 005 746 699 796 48;
  • 25) 0.000 000 000 000 000 005 746 699 796 48 × 2 = 0 + 0.000 000 000 000 000 011 493 399 592 96;
  • 26) 0.000 000 000 000 000 011 493 399 592 96 × 2 = 0 + 0.000 000 000 000 000 022 986 799 185 92;
  • 27) 0.000 000 000 000 000 022 986 799 185 92 × 2 = 0 + 0.000 000 000 000 000 045 973 598 371 84;
  • 28) 0.000 000 000 000 000 045 973 598 371 84 × 2 = 0 + 0.000 000 000 000 000 091 947 196 743 68;
  • 29) 0.000 000 000 000 000 091 947 196 743 68 × 2 = 0 + 0.000 000 000 000 000 183 894 393 487 36;
  • 30) 0.000 000 000 000 000 183 894 393 487 36 × 2 = 0 + 0.000 000 000 000 000 367 788 786 974 72;
  • 31) 0.000 000 000 000 000 367 788 786 974 72 × 2 = 0 + 0.000 000 000 000 000 735 577 573 949 44;
  • 32) 0.000 000 000 000 000 735 577 573 949 44 × 2 = 0 + 0.000 000 000 000 001 471 155 147 898 88;
  • 33) 0.000 000 000 000 001 471 155 147 898 88 × 2 = 0 + 0.000 000 000 000 002 942 310 295 797 76;
  • 34) 0.000 000 000 000 002 942 310 295 797 76 × 2 = 0 + 0.000 000 000 000 005 884 620 591 595 52;
  • 35) 0.000 000 000 000 005 884 620 591 595 52 × 2 = 0 + 0.000 000 000 000 011 769 241 183 191 04;
  • 36) 0.000 000 000 000 011 769 241 183 191 04 × 2 = 0 + 0.000 000 000 000 023 538 482 366 382 08;
  • 37) 0.000 000 000 000 023 538 482 366 382 08 × 2 = 0 + 0.000 000 000 000 047 076 964 732 764 16;
  • 38) 0.000 000 000 000 047 076 964 732 764 16 × 2 = 0 + 0.000 000 000 000 094 153 929 465 528 32;
  • 39) 0.000 000 000 000 094 153 929 465 528 32 × 2 = 0 + 0.000 000 000 000 188 307 858 931 056 64;
  • 40) 0.000 000 000 000 188 307 858 931 056 64 × 2 = 0 + 0.000 000 000 000 376 615 717 862 113 28;
  • 41) 0.000 000 000 000 376 615 717 862 113 28 × 2 = 0 + 0.000 000 000 000 753 231 435 724 226 56;
  • 42) 0.000 000 000 000 753 231 435 724 226 56 × 2 = 0 + 0.000 000 000 001 506 462 871 448 453 12;
  • 43) 0.000 000 000 001 506 462 871 448 453 12 × 2 = 0 + 0.000 000 000 003 012 925 742 896 906 24;
  • 44) 0.000 000 000 003 012 925 742 896 906 24 × 2 = 0 + 0.000 000 000 006 025 851 485 793 812 48;
  • 45) 0.000 000 000 006 025 851 485 793 812 48 × 2 = 0 + 0.000 000 000 012 051 702 971 587 624 96;
  • 46) 0.000 000 000 012 051 702 971 587 624 96 × 2 = 0 + 0.000 000 000 024 103 405 943 175 249 92;
  • 47) 0.000 000 000 024 103 405 943 175 249 92 × 2 = 0 + 0.000 000 000 048 206 811 886 350 499 84;
  • 48) 0.000 000 000 048 206 811 886 350 499 84 × 2 = 0 + 0.000 000 000 096 413 623 772 700 999 68;
  • 49) 0.000 000 000 096 413 623 772 700 999 68 × 2 = 0 + 0.000 000 000 192 827 247 545 401 999 36;
  • 50) 0.000 000 000 192 827 247 545 401 999 36 × 2 = 0 + 0.000 000 000 385 654 495 090 803 998 72;
  • 51) 0.000 000 000 385 654 495 090 803 998 72 × 2 = 0 + 0.000 000 000 771 308 990 181 607 997 44;
  • 52) 0.000 000 000 771 308 990 181 607 997 44 × 2 = 0 + 0.000 000 001 542 617 980 363 215 994 88;
  • 53) 0.000 000 001 542 617 980 363 215 994 88 × 2 = 0 + 0.000 000 003 085 235 960 726 431 989 76;
  • 54) 0.000 000 003 085 235 960 726 431 989 76 × 2 = 0 + 0.000 000 006 170 471 921 452 863 979 52;
  • 55) 0.000 000 006 170 471 921 452 863 979 52 × 2 = 0 + 0.000 000 012 340 943 842 905 727 959 04;
  • 56) 0.000 000 012 340 943 842 905 727 959 04 × 2 = 0 + 0.000 000 024 681 887 685 811 455 918 08;
  • 57) 0.000 000 024 681 887 685 811 455 918 08 × 2 = 0 + 0.000 000 049 363 775 371 622 911 836 16;
  • 58) 0.000 000 049 363 775 371 622 911 836 16 × 2 = 0 + 0.000 000 098 727 550 743 245 823 672 32;
  • 59) 0.000 000 098 727 550 743 245 823 672 32 × 2 = 0 + 0.000 000 197 455 101 486 491 647 344 64;
  • 60) 0.000 000 197 455 101 486 491 647 344 64 × 2 = 0 + 0.000 000 394 910 202 972 983 294 689 28;
  • 61) 0.000 000 394 910 202 972 983 294 689 28 × 2 = 0 + 0.000 000 789 820 405 945 966 589 378 56;
  • 62) 0.000 000 789 820 405 945 966 589 378 56 × 2 = 0 + 0.000 001 579 640 811 891 933 178 757 12;
  • 63) 0.000 001 579 640 811 891 933 178 757 12 × 2 = 0 + 0.000 003 159 281 623 783 866 357 514 24;
  • 64) 0.000 003 159 281 623 783 866 357 514 24 × 2 = 0 + 0.000 006 318 563 247 567 732 715 028 48;
  • 65) 0.000 006 318 563 247 567 732 715 028 48 × 2 = 0 + 0.000 012 637 126 495 135 465 430 056 96;
  • 66) 0.000 012 637 126 495 135 465 430 056 96 × 2 = 0 + 0.000 025 274 252 990 270 930 860 113 92;
  • 67) 0.000 025 274 252 990 270 930 860 113 92 × 2 = 0 + 0.000 050 548 505 980 541 861 720 227 84;
  • 68) 0.000 050 548 505 980 541 861 720 227 84 × 2 = 0 + 0.000 101 097 011 961 083 723 440 455 68;
  • 69) 0.000 101 097 011 961 083 723 440 455 68 × 2 = 0 + 0.000 202 194 023 922 167 446 880 911 36;
  • 70) 0.000 202 194 023 922 167 446 880 911 36 × 2 = 0 + 0.000 404 388 047 844 334 893 761 822 72;
  • 71) 0.000 404 388 047 844 334 893 761 822 72 × 2 = 0 + 0.000 808 776 095 688 669 787 523 645 44;
  • 72) 0.000 808 776 095 688 669 787 523 645 44 × 2 = 0 + 0.001 617 552 191 377 339 575 047 290 88;
  • 73) 0.001 617 552 191 377 339 575 047 290 88 × 2 = 0 + 0.003 235 104 382 754 679 150 094 581 76;
  • 74) 0.003 235 104 382 754 679 150 094 581 76 × 2 = 0 + 0.006 470 208 765 509 358 300 189 163 52;
  • 75) 0.006 470 208 765 509 358 300 189 163 52 × 2 = 0 + 0.012 940 417 531 018 716 600 378 327 04;
  • 76) 0.012 940 417 531 018 716 600 378 327 04 × 2 = 0 + 0.025 880 835 062 037 433 200 756 654 08;
  • 77) 0.025 880 835 062 037 433 200 756 654 08 × 2 = 0 + 0.051 761 670 124 074 866 401 513 308 16;
  • 78) 0.051 761 670 124 074 866 401 513 308 16 × 2 = 0 + 0.103 523 340 248 149 732 803 026 616 32;
  • 79) 0.103 523 340 248 149 732 803 026 616 32 × 2 = 0 + 0.207 046 680 496 299 465 606 053 232 64;
  • 80) 0.207 046 680 496 299 465 606 053 232 64 × 2 = 0 + 0.414 093 360 992 598 931 212 106 465 28;
  • 81) 0.414 093 360 992 598 931 212 106 465 28 × 2 = 0 + 0.828 186 721 985 197 862 424 212 930 56;
  • 82) 0.828 186 721 985 197 862 424 212 930 56 × 2 = 1 + 0.656 373 443 970 395 724 848 425 861 12;
  • 83) 0.656 373 443 970 395 724 848 425 861 12 × 2 = 1 + 0.312 746 887 940 791 449 696 851 722 24;
  • 84) 0.312 746 887 940 791 449 696 851 722 24 × 2 = 0 + 0.625 493 775 881 582 899 393 703 444 48;
  • 85) 0.625 493 775 881 582 899 393 703 444 48 × 2 = 1 + 0.250 987 551 763 165 798 787 406 888 96;
  • 86) 0.250 987 551 763 165 798 787 406 888 96 × 2 = 0 + 0.501 975 103 526 331 597 574 813 777 92;
  • 87) 0.501 975 103 526 331 597 574 813 777 92 × 2 = 1 + 0.003 950 207 052 663 195 149 627 555 84;
  • 88) 0.003 950 207 052 663 195 149 627 555 84 × 2 = 0 + 0.007 900 414 105 326 390 299 255 111 68;
  • 89) 0.007 900 414 105 326 390 299 255 111 68 × 2 = 0 + 0.015 800 828 210 652 780 598 510 223 36;
  • 90) 0.015 800 828 210 652 780 598 510 223 36 × 2 = 0 + 0.031 601 656 421 305 561 197 020 446 72;
  • 91) 0.031 601 656 421 305 561 197 020 446 72 × 2 = 0 + 0.063 203 312 842 611 122 394 040 893 44;
  • 92) 0.063 203 312 842 611 122 394 040 893 44 × 2 = 0 + 0.126 406 625 685 222 244 788 081 786 88;
  • 93) 0.126 406 625 685 222 244 788 081 786 88 × 2 = 0 + 0.252 813 251 370 444 489 576 163 573 76;
  • 94) 0.252 813 251 370 444 489 576 163 573 76 × 2 = 0 + 0.505 626 502 740 888 979 152 327 147 52;
  • 95) 0.505 626 502 740 888 979 152 327 147 52 × 2 = 1 + 0.011 253 005 481 777 958 304 654 295 04;
  • 96) 0.011 253 005 481 777 958 304 654 295 04 × 2 = 0 + 0.022 506 010 963 555 916 609 308 590 08;
  • 97) 0.022 506 010 963 555 916 609 308 590 08 × 2 = 0 + 0.045 012 021 927 111 833 218 617 180 16;
  • 98) 0.045 012 021 927 111 833 218 617 180 16 × 2 = 0 + 0.090 024 043 854 223 666 437 234 360 32;
  • 99) 0.090 024 043 854 223 666 437 234 360 32 × 2 = 0 + 0.180 048 087 708 447 332 874 468 720 64;
  • 100) 0.180 048 087 708 447 332 874 468 720 64 × 2 = 0 + 0.360 096 175 416 894 665 748 937 441 28;
  • 101) 0.360 096 175 416 894 665 748 937 441 28 × 2 = 0 + 0.720 192 350 833 789 331 497 874 882 56;
  • 102) 0.720 192 350 833 789 331 497 874 882 56 × 2 = 1 + 0.440 384 701 667 578 662 995 749 765 12;
  • 103) 0.440 384 701 667 578 662 995 749 765 12 × 2 = 0 + 0.880 769 403 335 157 325 991 499 530 24;
  • 104) 0.880 769 403 335 157 325 991 499 530 24 × 2 = 1 + 0.761 538 806 670 314 651 982 999 060 48;
  • 105) 0.761 538 806 670 314 651 982 999 060 48 × 2 = 1 + 0.523 077 613 340 629 303 965 998 120 96;
  • 106) 0.523 077 613 340 629 303 965 998 120 96 × 2 = 1 + 0.046 155 226 681 258 607 931 996 241 92;
  • 107) 0.046 155 226 681 258 607 931 996 241 92 × 2 = 0 + 0.092 310 453 362 517 215 863 992 483 84;
  • 108) 0.092 310 453 362 517 215 863 992 483 84 × 2 = 0 + 0.184 620 906 725 034 431 727 984 967 68;
  • 109) 0.184 620 906 725 034 431 727 984 967 68 × 2 = 0 + 0.369 241 813 450 068 863 455 969 935 36;
  • 110) 0.369 241 813 450 068 863 455 969 935 36 × 2 = 0 + 0.738 483 626 900 137 726 911 939 870 72;
  • 111) 0.738 483 626 900 137 726 911 939 870 72 × 2 = 1 + 0.476 967 253 800 275 453 823 879 741 44;
  • 112) 0.476 967 253 800 275 453 823 879 741 44 × 2 = 0 + 0.953 934 507 600 550 907 647 759 482 88;
  • 113) 0.953 934 507 600 550 907 647 759 482 88 × 2 = 1 + 0.907 869 015 201 101 815 295 518 965 76;
  • 114) 0.907 869 015 201 101 815 295 518 965 76 × 2 = 1 + 0.815 738 030 402 203 630 591 037 931 52;
  • 115) 0.815 738 030 402 203 630 591 037 931 52 × 2 = 1 + 0.631 476 060 804 407 261 182 075 863 04;
  • 116) 0.631 476 060 804 407 261 182 075 863 04 × 2 = 1 + 0.262 952 121 608 814 522 364 151 726 08;
  • 117) 0.262 952 121 608 814 522 364 151 726 08 × 2 = 0 + 0.525 904 243 217 629 044 728 303 452 16;
  • 118) 0.525 904 243 217 629 044 728 303 452 16 × 2 = 1 + 0.051 808 486 435 258 089 456 606 904 32;
  • 119) 0.051 808 486 435 258 089 456 606 904 32 × 2 = 0 + 0.103 616 972 870 516 178 913 213 808 64;
  • 120) 0.103 616 972 870 516 178 913 213 808 64 × 2 = 0 + 0.207 233 945 741 032 357 826 427 617 28;
  • 121) 0.207 233 945 741 032 357 826 427 617 28 × 2 = 0 + 0.414 467 891 482 064 715 652 855 234 56;
  • 122) 0.414 467 891 482 064 715 652 855 234 56 × 2 = 0 + 0.828 935 782 964 129 431 305 710 469 12;
  • 123) 0.828 935 782 964 129 431 305 710 469 12 × 2 = 1 + 0.657 871 565 928 258 862 611 420 938 24;
  • 124) 0.657 871 565 928 258 862 611 420 938 24 × 2 = 1 + 0.315 743 131 856 517 725 222 841 876 48;
  • 125) 0.315 743 131 856 517 725 222 841 876 48 × 2 = 0 + 0.631 486 263 713 035 450 445 683 752 96;
  • 126) 0.631 486 263 713 035 450 445 683 752 96 × 2 = 1 + 0.262 972 527 426 070 900 891 367 505 92;
  • 127) 0.262 972 527 426 070 900 891 367 505 92 × 2 = 0 + 0.525 945 054 852 141 801 782 735 011 84;
  • 128) 0.525 945 054 852 141 801 782 735 011 84 × 2 = 1 + 0.051 890 109 704 283 603 565 470 023 68;
  • 129) 0.051 890 109 704 283 603 565 470 023 68 × 2 = 0 + 0.103 780 219 408 567 207 130 940 047 36;
  • 130) 0.103 780 219 408 567 207 130 940 047 36 × 2 = 0 + 0.207 560 438 817 134 414 261 880 094 72;
  • 131) 0.207 560 438 817 134 414 261 880 094 72 × 2 = 0 + 0.415 120 877 634 268 828 523 760 189 44;
  • 132) 0.415 120 877 634 268 828 523 760 189 44 × 2 = 0 + 0.830 241 755 268 537 657 047 520 378 88;
  • 133) 0.830 241 755 268 537 657 047 520 378 88 × 2 = 1 + 0.660 483 510 537 075 314 095 040 757 76;
  • 134) 0.660 483 510 537 075 314 095 040 757 76 × 2 = 1 + 0.320 967 021 074 150 628 190 081 515 52;

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 342 53(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1010 0000 0010 0000 0101 1100 0010 1111 0100 0011 0101 0000 11(2)

5. Positive number before normalization:

0.000 000 000 000 000 000 000 000 342 53(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1010 0000 0010 0000 0101 1100 0010 1111 0100 0011 0101 0000 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 342 53(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1010 0000 0010 0000 0101 1100 0010 1111 0100 0011 0101 0000 11(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0110 1010 0000 0010 0000 0101 1100 0010 1111 0100 0011 0101 0000 11(2) × 20 =


1.1010 1000 0000 1000 0001 0111 0000 1011 1101 0000 1101 0100 0011(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 1000 0000 1000 0001 0111 0000 1011 1101 0000 1101 0100 0011


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 1000 0000 1000 0001 0111 0000 1011 1101 0000 1101 0100 0011 =


1010 1000 0000 1000 0001 0111 0000 1011 1101 0000 1101 0100 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 1010 1101


Mantissa (52 bits) =
1010 1000 0000 1000 0001 0111 0000 1011 1101 0000 1101 0100 0011


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

0 - 011 1010 1101 - 1010 1000 0000 1000 0001 0111 0000 1011 1101 0000 1101 0100 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