1 101 011 010 011 011 111 010 100 000 158 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 101 011 010 011 011 111 010 100 000 158(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 101 011 010 011 011 111 010 100 000 158(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 101 011 010 011 011 111 010 100 000 158 ÷ 2 = 550 505 505 005 505 555 505 050 000 079 + 0;
  • 550 505 505 005 505 555 505 050 000 079 ÷ 2 = 275 252 752 502 752 777 752 525 000 039 + 1;
  • 275 252 752 502 752 777 752 525 000 039 ÷ 2 = 137 626 376 251 376 388 876 262 500 019 + 1;
  • 137 626 376 251 376 388 876 262 500 019 ÷ 2 = 68 813 188 125 688 194 438 131 250 009 + 1;
  • 68 813 188 125 688 194 438 131 250 009 ÷ 2 = 34 406 594 062 844 097 219 065 625 004 + 1;
  • 34 406 594 062 844 097 219 065 625 004 ÷ 2 = 17 203 297 031 422 048 609 532 812 502 + 0;
  • 17 203 297 031 422 048 609 532 812 502 ÷ 2 = 8 601 648 515 711 024 304 766 406 251 + 0;
  • 8 601 648 515 711 024 304 766 406 251 ÷ 2 = 4 300 824 257 855 512 152 383 203 125 + 1;
  • 4 300 824 257 855 512 152 383 203 125 ÷ 2 = 2 150 412 128 927 756 076 191 601 562 + 1;
  • 2 150 412 128 927 756 076 191 601 562 ÷ 2 = 1 075 206 064 463 878 038 095 800 781 + 0;
  • 1 075 206 064 463 878 038 095 800 781 ÷ 2 = 537 603 032 231 939 019 047 900 390 + 1;
  • 537 603 032 231 939 019 047 900 390 ÷ 2 = 268 801 516 115 969 509 523 950 195 + 0;
  • 268 801 516 115 969 509 523 950 195 ÷ 2 = 134 400 758 057 984 754 761 975 097 + 1;
  • 134 400 758 057 984 754 761 975 097 ÷ 2 = 67 200 379 028 992 377 380 987 548 + 1;
  • 67 200 379 028 992 377 380 987 548 ÷ 2 = 33 600 189 514 496 188 690 493 774 + 0;
  • 33 600 189 514 496 188 690 493 774 ÷ 2 = 16 800 094 757 248 094 345 246 887 + 0;
  • 16 800 094 757 248 094 345 246 887 ÷ 2 = 8 400 047 378 624 047 172 623 443 + 1;
  • 8 400 047 378 624 047 172 623 443 ÷ 2 = 4 200 023 689 312 023 586 311 721 + 1;
  • 4 200 023 689 312 023 586 311 721 ÷ 2 = 2 100 011 844 656 011 793 155 860 + 1;
  • 2 100 011 844 656 011 793 155 860 ÷ 2 = 1 050 005 922 328 005 896 577 930 + 0;
  • 1 050 005 922 328 005 896 577 930 ÷ 2 = 525 002 961 164 002 948 288 965 + 0;
  • 525 002 961 164 002 948 288 965 ÷ 2 = 262 501 480 582 001 474 144 482 + 1;
  • 262 501 480 582 001 474 144 482 ÷ 2 = 131 250 740 291 000 737 072 241 + 0;
  • 131 250 740 291 000 737 072 241 ÷ 2 = 65 625 370 145 500 368 536 120 + 1;
  • 65 625 370 145 500 368 536 120 ÷ 2 = 32 812 685 072 750 184 268 060 + 0;
  • 32 812 685 072 750 184 268 060 ÷ 2 = 16 406 342 536 375 092 134 030 + 0;
  • 16 406 342 536 375 092 134 030 ÷ 2 = 8 203 171 268 187 546 067 015 + 0;
  • 8 203 171 268 187 546 067 015 ÷ 2 = 4 101 585 634 093 773 033 507 + 1;
  • 4 101 585 634 093 773 033 507 ÷ 2 = 2 050 792 817 046 886 516 753 + 1;
  • 2 050 792 817 046 886 516 753 ÷ 2 = 1 025 396 408 523 443 258 376 + 1;
  • 1 025 396 408 523 443 258 376 ÷ 2 = 512 698 204 261 721 629 188 + 0;
  • 512 698 204 261 721 629 188 ÷ 2 = 256 349 102 130 860 814 594 + 0;
  • 256 349 102 130 860 814 594 ÷ 2 = 128 174 551 065 430 407 297 + 0;
  • 128 174 551 065 430 407 297 ÷ 2 = 64 087 275 532 715 203 648 + 1;
  • 64 087 275 532 715 203 648 ÷ 2 = 32 043 637 766 357 601 824 + 0;
  • 32 043 637 766 357 601 824 ÷ 2 = 16 021 818 883 178 800 912 + 0;
  • 16 021 818 883 178 800 912 ÷ 2 = 8 010 909 441 589 400 456 + 0;
  • 8 010 909 441 589 400 456 ÷ 2 = 4 005 454 720 794 700 228 + 0;
  • 4 005 454 720 794 700 228 ÷ 2 = 2 002 727 360 397 350 114 + 0;
  • 2 002 727 360 397 350 114 ÷ 2 = 1 001 363 680 198 675 057 + 0;
  • 1 001 363 680 198 675 057 ÷ 2 = 500 681 840 099 337 528 + 1;
  • 500 681 840 099 337 528 ÷ 2 = 250 340 920 049 668 764 + 0;
  • 250 340 920 049 668 764 ÷ 2 = 125 170 460 024 834 382 + 0;
  • 125 170 460 024 834 382 ÷ 2 = 62 585 230 012 417 191 + 0;
  • 62 585 230 012 417 191 ÷ 2 = 31 292 615 006 208 595 + 1;
  • 31 292 615 006 208 595 ÷ 2 = 15 646 307 503 104 297 + 1;
  • 15 646 307 503 104 297 ÷ 2 = 7 823 153 751 552 148 + 1;
  • 7 823 153 751 552 148 ÷ 2 = 3 911 576 875 776 074 + 0;
  • 3 911 576 875 776 074 ÷ 2 = 1 955 788 437 888 037 + 0;
  • 1 955 788 437 888 037 ÷ 2 = 977 894 218 944 018 + 1;
  • 977 894 218 944 018 ÷ 2 = 488 947 109 472 009 + 0;
  • 488 947 109 472 009 ÷ 2 = 244 473 554 736 004 + 1;
  • 244 473 554 736 004 ÷ 2 = 122 236 777 368 002 + 0;
  • 122 236 777 368 002 ÷ 2 = 61 118 388 684 001 + 0;
  • 61 118 388 684 001 ÷ 2 = 30 559 194 342 000 + 1;
  • 30 559 194 342 000 ÷ 2 = 15 279 597 171 000 + 0;
  • 15 279 597 171 000 ÷ 2 = 7 639 798 585 500 + 0;
  • 7 639 798 585 500 ÷ 2 = 3 819 899 292 750 + 0;
  • 3 819 899 292 750 ÷ 2 = 1 909 949 646 375 + 0;
  • 1 909 949 646 375 ÷ 2 = 954 974 823 187 + 1;
  • 954 974 823 187 ÷ 2 = 477 487 411 593 + 1;
  • 477 487 411 593 ÷ 2 = 238 743 705 796 + 1;
  • 238 743 705 796 ÷ 2 = 119 371 852 898 + 0;
  • 119 371 852 898 ÷ 2 = 59 685 926 449 + 0;
  • 59 685 926 449 ÷ 2 = 29 842 963 224 + 1;
  • 29 842 963 224 ÷ 2 = 14 921 481 612 + 0;
  • 14 921 481 612 ÷ 2 = 7 460 740 806 + 0;
  • 7 460 740 806 ÷ 2 = 3 730 370 403 + 0;
  • 3 730 370 403 ÷ 2 = 1 865 185 201 + 1;
  • 1 865 185 201 ÷ 2 = 932 592 600 + 1;
  • 932 592 600 ÷ 2 = 466 296 300 + 0;
  • 466 296 300 ÷ 2 = 233 148 150 + 0;
  • 233 148 150 ÷ 2 = 116 574 075 + 0;
  • 116 574 075 ÷ 2 = 58 287 037 + 1;
  • 58 287 037 ÷ 2 = 29 143 518 + 1;
  • 29 143 518 ÷ 2 = 14 571 759 + 0;
  • 14 571 759 ÷ 2 = 7 285 879 + 1;
  • 7 285 879 ÷ 2 = 3 642 939 + 1;
  • 3 642 939 ÷ 2 = 1 821 469 + 1;
  • 1 821 469 ÷ 2 = 910 734 + 1;
  • 910 734 ÷ 2 = 455 367 + 0;
  • 455 367 ÷ 2 = 227 683 + 1;
  • 227 683 ÷ 2 = 113 841 + 1;
  • 113 841 ÷ 2 = 56 920 + 1;
  • 56 920 ÷ 2 = 28 460 + 0;
  • 28 460 ÷ 2 = 14 230 + 0;
  • 14 230 ÷ 2 = 7 115 + 0;
  • 7 115 ÷ 2 = 3 557 + 1;
  • 3 557 ÷ 2 = 1 778 + 1;
  • 1 778 ÷ 2 = 889 + 0;
  • 889 ÷ 2 = 444 + 1;
  • 444 ÷ 2 = 222 + 0;
  • 222 ÷ 2 = 111 + 0;
  • 111 ÷ 2 = 55 + 1;
  • 55 ÷ 2 = 27 + 1;
  • 27 ÷ 2 = 13 + 1;
  • 13 ÷ 2 = 6 + 1;
  • 6 ÷ 2 = 3 + 0;
  • 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 101 011 010 011 011 111 010 100 000 158(10) =


1101 1110 0101 1000 1110 1111 0110 0011 0001 0011 1000 0100 1010 0111 0001 0000 0010 0011 1000 1010 0111 0011 0101 1001 1110(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 101 011 010 011 011 111 010 100 000 158(10) =


1101 1110 0101 1000 1110 1111 0110 0011 0001 0011 1000 0100 1010 0111 0001 0000 0010 0011 1000 1010 0111 0011 0101 1001 1110(2) =


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


1.1011 1100 1011 0001 1101 1110 1100 0110 0010 0111 0000 1001 0100 1110 0010 0000 0100 0111 0001 0100 1110 0110 1011 0011 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.1011 1100 1011 0001 1101 1110 1100 0110 0010 0111 0000 1001 0100 1110 0010 0000 0100 0111 0001 0100 1110 0110 1011 0011 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. 1011 1100 1011 0001 1101 1110 1100 0110 0010 0111 0000 1001 0100 111 0001 0000 0010 0011 1000 1010 0111 0011 0101 1001 1110 =


1011 1100 1011 0001 1101 1110 1100 0110 0010 0111 0000 1001 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) =
1011 1100 1011 0001 1101 1110 1100 0110 0010 0111 0000 1001 0100


Decimal number 1 101 011 010 011 011 111 010 100 000 158 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 100 0110 0010 - 1011 1100 1011 0001 1101 1110 1100 0110 0010 0111 0000 1001 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