10 001 111 001 101 111 000 000 000 000 268 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 10 001 111 001 101 111 000 000 000 000 268(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
10 001 111 001 101 111 000 000 000 000 268(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;
  • 10 001 111 001 101 111 000 000 000 000 268 ÷ 2 = 5 000 555 500 550 555 500 000 000 000 134 + 0;
  • 5 000 555 500 550 555 500 000 000 000 134 ÷ 2 = 2 500 277 750 275 277 750 000 000 000 067 + 0;
  • 2 500 277 750 275 277 750 000 000 000 067 ÷ 2 = 1 250 138 875 137 638 875 000 000 000 033 + 1;
  • 1 250 138 875 137 638 875 000 000 000 033 ÷ 2 = 625 069 437 568 819 437 500 000 000 016 + 1;
  • 625 069 437 568 819 437 500 000 000 016 ÷ 2 = 312 534 718 784 409 718 750 000 000 008 + 0;
  • 312 534 718 784 409 718 750 000 000 008 ÷ 2 = 156 267 359 392 204 859 375 000 000 004 + 0;
  • 156 267 359 392 204 859 375 000 000 004 ÷ 2 = 78 133 679 696 102 429 687 500 000 002 + 0;
  • 78 133 679 696 102 429 687 500 000 002 ÷ 2 = 39 066 839 848 051 214 843 750 000 001 + 0;
  • 39 066 839 848 051 214 843 750 000 001 ÷ 2 = 19 533 419 924 025 607 421 875 000 000 + 1;
  • 19 533 419 924 025 607 421 875 000 000 ÷ 2 = 9 766 709 962 012 803 710 937 500 000 + 0;
  • 9 766 709 962 012 803 710 937 500 000 ÷ 2 = 4 883 354 981 006 401 855 468 750 000 + 0;
  • 4 883 354 981 006 401 855 468 750 000 ÷ 2 = 2 441 677 490 503 200 927 734 375 000 + 0;
  • 2 441 677 490 503 200 927 734 375 000 ÷ 2 = 1 220 838 745 251 600 463 867 187 500 + 0;
  • 1 220 838 745 251 600 463 867 187 500 ÷ 2 = 610 419 372 625 800 231 933 593 750 + 0;
  • 610 419 372 625 800 231 933 593 750 ÷ 2 = 305 209 686 312 900 115 966 796 875 + 0;
  • 305 209 686 312 900 115 966 796 875 ÷ 2 = 152 604 843 156 450 057 983 398 437 + 1;
  • 152 604 843 156 450 057 983 398 437 ÷ 2 = 76 302 421 578 225 028 991 699 218 + 1;
  • 76 302 421 578 225 028 991 699 218 ÷ 2 = 38 151 210 789 112 514 495 849 609 + 0;
  • 38 151 210 789 112 514 495 849 609 ÷ 2 = 19 075 605 394 556 257 247 924 804 + 1;
  • 19 075 605 394 556 257 247 924 804 ÷ 2 = 9 537 802 697 278 128 623 962 402 + 0;
  • 9 537 802 697 278 128 623 962 402 ÷ 2 = 4 768 901 348 639 064 311 981 201 + 0;
  • 4 768 901 348 639 064 311 981 201 ÷ 2 = 2 384 450 674 319 532 155 990 600 + 1;
  • 2 384 450 674 319 532 155 990 600 ÷ 2 = 1 192 225 337 159 766 077 995 300 + 0;
  • 1 192 225 337 159 766 077 995 300 ÷ 2 = 596 112 668 579 883 038 997 650 + 0;
  • 596 112 668 579 883 038 997 650 ÷ 2 = 298 056 334 289 941 519 498 825 + 0;
  • 298 056 334 289 941 519 498 825 ÷ 2 = 149 028 167 144 970 759 749 412 + 1;
  • 149 028 167 144 970 759 749 412 ÷ 2 = 74 514 083 572 485 379 874 706 + 0;
  • 74 514 083 572 485 379 874 706 ÷ 2 = 37 257 041 786 242 689 937 353 + 0;
  • 37 257 041 786 242 689 937 353 ÷ 2 = 18 628 520 893 121 344 968 676 + 1;
  • 18 628 520 893 121 344 968 676 ÷ 2 = 9 314 260 446 560 672 484 338 + 0;
  • 9 314 260 446 560 672 484 338 ÷ 2 = 4 657 130 223 280 336 242 169 + 0;
  • 4 657 130 223 280 336 242 169 ÷ 2 = 2 328 565 111 640 168 121 084 + 1;
  • 2 328 565 111 640 168 121 084 ÷ 2 = 1 164 282 555 820 084 060 542 + 0;
  • 1 164 282 555 820 084 060 542 ÷ 2 = 582 141 277 910 042 030 271 + 0;
  • 582 141 277 910 042 030 271 ÷ 2 = 291 070 638 955 021 015 135 + 1;
  • 291 070 638 955 021 015 135 ÷ 2 = 145 535 319 477 510 507 567 + 1;
  • 145 535 319 477 510 507 567 ÷ 2 = 72 767 659 738 755 253 783 + 1;
  • 72 767 659 738 755 253 783 ÷ 2 = 36 383 829 869 377 626 891 + 1;
  • 36 383 829 869 377 626 891 ÷ 2 = 18 191 914 934 688 813 445 + 1;
  • 18 191 914 934 688 813 445 ÷ 2 = 9 095 957 467 344 406 722 + 1;
  • 9 095 957 467 344 406 722 ÷ 2 = 4 547 978 733 672 203 361 + 0;
  • 4 547 978 733 672 203 361 ÷ 2 = 2 273 989 366 836 101 680 + 1;
  • 2 273 989 366 836 101 680 ÷ 2 = 1 136 994 683 418 050 840 + 0;
  • 1 136 994 683 418 050 840 ÷ 2 = 568 497 341 709 025 420 + 0;
  • 568 497 341 709 025 420 ÷ 2 = 284 248 670 854 512 710 + 0;
  • 284 248 670 854 512 710 ÷ 2 = 142 124 335 427 256 355 + 0;
  • 142 124 335 427 256 355 ÷ 2 = 71 062 167 713 628 177 + 1;
  • 71 062 167 713 628 177 ÷ 2 = 35 531 083 856 814 088 + 1;
  • 35 531 083 856 814 088 ÷ 2 = 17 765 541 928 407 044 + 0;
  • 17 765 541 928 407 044 ÷ 2 = 8 882 770 964 203 522 + 0;
  • 8 882 770 964 203 522 ÷ 2 = 4 441 385 482 101 761 + 0;
  • 4 441 385 482 101 761 ÷ 2 = 2 220 692 741 050 880 + 1;
  • 2 220 692 741 050 880 ÷ 2 = 1 110 346 370 525 440 + 0;
  • 1 110 346 370 525 440 ÷ 2 = 555 173 185 262 720 + 0;
  • 555 173 185 262 720 ÷ 2 = 277 586 592 631 360 + 0;
  • 277 586 592 631 360 ÷ 2 = 138 793 296 315 680 + 0;
  • 138 793 296 315 680 ÷ 2 = 69 396 648 157 840 + 0;
  • 69 396 648 157 840 ÷ 2 = 34 698 324 078 920 + 0;
  • 34 698 324 078 920 ÷ 2 = 17 349 162 039 460 + 0;
  • 17 349 162 039 460 ÷ 2 = 8 674 581 019 730 + 0;
  • 8 674 581 019 730 ÷ 2 = 4 337 290 509 865 + 0;
  • 4 337 290 509 865 ÷ 2 = 2 168 645 254 932 + 1;
  • 2 168 645 254 932 ÷ 2 = 1 084 322 627 466 + 0;
  • 1 084 322 627 466 ÷ 2 = 542 161 313 733 + 0;
  • 542 161 313 733 ÷ 2 = 271 080 656 866 + 1;
  • 271 080 656 866 ÷ 2 = 135 540 328 433 + 0;
  • 135 540 328 433 ÷ 2 = 67 770 164 216 + 1;
  • 67 770 164 216 ÷ 2 = 33 885 082 108 + 0;
  • 33 885 082 108 ÷ 2 = 16 942 541 054 + 0;
  • 16 942 541 054 ÷ 2 = 8 471 270 527 + 0;
  • 8 471 270 527 ÷ 2 = 4 235 635 263 + 1;
  • 4 235 635 263 ÷ 2 = 2 117 817 631 + 1;
  • 2 117 817 631 ÷ 2 = 1 058 908 815 + 1;
  • 1 058 908 815 ÷ 2 = 529 454 407 + 1;
  • 529 454 407 ÷ 2 = 264 727 203 + 1;
  • 264 727 203 ÷ 2 = 132 363 601 + 1;
  • 132 363 601 ÷ 2 = 66 181 800 + 1;
  • 66 181 800 ÷ 2 = 33 090 900 + 0;
  • 33 090 900 ÷ 2 = 16 545 450 + 0;
  • 16 545 450 ÷ 2 = 8 272 725 + 0;
  • 8 272 725 ÷ 2 = 4 136 362 + 1;
  • 4 136 362 ÷ 2 = 2 068 181 + 0;
  • 2 068 181 ÷ 2 = 1 034 090 + 1;
  • 1 034 090 ÷ 2 = 517 045 + 0;
  • 517 045 ÷ 2 = 258 522 + 1;
  • 258 522 ÷ 2 = 129 261 + 0;
  • 129 261 ÷ 2 = 64 630 + 1;
  • 64 630 ÷ 2 = 32 315 + 0;
  • 32 315 ÷ 2 = 16 157 + 1;
  • 16 157 ÷ 2 = 8 078 + 1;
  • 8 078 ÷ 2 = 4 039 + 0;
  • 4 039 ÷ 2 = 2 019 + 1;
  • 2 019 ÷ 2 = 1 009 + 1;
  • 1 009 ÷ 2 = 504 + 1;
  • 504 ÷ 2 = 252 + 0;
  • 252 ÷ 2 = 126 + 0;
  • 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.

10 001 111 001 101 111 000 000 000 000 268(10) =


111 1110 0011 1011 0101 0101 0001 1111 1100 0101 0010 0000 0000 1000 1100 0010 1111 1100 1001 0010 0010 0101 1000 0001 0000 1100(2)


3. Normalize the binary representation of the number.

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


10 001 111 001 101 111 000 000 000 000 268(10) =


111 1110 0011 1011 0101 0101 0001 1111 1100 0101 0010 0000 0000 1000 1100 0010 1111 1100 1001 0010 0010 0101 1000 0001 0000 1100(2) =


111 1110 0011 1011 0101 0101 0001 1111 1100 0101 0010 0000 0000 1000 1100 0010 1111 1100 1001 0010 0010 0101 1000 0001 0000 1100(2) × 20 =


1.1111 1000 1110 1101 0101 0100 0111 1111 0001 0100 1000 0000 0010 0011 0000 1011 1111 0010 0100 1000 1001 0110 0000 0100 0011 00(2) × 2102


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): 102


Mantissa (not normalized):
1.1111 1000 1110 1101 0101 0100 0111 1111 0001 0100 1000 0000 0010 0011 0000 1011 1111 0010 0100 1000 1001 0110 0000 0100 0011 00


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


102 + 2(8-1) - 1 =


(102 + 127)(10) =


229(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;
  • 229 ÷ 2 = 114 + 1;
  • 114 ÷ 2 = 57 + 0;
  • 57 ÷ 2 = 28 + 1;
  • 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) =


229(10) =


1110 0101(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. 111 1100 0111 0110 1010 1010 001 1111 1100 0101 0010 0000 0000 1000 1100 0010 1111 1100 1001 0010 0010 0101 1000 0001 0000 1100 =


111 1100 0111 0110 1010 1010


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 0101


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


Decimal number 10 001 111 001 101 111 000 000 000 000 268 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0101 - 111 1100 0111 0110 1010 1010


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