1 100 001 010 111 010 000 000 000 000 221 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 100 001 010 111 010 000 000 000 000 221(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 100 001 010 111 010 000 000 000 000 221(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 100 001 010 111 010 000 000 000 000 221 ÷ 2 = 550 000 505 055 505 000 000 000 000 110 + 1;
  • 550 000 505 055 505 000 000 000 000 110 ÷ 2 = 275 000 252 527 752 500 000 000 000 055 + 0;
  • 275 000 252 527 752 500 000 000 000 055 ÷ 2 = 137 500 126 263 876 250 000 000 000 027 + 1;
  • 137 500 126 263 876 250 000 000 000 027 ÷ 2 = 68 750 063 131 938 125 000 000 000 013 + 1;
  • 68 750 063 131 938 125 000 000 000 013 ÷ 2 = 34 375 031 565 969 062 500 000 000 006 + 1;
  • 34 375 031 565 969 062 500 000 000 006 ÷ 2 = 17 187 515 782 984 531 250 000 000 003 + 0;
  • 17 187 515 782 984 531 250 000 000 003 ÷ 2 = 8 593 757 891 492 265 625 000 000 001 + 1;
  • 8 593 757 891 492 265 625 000 000 001 ÷ 2 = 4 296 878 945 746 132 812 500 000 000 + 1;
  • 4 296 878 945 746 132 812 500 000 000 ÷ 2 = 2 148 439 472 873 066 406 250 000 000 + 0;
  • 2 148 439 472 873 066 406 250 000 000 ÷ 2 = 1 074 219 736 436 533 203 125 000 000 + 0;
  • 1 074 219 736 436 533 203 125 000 000 ÷ 2 = 537 109 868 218 266 601 562 500 000 + 0;
  • 537 109 868 218 266 601 562 500 000 ÷ 2 = 268 554 934 109 133 300 781 250 000 + 0;
  • 268 554 934 109 133 300 781 250 000 ÷ 2 = 134 277 467 054 566 650 390 625 000 + 0;
  • 134 277 467 054 566 650 390 625 000 ÷ 2 = 67 138 733 527 283 325 195 312 500 + 0;
  • 67 138 733 527 283 325 195 312 500 ÷ 2 = 33 569 366 763 641 662 597 656 250 + 0;
  • 33 569 366 763 641 662 597 656 250 ÷ 2 = 16 784 683 381 820 831 298 828 125 + 0;
  • 16 784 683 381 820 831 298 828 125 ÷ 2 = 8 392 341 690 910 415 649 414 062 + 1;
  • 8 392 341 690 910 415 649 414 062 ÷ 2 = 4 196 170 845 455 207 824 707 031 + 0;
  • 4 196 170 845 455 207 824 707 031 ÷ 2 = 2 098 085 422 727 603 912 353 515 + 1;
  • 2 098 085 422 727 603 912 353 515 ÷ 2 = 1 049 042 711 363 801 956 176 757 + 1;
  • 1 049 042 711 363 801 956 176 757 ÷ 2 = 524 521 355 681 900 978 088 378 + 1;
  • 524 521 355 681 900 978 088 378 ÷ 2 = 262 260 677 840 950 489 044 189 + 0;
  • 262 260 677 840 950 489 044 189 ÷ 2 = 131 130 338 920 475 244 522 094 + 1;
  • 131 130 338 920 475 244 522 094 ÷ 2 = 65 565 169 460 237 622 261 047 + 0;
  • 65 565 169 460 237 622 261 047 ÷ 2 = 32 782 584 730 118 811 130 523 + 1;
  • 32 782 584 730 118 811 130 523 ÷ 2 = 16 391 292 365 059 405 565 261 + 1;
  • 16 391 292 365 059 405 565 261 ÷ 2 = 8 195 646 182 529 702 782 630 + 1;
  • 8 195 646 182 529 702 782 630 ÷ 2 = 4 097 823 091 264 851 391 315 + 0;
  • 4 097 823 091 264 851 391 315 ÷ 2 = 2 048 911 545 632 425 695 657 + 1;
  • 2 048 911 545 632 425 695 657 ÷ 2 = 1 024 455 772 816 212 847 828 + 1;
  • 1 024 455 772 816 212 847 828 ÷ 2 = 512 227 886 408 106 423 914 + 0;
  • 512 227 886 408 106 423 914 ÷ 2 = 256 113 943 204 053 211 957 + 0;
  • 256 113 943 204 053 211 957 ÷ 2 = 128 056 971 602 026 605 978 + 1;
  • 128 056 971 602 026 605 978 ÷ 2 = 64 028 485 801 013 302 989 + 0;
  • 64 028 485 801 013 302 989 ÷ 2 = 32 014 242 900 506 651 494 + 1;
  • 32 014 242 900 506 651 494 ÷ 2 = 16 007 121 450 253 325 747 + 0;
  • 16 007 121 450 253 325 747 ÷ 2 = 8 003 560 725 126 662 873 + 1;
  • 8 003 560 725 126 662 873 ÷ 2 = 4 001 780 362 563 331 436 + 1;
  • 4 001 780 362 563 331 436 ÷ 2 = 2 000 890 181 281 665 718 + 0;
  • 2 000 890 181 281 665 718 ÷ 2 = 1 000 445 090 640 832 859 + 0;
  • 1 000 445 090 640 832 859 ÷ 2 = 500 222 545 320 416 429 + 1;
  • 500 222 545 320 416 429 ÷ 2 = 250 111 272 660 208 214 + 1;
  • 250 111 272 660 208 214 ÷ 2 = 125 055 636 330 104 107 + 0;
  • 125 055 636 330 104 107 ÷ 2 = 62 527 818 165 052 053 + 1;
  • 62 527 818 165 052 053 ÷ 2 = 31 263 909 082 526 026 + 1;
  • 31 263 909 082 526 026 ÷ 2 = 15 631 954 541 263 013 + 0;
  • 15 631 954 541 263 013 ÷ 2 = 7 815 977 270 631 506 + 1;
  • 7 815 977 270 631 506 ÷ 2 = 3 907 988 635 315 753 + 0;
  • 3 907 988 635 315 753 ÷ 2 = 1 953 994 317 657 876 + 1;
  • 1 953 994 317 657 876 ÷ 2 = 976 997 158 828 938 + 0;
  • 976 997 158 828 938 ÷ 2 = 488 498 579 414 469 + 0;
  • 488 498 579 414 469 ÷ 2 = 244 249 289 707 234 + 1;
  • 244 249 289 707 234 ÷ 2 = 122 124 644 853 617 + 0;
  • 122 124 644 853 617 ÷ 2 = 61 062 322 426 808 + 1;
  • 61 062 322 426 808 ÷ 2 = 30 531 161 213 404 + 0;
  • 30 531 161 213 404 ÷ 2 = 15 265 580 606 702 + 0;
  • 15 265 580 606 702 ÷ 2 = 7 632 790 303 351 + 0;
  • 7 632 790 303 351 ÷ 2 = 3 816 395 151 675 + 1;
  • 3 816 395 151 675 ÷ 2 = 1 908 197 575 837 + 1;
  • 1 908 197 575 837 ÷ 2 = 954 098 787 918 + 1;
  • 954 098 787 918 ÷ 2 = 477 049 393 959 + 0;
  • 477 049 393 959 ÷ 2 = 238 524 696 979 + 1;
  • 238 524 696 979 ÷ 2 = 119 262 348 489 + 1;
  • 119 262 348 489 ÷ 2 = 59 631 174 244 + 1;
  • 59 631 174 244 ÷ 2 = 29 815 587 122 + 0;
  • 29 815 587 122 ÷ 2 = 14 907 793 561 + 0;
  • 14 907 793 561 ÷ 2 = 7 453 896 780 + 1;
  • 7 453 896 780 ÷ 2 = 3 726 948 390 + 0;
  • 3 726 948 390 ÷ 2 = 1 863 474 195 + 0;
  • 1 863 474 195 ÷ 2 = 931 737 097 + 1;
  • 931 737 097 ÷ 2 = 465 868 548 + 1;
  • 465 868 548 ÷ 2 = 232 934 274 + 0;
  • 232 934 274 ÷ 2 = 116 467 137 + 0;
  • 116 467 137 ÷ 2 = 58 233 568 + 1;
  • 58 233 568 ÷ 2 = 29 116 784 + 0;
  • 29 116 784 ÷ 2 = 14 558 392 + 0;
  • 14 558 392 ÷ 2 = 7 279 196 + 0;
  • 7 279 196 ÷ 2 = 3 639 598 + 0;
  • 3 639 598 ÷ 2 = 1 819 799 + 0;
  • 1 819 799 ÷ 2 = 909 899 + 1;
  • 909 899 ÷ 2 = 454 949 + 1;
  • 454 949 ÷ 2 = 227 474 + 1;
  • 227 474 ÷ 2 = 113 737 + 0;
  • 113 737 ÷ 2 = 56 868 + 1;
  • 56 868 ÷ 2 = 28 434 + 0;
  • 28 434 ÷ 2 = 14 217 + 0;
  • 14 217 ÷ 2 = 7 108 + 1;
  • 7 108 ÷ 2 = 3 554 + 0;
  • 3 554 ÷ 2 = 1 777 + 0;
  • 1 777 ÷ 2 = 888 + 1;
  • 888 ÷ 2 = 444 + 0;
  • 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 100 001 010 111 010 000 000 000 000 221(10) =


1101 1110 0010 0100 1011 1000 0010 0110 0100 1110 1110 0010 1001 0101 1011 0011 0101 0011 0111 0101 1101 0000 0000 1101 1101(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 100 001 010 111 010 000 000 000 000 221(10) =


1101 1110 0010 0100 1011 1000 0010 0110 0100 1110 1110 0010 1001 0101 1011 0011 0101 0011 0111 0101 1101 0000 0000 1101 1101(2) =


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


1.1011 1100 0100 1001 0111 0000 0100 1100 1001 1101 1100 0101 0010 1011 0110 0110 1010 0110 1110 1011 1010 0000 0001 1011 101(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.1011 1100 0100 1001 0111 0000 0100 1100 1001 1101 1100 0101 0010 1011 0110 0110 1010 0110 1110 1011 1010 0000 0001 1011 101


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. 101 1110 0010 0100 1011 1000 0010 0110 0100 1110 1110 0010 1001 0101 1011 0011 0101 0011 0111 0101 1101 0000 0000 1101 1101 =


101 1110 0010 0100 1011 1000


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) =
101 1110 0010 0100 1011 1000


Decimal number 1 100 001 010 111 010 000 000 000 000 221 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0010 - 101 1110 0010 0100 1011 1000


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