1 001 000 000 000 000 000 000 000 000 295 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 001 000 000 000 000 000 000 000 000 295(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 001 000 000 000 000 000 000 000 000 295(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 001 000 000 000 000 000 000 000 000 295 ÷ 2 = 500 500 000 000 000 000 000 000 000 147 + 1;
  • 500 500 000 000 000 000 000 000 000 147 ÷ 2 = 250 250 000 000 000 000 000 000 000 073 + 1;
  • 250 250 000 000 000 000 000 000 000 073 ÷ 2 = 125 125 000 000 000 000 000 000 000 036 + 1;
  • 125 125 000 000 000 000 000 000 000 036 ÷ 2 = 62 562 500 000 000 000 000 000 000 018 + 0;
  • 62 562 500 000 000 000 000 000 000 018 ÷ 2 = 31 281 250 000 000 000 000 000 000 009 + 0;
  • 31 281 250 000 000 000 000 000 000 009 ÷ 2 = 15 640 625 000 000 000 000 000 000 004 + 1;
  • 15 640 625 000 000 000 000 000 000 004 ÷ 2 = 7 820 312 500 000 000 000 000 000 002 + 0;
  • 7 820 312 500 000 000 000 000 000 002 ÷ 2 = 3 910 156 250 000 000 000 000 000 001 + 0;
  • 3 910 156 250 000 000 000 000 000 001 ÷ 2 = 1 955 078 125 000 000 000 000 000 000 + 1;
  • 1 955 078 125 000 000 000 000 000 000 ÷ 2 = 977 539 062 500 000 000 000 000 000 + 0;
  • 977 539 062 500 000 000 000 000 000 ÷ 2 = 488 769 531 250 000 000 000 000 000 + 0;
  • 488 769 531 250 000 000 000 000 000 ÷ 2 = 244 384 765 625 000 000 000 000 000 + 0;
  • 244 384 765 625 000 000 000 000 000 ÷ 2 = 122 192 382 812 500 000 000 000 000 + 0;
  • 122 192 382 812 500 000 000 000 000 ÷ 2 = 61 096 191 406 250 000 000 000 000 + 0;
  • 61 096 191 406 250 000 000 000 000 ÷ 2 = 30 548 095 703 125 000 000 000 000 + 0;
  • 30 548 095 703 125 000 000 000 000 ÷ 2 = 15 274 047 851 562 500 000 000 000 + 0;
  • 15 274 047 851 562 500 000 000 000 ÷ 2 = 7 637 023 925 781 250 000 000 000 + 0;
  • 7 637 023 925 781 250 000 000 000 ÷ 2 = 3 818 511 962 890 625 000 000 000 + 0;
  • 3 818 511 962 890 625 000 000 000 ÷ 2 = 1 909 255 981 445 312 500 000 000 + 0;
  • 1 909 255 981 445 312 500 000 000 ÷ 2 = 954 627 990 722 656 250 000 000 + 0;
  • 954 627 990 722 656 250 000 000 ÷ 2 = 477 313 995 361 328 125 000 000 + 0;
  • 477 313 995 361 328 125 000 000 ÷ 2 = 238 656 997 680 664 062 500 000 + 0;
  • 238 656 997 680 664 062 500 000 ÷ 2 = 119 328 498 840 332 031 250 000 + 0;
  • 119 328 498 840 332 031 250 000 ÷ 2 = 59 664 249 420 166 015 625 000 + 0;
  • 59 664 249 420 166 015 625 000 ÷ 2 = 29 832 124 710 083 007 812 500 + 0;
  • 29 832 124 710 083 007 812 500 ÷ 2 = 14 916 062 355 041 503 906 250 + 0;
  • 14 916 062 355 041 503 906 250 ÷ 2 = 7 458 031 177 520 751 953 125 + 0;
  • 7 458 031 177 520 751 953 125 ÷ 2 = 3 729 015 588 760 375 976 562 + 1;
  • 3 729 015 588 760 375 976 562 ÷ 2 = 1 864 507 794 380 187 988 281 + 0;
  • 1 864 507 794 380 187 988 281 ÷ 2 = 932 253 897 190 093 994 140 + 1;
  • 932 253 897 190 093 994 140 ÷ 2 = 466 126 948 595 046 997 070 + 0;
  • 466 126 948 595 046 997 070 ÷ 2 = 233 063 474 297 523 498 535 + 0;
  • 233 063 474 297 523 498 535 ÷ 2 = 116 531 737 148 761 749 267 + 1;
  • 116 531 737 148 761 749 267 ÷ 2 = 58 265 868 574 380 874 633 + 1;
  • 58 265 868 574 380 874 633 ÷ 2 = 29 132 934 287 190 437 316 + 1;
  • 29 132 934 287 190 437 316 ÷ 2 = 14 566 467 143 595 218 658 + 0;
  • 14 566 467 143 595 218 658 ÷ 2 = 7 283 233 571 797 609 329 + 0;
  • 7 283 233 571 797 609 329 ÷ 2 = 3 641 616 785 898 804 664 + 1;
  • 3 641 616 785 898 804 664 ÷ 2 = 1 820 808 392 949 402 332 + 0;
  • 1 820 808 392 949 402 332 ÷ 2 = 910 404 196 474 701 166 + 0;
  • 910 404 196 474 701 166 ÷ 2 = 455 202 098 237 350 583 + 0;
  • 455 202 098 237 350 583 ÷ 2 = 227 601 049 118 675 291 + 1;
  • 227 601 049 118 675 291 ÷ 2 = 113 800 524 559 337 645 + 1;
  • 113 800 524 559 337 645 ÷ 2 = 56 900 262 279 668 822 + 1;
  • 56 900 262 279 668 822 ÷ 2 = 28 450 131 139 834 411 + 0;
  • 28 450 131 139 834 411 ÷ 2 = 14 225 065 569 917 205 + 1;
  • 14 225 065 569 917 205 ÷ 2 = 7 112 532 784 958 602 + 1;
  • 7 112 532 784 958 602 ÷ 2 = 3 556 266 392 479 301 + 0;
  • 3 556 266 392 479 301 ÷ 2 = 1 778 133 196 239 650 + 1;
  • 1 778 133 196 239 650 ÷ 2 = 889 066 598 119 825 + 0;
  • 889 066 598 119 825 ÷ 2 = 444 533 299 059 912 + 1;
  • 444 533 299 059 912 ÷ 2 = 222 266 649 529 956 + 0;
  • 222 266 649 529 956 ÷ 2 = 111 133 324 764 978 + 0;
  • 111 133 324 764 978 ÷ 2 = 55 566 662 382 489 + 0;
  • 55 566 662 382 489 ÷ 2 = 27 783 331 191 244 + 1;
  • 27 783 331 191 244 ÷ 2 = 13 891 665 595 622 + 0;
  • 13 891 665 595 622 ÷ 2 = 6 945 832 797 811 + 0;
  • 6 945 832 797 811 ÷ 2 = 3 472 916 398 905 + 1;
  • 3 472 916 398 905 ÷ 2 = 1 736 458 199 452 + 1;
  • 1 736 458 199 452 ÷ 2 = 868 229 099 726 + 0;
  • 868 229 099 726 ÷ 2 = 434 114 549 863 + 0;
  • 434 114 549 863 ÷ 2 = 217 057 274 931 + 1;
  • 217 057 274 931 ÷ 2 = 108 528 637 465 + 1;
  • 108 528 637 465 ÷ 2 = 54 264 318 732 + 1;
  • 54 264 318 732 ÷ 2 = 27 132 159 366 + 0;
  • 27 132 159 366 ÷ 2 = 13 566 079 683 + 0;
  • 13 566 079 683 ÷ 2 = 6 783 039 841 + 1;
  • 6 783 039 841 ÷ 2 = 3 391 519 920 + 1;
  • 3 391 519 920 ÷ 2 = 1 695 759 960 + 0;
  • 1 695 759 960 ÷ 2 = 847 879 980 + 0;
  • 847 879 980 ÷ 2 = 423 939 990 + 0;
  • 423 939 990 ÷ 2 = 211 969 995 + 0;
  • 211 969 995 ÷ 2 = 105 984 997 + 1;
  • 105 984 997 ÷ 2 = 52 992 498 + 1;
  • 52 992 498 ÷ 2 = 26 496 249 + 0;
  • 26 496 249 ÷ 2 = 13 248 124 + 1;
  • 13 248 124 ÷ 2 = 6 624 062 + 0;
  • 6 624 062 ÷ 2 = 3 312 031 + 0;
  • 3 312 031 ÷ 2 = 1 656 015 + 1;
  • 1 656 015 ÷ 2 = 828 007 + 1;
  • 828 007 ÷ 2 = 414 003 + 1;
  • 414 003 ÷ 2 = 207 001 + 1;
  • 207 001 ÷ 2 = 103 500 + 1;
  • 103 500 ÷ 2 = 51 750 + 0;
  • 51 750 ÷ 2 = 25 875 + 0;
  • 25 875 ÷ 2 = 12 937 + 1;
  • 12 937 ÷ 2 = 6 468 + 1;
  • 6 468 ÷ 2 = 3 234 + 0;
  • 3 234 ÷ 2 = 1 617 + 0;
  • 1 617 ÷ 2 = 808 + 1;
  • 808 ÷ 2 = 404 + 0;
  • 404 ÷ 2 = 202 + 0;
  • 202 ÷ 2 = 101 + 0;
  • 101 ÷ 2 = 50 + 1;
  • 50 ÷ 2 = 25 + 0;
  • 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 001 000 000 000 000 000 000 000 000 295(10) =


1100 1010 0010 0110 0111 1100 1011 0000 1100 1110 0110 0100 0101 0110 1110 0010 0111 0010 1000 0000 0000 0000 0001 0010 0111(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 001 000 000 000 000 000 000 000 000 295(10) =


1100 1010 0010 0110 0111 1100 1011 0000 1100 1110 0110 0100 0101 0110 1110 0010 0111 0010 1000 0000 0000 0000 0001 0010 0111(2) =


1100 1010 0010 0110 0111 1100 1011 0000 1100 1110 0110 0100 0101 0110 1110 0010 0111 0010 1000 0000 0000 0000 0001 0010 0111(2) × 20 =


1.1001 0100 0100 1100 1111 1001 0110 0001 1001 1100 1100 1000 1010 1101 1100 0100 1110 0101 0000 0000 0000 0000 0010 0100 111(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 0100 0100 1100 1111 1001 0110 0001 1001 1100 1100 1000 1010 1101 1100 0100 1110 0101 0000 0000 0000 0000 0010 0100 111


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 1010 0010 0110 0111 1100 1011 0000 1100 1110 0110 0100 0101 0110 1110 0010 0111 0010 1000 0000 0000 0000 0001 0010 0111 =


100 1010 0010 0110 0111 1100


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 1010 0010 0110 0111 1100


Decimal number 1 001 000 000 000 000 000 000 000 000 295 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0010 - 100 1010 0010 0110 0111 1100


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