1 011 100 101 000 000 000 000 000 000 118 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 011 100 101 000 000 000 000 000 000 118(10) to 32 bit single precision IEEE 754 binary floating point representation standard (1 bit for sign, 8 bits for exponent, 23 bits for mantissa)

What are the steps to convert decimal number
1 011 100 101 000 000 000 000 000 000 118(10) to 32 bit single precision IEEE 754 binary floating point representation (1 bit for sign, 8 bits for exponent, 23 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 011 100 101 000 000 000 000 000 000 118 ÷ 2 = 505 550 050 500 000 000 000 000 000 059 + 0;
  • 505 550 050 500 000 000 000 000 000 059 ÷ 2 = 252 775 025 250 000 000 000 000 000 029 + 1;
  • 252 775 025 250 000 000 000 000 000 029 ÷ 2 = 126 387 512 625 000 000 000 000 000 014 + 1;
  • 126 387 512 625 000 000 000 000 000 014 ÷ 2 = 63 193 756 312 500 000 000 000 000 007 + 0;
  • 63 193 756 312 500 000 000 000 000 007 ÷ 2 = 31 596 878 156 250 000 000 000 000 003 + 1;
  • 31 596 878 156 250 000 000 000 000 003 ÷ 2 = 15 798 439 078 125 000 000 000 000 001 + 1;
  • 15 798 439 078 125 000 000 000 000 001 ÷ 2 = 7 899 219 539 062 500 000 000 000 000 + 1;
  • 7 899 219 539 062 500 000 000 000 000 ÷ 2 = 3 949 609 769 531 250 000 000 000 000 + 0;
  • 3 949 609 769 531 250 000 000 000 000 ÷ 2 = 1 974 804 884 765 625 000 000 000 000 + 0;
  • 1 974 804 884 765 625 000 000 000 000 ÷ 2 = 987 402 442 382 812 500 000 000 000 + 0;
  • 987 402 442 382 812 500 000 000 000 ÷ 2 = 493 701 221 191 406 250 000 000 000 + 0;
  • 493 701 221 191 406 250 000 000 000 ÷ 2 = 246 850 610 595 703 125 000 000 000 + 0;
  • 246 850 610 595 703 125 000 000 000 ÷ 2 = 123 425 305 297 851 562 500 000 000 + 0;
  • 123 425 305 297 851 562 500 000 000 ÷ 2 = 61 712 652 648 925 781 250 000 000 + 0;
  • 61 712 652 648 925 781 250 000 000 ÷ 2 = 30 856 326 324 462 890 625 000 000 + 0;
  • 30 856 326 324 462 890 625 000 000 ÷ 2 = 15 428 163 162 231 445 312 500 000 + 0;
  • 15 428 163 162 231 445 312 500 000 ÷ 2 = 7 714 081 581 115 722 656 250 000 + 0;
  • 7 714 081 581 115 722 656 250 000 ÷ 2 = 3 857 040 790 557 861 328 125 000 + 0;
  • 3 857 040 790 557 861 328 125 000 ÷ 2 = 1 928 520 395 278 930 664 062 500 + 0;
  • 1 928 520 395 278 930 664 062 500 ÷ 2 = 964 260 197 639 465 332 031 250 + 0;
  • 964 260 197 639 465 332 031 250 ÷ 2 = 482 130 098 819 732 666 015 625 + 0;
  • 482 130 098 819 732 666 015 625 ÷ 2 = 241 065 049 409 866 333 007 812 + 1;
  • 241 065 049 409 866 333 007 812 ÷ 2 = 120 532 524 704 933 166 503 906 + 0;
  • 120 532 524 704 933 166 503 906 ÷ 2 = 60 266 262 352 466 583 251 953 + 0;
  • 60 266 262 352 466 583 251 953 ÷ 2 = 30 133 131 176 233 291 625 976 + 1;
  • 30 133 131 176 233 291 625 976 ÷ 2 = 15 066 565 588 116 645 812 988 + 0;
  • 15 066 565 588 116 645 812 988 ÷ 2 = 7 533 282 794 058 322 906 494 + 0;
  • 7 533 282 794 058 322 906 494 ÷ 2 = 3 766 641 397 029 161 453 247 + 0;
  • 3 766 641 397 029 161 453 247 ÷ 2 = 1 883 320 698 514 580 726 623 + 1;
  • 1 883 320 698 514 580 726 623 ÷ 2 = 941 660 349 257 290 363 311 + 1;
  • 941 660 349 257 290 363 311 ÷ 2 = 470 830 174 628 645 181 655 + 1;
  • 470 830 174 628 645 181 655 ÷ 2 = 235 415 087 314 322 590 827 + 1;
  • 235 415 087 314 322 590 827 ÷ 2 = 117 707 543 657 161 295 413 + 1;
  • 117 707 543 657 161 295 413 ÷ 2 = 58 853 771 828 580 647 706 + 1;
  • 58 853 771 828 580 647 706 ÷ 2 = 29 426 885 914 290 323 853 + 0;
  • 29 426 885 914 290 323 853 ÷ 2 = 14 713 442 957 145 161 926 + 1;
  • 14 713 442 957 145 161 926 ÷ 2 = 7 356 721 478 572 580 963 + 0;
  • 7 356 721 478 572 580 963 ÷ 2 = 3 678 360 739 286 290 481 + 1;
  • 3 678 360 739 286 290 481 ÷ 2 = 1 839 180 369 643 145 240 + 1;
  • 1 839 180 369 643 145 240 ÷ 2 = 919 590 184 821 572 620 + 0;
  • 919 590 184 821 572 620 ÷ 2 = 459 795 092 410 786 310 + 0;
  • 459 795 092 410 786 310 ÷ 2 = 229 897 546 205 393 155 + 0;
  • 229 897 546 205 393 155 ÷ 2 = 114 948 773 102 696 577 + 1;
  • 114 948 773 102 696 577 ÷ 2 = 57 474 386 551 348 288 + 1;
  • 57 474 386 551 348 288 ÷ 2 = 28 737 193 275 674 144 + 0;
  • 28 737 193 275 674 144 ÷ 2 = 14 368 596 637 837 072 + 0;
  • 14 368 596 637 837 072 ÷ 2 = 7 184 298 318 918 536 + 0;
  • 7 184 298 318 918 536 ÷ 2 = 3 592 149 159 459 268 + 0;
  • 3 592 149 159 459 268 ÷ 2 = 1 796 074 579 729 634 + 0;
  • 1 796 074 579 729 634 ÷ 2 = 898 037 289 864 817 + 0;
  • 898 037 289 864 817 ÷ 2 = 449 018 644 932 408 + 1;
  • 449 018 644 932 408 ÷ 2 = 224 509 322 466 204 + 0;
  • 224 509 322 466 204 ÷ 2 = 112 254 661 233 102 + 0;
  • 112 254 661 233 102 ÷ 2 = 56 127 330 616 551 + 0;
  • 56 127 330 616 551 ÷ 2 = 28 063 665 308 275 + 1;
  • 28 063 665 308 275 ÷ 2 = 14 031 832 654 137 + 1;
  • 14 031 832 654 137 ÷ 2 = 7 015 916 327 068 + 1;
  • 7 015 916 327 068 ÷ 2 = 3 507 958 163 534 + 0;
  • 3 507 958 163 534 ÷ 2 = 1 753 979 081 767 + 0;
  • 1 753 979 081 767 ÷ 2 = 876 989 540 883 + 1;
  • 876 989 540 883 ÷ 2 = 438 494 770 441 + 1;
  • 438 494 770 441 ÷ 2 = 219 247 385 220 + 1;
  • 219 247 385 220 ÷ 2 = 109 623 692 610 + 0;
  • 109 623 692 610 ÷ 2 = 54 811 846 305 + 0;
  • 54 811 846 305 ÷ 2 = 27 405 923 152 + 1;
  • 27 405 923 152 ÷ 2 = 13 702 961 576 + 0;
  • 13 702 961 576 ÷ 2 = 6 851 480 788 + 0;
  • 6 851 480 788 ÷ 2 = 3 425 740 394 + 0;
  • 3 425 740 394 ÷ 2 = 1 712 870 197 + 0;
  • 1 712 870 197 ÷ 2 = 856 435 098 + 1;
  • 856 435 098 ÷ 2 = 428 217 549 + 0;
  • 428 217 549 ÷ 2 = 214 108 774 + 1;
  • 214 108 774 ÷ 2 = 107 054 387 + 0;
  • 107 054 387 ÷ 2 = 53 527 193 + 1;
  • 53 527 193 ÷ 2 = 26 763 596 + 1;
  • 26 763 596 ÷ 2 = 13 381 798 + 0;
  • 13 381 798 ÷ 2 = 6 690 899 + 0;
  • 6 690 899 ÷ 2 = 3 345 449 + 1;
  • 3 345 449 ÷ 2 = 1 672 724 + 1;
  • 1 672 724 ÷ 2 = 836 362 + 0;
  • 836 362 ÷ 2 = 418 181 + 0;
  • 418 181 ÷ 2 = 209 090 + 1;
  • 209 090 ÷ 2 = 104 545 + 0;
  • 104 545 ÷ 2 = 52 272 + 1;
  • 52 272 ÷ 2 = 26 136 + 0;
  • 26 136 ÷ 2 = 13 068 + 0;
  • 13 068 ÷ 2 = 6 534 + 0;
  • 6 534 ÷ 2 = 3 267 + 0;
  • 3 267 ÷ 2 = 1 633 + 1;
  • 1 633 ÷ 2 = 816 + 1;
  • 816 ÷ 2 = 408 + 0;
  • 408 ÷ 2 = 204 + 0;
  • 204 ÷ 2 = 102 + 0;
  • 102 ÷ 2 = 51 + 0;
  • 51 ÷ 2 = 25 + 1;
  • 25 ÷ 2 = 12 + 1;
  • 12 ÷ 2 = 6 + 0;
  • 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 011 100 101 000 000 000 000 000 000 118(10) =


1100 1100 0011 0000 1010 0110 0110 1010 0001 0011 1001 1100 0100 0000 1100 0110 1011 1111 0001 0010 0000 0000 0000 0111 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 011 100 101 000 000 000 000 000 000 118(10) =


1100 1100 0011 0000 1010 0110 0110 1010 0001 0011 1001 1100 0100 0000 1100 0110 1011 1111 0001 0010 0000 0000 0000 0111 0110(2) =


1100 1100 0011 0000 1010 0110 0110 1010 0001 0011 1001 1100 0100 0000 1100 0110 1011 1111 0001 0010 0000 0000 0000 0111 0110(2) × 20 =


1.1001 1000 0110 0001 0100 1100 1101 0100 0010 0111 0011 1000 1000 0001 1000 1101 0111 1110 0010 0100 0000 0000 0000 1110 110(2) × 299


4. Up to this moment, there are the following elements that would feed into the 32 bit single precision IEEE 754 binary floating point representation:

Sign 0 (a positive number)


Exponent (unadjusted): 99


Mantissa (not normalized):
1.1001 1000 0110 0001 0100 1100 1101 0100 0010 0111 0011 1000 1000 0001 1000 1101 0111 1110 0010 0100 0000 0000 0000 1110 110


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


99 + 2(8-1) - 1 =


(99 + 127)(10) =


226(10)


6. Convert the adjusted exponent from the decimal (base 10) to 8 bit binary.

Use the same technique of repeatedly dividing by 2:


  • division = quotient + remainder;
  • 226 ÷ 2 = 113 + 0;
  • 113 ÷ 2 = 56 + 1;
  • 56 ÷ 2 = 28 + 0;
  • 28 ÷ 2 = 14 + 0;
  • 14 ÷ 2 = 7 + 0;
  • 7 ÷ 2 = 3 + 1;
  • 3 ÷ 2 = 1 + 1;
  • 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) =


