1 254 256 554 686 467 649 555 242 757 846 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 254 256 554 686 467 649 555 242 757 846(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
1 254 256 554 686 467 649 555 242 757 846(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. 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;
  • 1 254 256 554 686 467 649 555 242 757 846 ÷ 2 = 627 128 277 343 233 824 777 621 378 923 + 0;
  • 627 128 277 343 233 824 777 621 378 923 ÷ 2 = 313 564 138 671 616 912 388 810 689 461 + 1;
  • 313 564 138 671 616 912 388 810 689 461 ÷ 2 = 156 782 069 335 808 456 194 405 344 730 + 1;
  • 156 782 069 335 808 456 194 405 344 730 ÷ 2 = 78 391 034 667 904 228 097 202 672 365 + 0;
  • 78 391 034 667 904 228 097 202 672 365 ÷ 2 = 39 195 517 333 952 114 048 601 336 182 + 1;
  • 39 195 517 333 952 114 048 601 336 182 ÷ 2 = 19 597 758 666 976 057 024 300 668 091 + 0;
  • 19 597 758 666 976 057 024 300 668 091 ÷ 2 = 9 798 879 333 488 028 512 150 334 045 + 1;
  • 9 798 879 333 488 028 512 150 334 045 ÷ 2 = 4 899 439 666 744 014 256 075 167 022 + 1;
  • 4 899 439 666 744 014 256 075 167 022 ÷ 2 = 2 449 719 833 372 007 128 037 583 511 + 0;
  • 2 449 719 833 372 007 128 037 583 511 ÷ 2 = 1 224 859 916 686 003 564 018 791 755 + 1;
  • 1 224 859 916 686 003 564 018 791 755 ÷ 2 = 612 429 958 343 001 782 009 395 877 + 1;
  • 612 429 958 343 001 782 009 395 877 ÷ 2 = 306 214 979 171 500 891 004 697 938 + 1;
  • 306 214 979 171 500 891 004 697 938 ÷ 2 = 153 107 489 585 750 445 502 348 969 + 0;
  • 153 107 489 585 750 445 502 348 969 ÷ 2 = 76 553 744 792 875 222 751 174 484 + 1;
  • 76 553 744 792 875 222 751 174 484 ÷ 2 = 38 276 872 396 437 611 375 587 242 + 0;
  • 38 276 872 396 437 611 375 587 242 ÷ 2 = 19 138 436 198 218 805 687 793 621 + 0;
  • 19 138 436 198 218 805 687 793 621 ÷ 2 = 9 569 218 099 109 402 843 896 810 + 1;
  • 9 569 218 099 109 402 843 896 810 ÷ 2 = 4 784 609 049 554 701 421 948 405 + 0;
  • 4 784 609 049 554 701 421 948 405 ÷ 2 = 2 392 304 524 777 350 710 974 202 + 1;
  • 2 392 304 524 777 350 710 974 202 ÷ 2 = 1 196 152 262 388 675 355 487 101 + 0;
  • 1 196 152 262 388 675 355 487 101 ÷ 2 = 598 076 131 194 337 677 743 550 + 1;
  • 598 076 131 194 337 677 743 550 ÷ 2 = 299 038 065 597 168 838 871 775 + 0;
  • 299 038 065 597 168 838 871 775 ÷ 2 = 149 519 032 798 584 419 435 887 + 1;
  • 149 519 032 798 584 419 435 887 ÷ 2 = 74 759 516 399 292 209 717 943 + 1;
  • 74 759 516 399 292 209 717 943 ÷ 2 = 37 379 758 199 646 104 858 971 + 1;
  • 37 379 758 199 646 104 858 971 ÷ 2 = 18 689 879 099 823 052 429 485 + 1;
  • 18 689 879 099 823 052 429 485 ÷ 2 = 9 344 939 549 911 526 214 742 + 1;
  • 9 344 939 549 911 526 214 742 ÷ 2 = 4 672 469 774 955 763 107 371 + 0;
  • 4 672 469 774 955 763 107 371 ÷ 2 = 2 336 234 887 477 881 553 685 + 1;
  • 2 336 234 887 477 881 553 685 ÷ 2 = 1 168 117 443 738 940 776 842 + 1;
  • 1 168 117 443 738 940 776 842 ÷ 2 = 584 058 721 869 470 388 421 + 0;
  • 584 058 721 869 470 388 421 ÷ 2 = 292 029 360 934 735 194 210 + 1;
  • 292 029 360 934 735 194 210 ÷ 2 = 146 014 680 467 367 597 105 + 0;
  • 146 014 680 467 367 597 105 ÷ 2 = 73 007 340 233 683 798 552 + 1;
  • 73 007 340 233 683 798 552 ÷ 2 = 36 503 670 116 841 899 276 + 0;
  • 36 503 670 116 841 899 276 ÷ 2 = 18 251 835 058 420 949 638 + 0;
  • 18 251 835 058 420 949 638 ÷ 2 = 9 125 917 529 210 474 819 + 0;
  • 9 125 917 529 210 474 819 ÷ 2 = 4 562 958 764 605 237 409 + 1;
  • 4 562 958 764 605 237 409 ÷ 2 = 2 281 479 382 302 618 704 + 1;
  • 2 281 479 382 302 618 704 ÷ 2 = 1 140 739 691 151 309 352 + 0;
  • 1 140 739 691 151 309 352 ÷ 2 = 570 369 845 575 654 676 + 0;
  • 570 369 845 575 654 676 ÷ 2 = 285 184 922 787 827 338 + 0;
  • 285 184 922 787 827 338 ÷ 2 = 142 592 461 393 913 669 + 0;
  • 142 592 461 393 913 669 ÷ 2 = 71 296 230 696 956 834 + 1;
  • 71 296 230 696 956 834 ÷ 2 = 35 648 115 348 478 417 + 0;
  • 35 648 115 348 478 417 ÷ 2 = 17 824 057 674 239 208 + 1;
  • 17 824 057 674 239 208 ÷ 2 = 8 912 028 837 119 604 + 0;
  • 8 912 028 837 119 604 ÷ 2 = 4 456 014 418 559 802 + 0;
  • 4 456 014 418 559 802 ÷ 2 = 2 228 007 209 279 901 + 0;
  • 2 228 007 209 279 901 ÷ 2 = 1 114 003 604 639 950 + 1;
  • 1 114 003 604 639 950 ÷ 2 = 557 001 802 319 975 + 0;
  • 557 001 802 319 975 ÷ 2 = 278 500 901 159 987 + 1;
  • 278 500 901 159 987 ÷ 2 = 139 250 450 579 993 + 1;
  • 139 250 450 579 993 ÷ 2 = 69 625 225 289 996 + 1;
  • 69 625 225 289 996 ÷ 2 = 34 812 612 644 998 + 0;
  • 34 812 612 644 998 ÷ 2 = 17 406 306 322 499 + 0;
  • 17 406 306 322 499 ÷ 2 = 8 703 153 161 249 + 1;
  • 8 703 153 161 249 ÷ 2 = 4 351 576 580 624 + 1;
  • 4 351 576 580 624 ÷ 2 = 2 175 788 290 312 + 0;
  • 2 175 788 290 312 ÷ 2 = 1 087 894 145 156 + 0;
  • 1 087 894 145 156 ÷ 2 = 543 947 072 578 + 0;
  • 543 947 072 578 ÷ 2 = 271 973 536 289 + 0;
  • 271 973 536 289 ÷ 2 = 135 986 768 144 + 1;
  • 135 986 768 144 ÷ 2 = 67 993 384 072 + 0;
  • 67 993 384 072 ÷ 2 = 33 996 692 036 + 0;
  • 33 996 692 036 ÷ 2 = 16 998 346 018 + 0;
  • 16 998 346 018 ÷ 2 = 8 499 173 009 + 0;
  • 8 499 173 009 ÷ 2 = 4 249 586 504 + 1;
  • 4 249 586 504 ÷ 2 = 2 124 793 252 + 0;
  • 2 124 793 252 ÷ 2 = 1 062 396 626 + 0;
  • 1 062 396 626 ÷ 2 = 531 198 313 + 0;
  • 531 198 313 ÷ 2 = 265 599 156 + 1;
  • 265 599 156 ÷ 2 = 132 799 578 + 0;
  • 132 799 578 ÷ 2 = 66 399 789 + 0;
  • 66 399 789 ÷ 2 = 33 199 894 + 1;
  • 33 199 894 ÷ 2 = 16 599 947 + 0;
  • 16 599 947 ÷ 2 = 8 299 973 + 1;
  • 8 299 973 ÷ 2 = 4 149 986 + 1;
  • 4 149 986 ÷ 2 = 2 074 993 + 0;
  • 2 074 993 ÷ 2 = 1 037 496 + 1;
  • 1 037 496 ÷ 2 = 518 748 + 0;
  • 518 748 ÷ 2 = 259 374 + 0;
  • 259 374 ÷ 2 = 129 687 + 0;
  • 129 687 ÷ 2 = 64 843 + 1;
  • 64 843 ÷ 2 = 32 421 + 1;
  • 32 421 ÷ 2 = 16 210 + 1;
  • 16 210 ÷ 2 = 8 105 + 0;
  • 8 105 ÷ 2 = 4 052 + 1;
  • 4 052 ÷ 2 = 2 026 + 0;
  • 2 026 ÷ 2 = 1 013 + 0;
  • 1 013 ÷ 2 = 506 + 1;
  • 506 ÷ 2 = 253 + 0;
  • 253 ÷ 2 = 126 + 1;
  • 126 ÷ 2 = 63 + 0;
  • 63 ÷ 2 = 31 + 1;
  • 31 ÷ 2 = 15 + 1;
  • 15 ÷ 2 = 7 + 1;
  • 7 ÷ 2 = 3 + 1;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

2. Construct the base 2 representation of the positive number.

Take all the remainders starting from the bottom of the list constructed above.

1 254 256 554 686 467 649 555 242 757 846(10) =


1111 1101 0100 1011 1000 1011 0100 1000 1000 0100 0011 0011 1010 0010 1000 0110 0010 1011 0111 1101 0101 0010 1110 1101 0110(2)


3. Normalize the binary representation of the number.

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


1 254 256 554 686 467 649 555 242 757 846(10) =


1111 1101 0100 1011 1000 1011 0100 1000 1000 0100 0011 0011 1010 0010 1000 0110 0010 1011 0111 1101 0101 0010 1110 1101 0110(2) =


1111 1101 0100 1011 1000 1011 0100 1000 1000 0100 0011 0011 1010 0010 1000 0110 0010 1011 0111 1101 0101 0010 1110 1101 0110(2) × 20 =


1.1111 1010 1001 0111 0001 0110 1001 0001 0000 1000 0110 0111 0100 0101 0000 1100 0101 0110 1111 1010 1010 0101 1101 1010 110(2) × 299


4. 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): 99


Mantissa (not normalized):
1.1111 1010 1001 0111 0001 0110 1001 0001 0000 1000 0110 0111 0100 0101 0000 1100 0101 0110 1111 1010 1010 0101 1101 1010 110


5. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


99 + 2(11-1) - 1 =


(99 + 1 023)(10) =


1 122(10)


6. 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;
  • 1 122 ÷ 2 = 561 + 0;
  • 561 ÷ 2 = 280 + 1;
  • 280 ÷ 2 = 140 + 0;
  • 140 ÷ 2 = 70 + 0;
  • 70 ÷ 2 = 35 + 0;
  • 35 ÷ 2 = 17 + 1;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

7. Construct the base 2 representation of the adjusted exponent.

Take all the remainders starting from the bottom of the list constructed above.


Exponent (adjusted) =


1122(10) =


100 0110 0010(2)


8. 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, by removing the excess bits, from the right (if any of the excess bits is set on 1, we are losing precision...).


Mantissa (normalized) =


1. 1111 1010 1001 0111 0001 0110 1001 0001 0000 1000 0110 0111 0100 010 1000 0110 0010 1011 0111 1101 0101 0010 1110 1101 0110 =


1111 1010 1001 0111 0001 0110 1001 0001 0000 1000 0110 0111 0100


9. 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) =
100 0110 0010


Mantissa (52 bits) =
1111 1010 1001 0111 0001 0110 1001 0001 0000 1000 0110 0111 0100


Decimal number 1 254 256 554 686 467 649 555 242 757 846 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 100 0110 0010 - 1111 1010 1001 0111 0001 0110 1001 0001 0000 1000 0110 0111 0100


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