226(10) =


1110 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 23 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. 100 1100 0011 0000 1010 0110 0110 1010 0001 0011 1001 1100 0100 0000 1100 0110 1011 1111 0001 0010 0000 0000 0000 0111 0110 =


100 1100 0011 0000 1010 0110


9. The three elements that make up the number's 32 bit single precision IEEE 754 binary floating point representation:

Sign (1 bit) =
0 (a positive number)


Exponent (8 bits) =
1110 0010


Mantissa (23 bits) =
100 1100 0011 0000 1010 0110


Decimal number 1 011 100 101 000 000 000 000 000 000 118 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0010 - 100 1100 0011 0000 1010 0110


How to convert decimal numbers from base ten to 32 bit single precision IEEE 754 binary floating point standard

Follow the steps below to convert a base 10 decimal number to 32 bit single 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 base ten 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 of the previous dividing 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 previous multiplying operations, starting from the top of the constructed list 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, by shifting the decimal point (or if you prefer, the decimal mark) "n" positions either to the left or to the right, so that only one non zero digit remains to the left of the decimal point.
  • 7. Adjust the exponent in 8 bit excess/bias notation and then convert it from decimal (base 10) to 8 bit binary, by using the same technique of repeatedly dividing by 2, as shown above:
    Exponent (adjusted) = Exponent (unadjusted) + 2(8-1) - 1
  • 8. Normalize mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal sign if the case) and adjust its length to 23 bits, either by removing the excess bits from the right (losing precision...) or by adding extra '0' bits 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 -25.347 from decimal system (base ten) to 32 bit single precision IEEE 754 binary floating point:

  • 1. Start with the positive version of the number:

    |-25.347| = 25.347

  • 2. First convert the integer part, 25. Divide it repeatedly by 2, keeping track of each remainder, until we get a quotient that is equal to zero:
    • division = quotient + remainder;
    • 25 ÷ 2 = 12 + 1;
    • 12 ÷ 2 = 6 + 0;
    • 6 ÷ 2 = 3 + 0;
    • 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:

    25(10) = 1 1001(2)

  • 4. Then convert the fractional part, 0.347. 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.347 × 2 = 0 + 0.694;
    • 2) 0.694 × 2 = 1 + 0.388;
    • 3) 0.388 × 2 = 0 + 0.776;
    • 4) 0.776 × 2 = 1 + 0.552;
    • 5) 0.552 × 2 = 1 + 0.104;
    • 6) 0.104 × 2 = 0 + 0.208;
    • 7) 0.208 × 2 = 0 + 0.416;
    • 8) 0.416 × 2 = 0 + 0.832;
    • 9) 0.832 × 2 = 1 + 0.664;
    • 10) 0.664 × 2 = 1 + 0.328;
    • 11) 0.328 × 2 = 0 + 0.656;
    • 12) 0.656 × 2 = 1 + 0.312;
    • 13) 0.312 × 2 = 0 + 0.624;
    • 14) 0.624 × 2 = 1 + 0.248;
    • 15) 0.248 × 2 = 0 + 0.496;
    • 16) 0.496 × 2 = 0 + 0.992;
    • 17) 0.992 × 2 = 1 + 0.984;
    • 18) 0.984 × 2 = 1 + 0.968;
    • 19) 0.968 × 2 = 1 + 0.936;
    • 20) 0.936 × 2 = 1 + 0.872;
    • 21) 0.872 × 2 = 1 + 0.744;
    • 22) 0.744 × 2 = 1 + 0.488;
    • 23) 0.488 × 2 = 0 + 0.976;
    • 24) 0.976 × 2 = 1 + 0.952;
    • We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit = 23) 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.347(10) = 0.0101 1000 1101 0100 1111 1101(2)

  • 6. Summarizing - the positive number before normalization:

    25.347(10) = 1 1001.0101 1000 1101 0100 1111 1101(2)

  • 7. Normalize the binary representation of the number, shifting the decimal point 4 positions to the left so that only one non-zero digit stays to the left of the decimal point:

    25.347(10) =
    1 1001.0101 1000 1101 0100 1111 1101(2) =
    1 1001.0101 1000 1101 0100 1111 1101(2) × 20 =
    1.1001 0101 1000 1101 0100 1111 1101(2) × 24

  • 8. Up to this moment, there are the following elements that would feed into the 32 bit single precision IEEE 754 binary floating point:

    Sign: 1 (a negative number)

    Exponent (unadjusted): 4

    Mantissa (not-normalized): 1.1001 0101 1000 1101 0100 1111 1101

  • 9. Adjust the exponent in 8 bit excess/bias notation and then convert it from decimal (base 10) to 8 bit binary (base 2), by using the same technique of repeatedly dividing it by 2, as already demonstrated above:

    Exponent (adjusted) = Exponent (unadjusted) + 2(8-1) - 1 = (4 + 127)(10) = 131(10) =
    1000 0011(2)

  • 10. Normalize the mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal point) and adjust its length to 23 bits, by removing the excess bits from the right (losing precision...):

    Mantissa (not-normalized): 1.1001 0101 1000 1101 0100 1111 1101

    Mantissa (normalized): 100 1010 1100 0110 1010 0111

  • Conclusion:

    Sign (1 bit) = 1 (a negative number)

    Exponent (8 bits) = 1000 0011

    Mantissa (23 bits) = 100 1010 1100 0110 1010 0111

  • Number -25.347, converted from the decimal system (base 10) to 32 bit single precision IEEE 754 binary floating point =
    1 - 1000 0011 - 100 1010 1100 0110 1010 0111