10 000 111 111 100 011 001 111 000 110 834 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 10 000 111 111 100 011 001 111 000 110 834(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 000 111 111 100 011 001 111 000 110 834(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 000 111 111 100 011 001 111 000 110 834 ÷ 2 = 5 000 055 555 550 005 500 555 500 055 417 + 0;
  • 5 000 055 555 550 005 500 555 500 055 417 ÷ 2 = 2 500 027 777 775 002 750 277 750 027 708 + 1;
  • 2 500 027 777 775 002 750 277 750 027 708 ÷ 2 = 1 250 013 888 887 501 375 138 875 013 854 + 0;
  • 1 250 013 888 887 501 375 138 875 013 854 ÷ 2 = 625 006 944 443 750 687 569 437 506 927 + 0;
  • 625 006 944 443 750 687 569 437 506 927 ÷ 2 = 312 503 472 221 875 343 784 718 753 463 + 1;
  • 312 503 472 221 875 343 784 718 753 463 ÷ 2 = 156 251 736 110 937 671 892 359 376 731 + 1;
  • 156 251 736 110 937 671 892 359 376 731 ÷ 2 = 78 125 868 055 468 835 946 179 688 365 + 1;
  • 78 125 868 055 468 835 946 179 688 365 ÷ 2 = 39 062 934 027 734 417 973 089 844 182 + 1;
  • 39 062 934 027 734 417 973 089 844 182 ÷ 2 = 19 531 467 013 867 208 986 544 922 091 + 0;
  • 19 531 467 013 867 208 986 544 922 091 ÷ 2 = 9 765 733 506 933 604 493 272 461 045 + 1;
  • 9 765 733 506 933 604 493 272 461 045 ÷ 2 = 4 882 866 753 466 802 246 636 230 522 + 1;
  • 4 882 866 753 466 802 246 636 230 522 ÷ 2 = 2 441 433 376 733 401 123 318 115 261 + 0;
  • 2 441 433 376 733 401 123 318 115 261 ÷ 2 = 1 220 716 688 366 700 561 659 057 630 + 1;
  • 1 220 716 688 366 700 561 659 057 630 ÷ 2 = 610 358 344 183 350 280 829 528 815 + 0;
  • 610 358 344 183 350 280 829 528 815 ÷ 2 = 305 179 172 091 675 140 414 764 407 + 1;
  • 305 179 172 091 675 140 414 764 407 ÷ 2 = 152 589 586 045 837 570 207 382 203 + 1;
  • 152 589 586 045 837 570 207 382 203 ÷ 2 = 76 294 793 022 918 785 103 691 101 + 1;
  • 76 294 793 022 918 785 103 691 101 ÷ 2 = 38 147 396 511 459 392 551 845 550 + 1;
  • 38 147 396 511 459 392 551 845 550 ÷ 2 = 19 073 698 255 729 696 275 922 775 + 0;
  • 19 073 698 255 729 696 275 922 775 ÷ 2 = 9 536 849 127 864 848 137 961 387 + 1;
  • 9 536 849 127 864 848 137 961 387 ÷ 2 = 4 768 424 563 932 424 068 980 693 + 1;
  • 4 768 424 563 932 424 068 980 693 ÷ 2 = 2 384 212 281 966 212 034 490 346 + 1;
  • 2 384 212 281 966 212 034 490 346 ÷ 2 = 1 192 106 140 983 106 017 245 173 + 0;
  • 1 192 106 140 983 106 017 245 173 ÷ 2 = 596 053 070 491 553 008 622 586 + 1;
  • 596 053 070 491 553 008 622 586 ÷ 2 = 298 026 535 245 776 504 311 293 + 0;
  • 298 026 535 245 776 504 311 293 ÷ 2 = 149 013 267 622 888 252 155 646 + 1;
  • 149 013 267 622 888 252 155 646 ÷ 2 = 74 506 633 811 444 126 077 823 + 0;
  • 74 506 633 811 444 126 077 823 ÷ 2 = 37 253 316 905 722 063 038 911 + 1;
  • 37 253 316 905 722 063 038 911 ÷ 2 = 18 626 658 452 861 031 519 455 + 1;
  • 18 626 658 452 861 031 519 455 ÷ 2 = 9 313 329 226 430 515 759 727 + 1;
  • 9 313 329 226 430 515 759 727 ÷ 2 = 4 656 664 613 215 257 879 863 + 1;
  • 4 656 664 613 215 257 879 863 ÷ 2 = 2 328 332 306 607 628 939 931 + 1;
  • 2 328 332 306 607 628 939 931 ÷ 2 = 1 164 166 153 303 814 469 965 + 1;
  • 1 164 166 153 303 814 469 965 ÷ 2 = 582 083 076 651 907 234 982 + 1;
  • 582 083 076 651 907 234 982 ÷ 2 = 291 041 538 325 953 617 491 + 0;
  • 291 041 538 325 953 617 491 ÷ 2 = 145 520 769 162 976 808 745 + 1;
  • 145 520 769 162 976 808 745 ÷ 2 = 72 760 384 581 488 404 372 + 1;
  • 72 760 384 581 488 404 372 ÷ 2 = 36 380 192 290 744 202 186 + 0;
  • 36 380 192 290 744 202 186 ÷ 2 = 18 190 096 145 372 101 093 + 0;
  • 18 190 096 145 372 101 093 ÷ 2 = 9 095 048 072 686 050 546 + 1;
  • 9 095 048 072 686 050 546 ÷ 2 = 4 547 524 036 343 025 273 + 0;
  • 4 547 524 036 343 025 273 ÷ 2 = 2 273 762 018 171 512 636 + 1;
  • 2 273 762 018 171 512 636 ÷ 2 = 1 136 881 009 085 756 318 + 0;
  • 1 136 881 009 085 756 318 ÷ 2 = 568 440 504 542 878 159 + 0;
  • 568 440 504 542 878 159 ÷ 2 = 284 220 252 271 439 079 + 1;
  • 284 220 252 271 439 079 ÷ 2 = 142 110 126 135 719 539 + 1;
  • 142 110 126 135 719 539 ÷ 2 = 71 055 063 067 859 769 + 1;
  • 71 055 063 067 859 769 ÷ 2 = 35 527 531 533 929 884 + 1;
  • 35 527 531 533 929 884 ÷ 2 = 17 763 765 766 964 942 + 0;
  • 17 763 765 766 964 942 ÷ 2 = 8 881 882 883 482 471 + 0;
  • 8 881 882 883 482 471 ÷ 2 = 4 440 941 441 741 235 + 1;
  • 4 440 941 441 741 235 ÷ 2 = 2 220 470 720 870 617 + 1;
  • 2 220 470 720 870 617 ÷ 2 = 1 110 235 360 435 308 + 1;
  • 1 110 235 360 435 308 ÷ 2 = 555 117 680 217 654 + 0;
  • 555 117 680 217 654 ÷ 2 = 277 558 840 108 827 + 0;
  • 277 558 840 108 827 ÷ 2 = 138 779 420 054 413 + 1;
  • 138 779 420 054 413 ÷ 2 = 69 389 710 027 206 + 1;
  • 69 389 710 027 206 ÷ 2 = 34 694 855 013 603 + 0;
  • 34 694 855 013 603 ÷ 2 = 17 347 427 506 801 + 1;
  • 17 347 427 506 801 ÷ 2 = 8 673 713 753 400 + 1;
  • 8 673 713 753 400 ÷ 2 = 4 336 856 876 700 + 0;
  • 4 336 856 876 700 ÷ 2 = 2 168 428 438 350 + 0;
  • 2 168 428 438 350 ÷ 2 = 1 084 214 219 175 + 0;
  • 1 084 214 219 175 ÷ 2 = 542 107 109 587 + 1;
  • 542 107 109 587 ÷ 2 = 271 053 554 793 + 1;
  • 271 053 554 793 ÷ 2 = 135 526 777 396 + 1;
  • 135 526 777 396 ÷ 2 = 67 763 388 698 + 0;
  • 67 763 388 698 ÷ 2 = 33 881 694 349 + 0;
  • 33 881 694 349 ÷ 2 = 16 940 847 174 + 1;
  • 16 940 847 174 ÷ 2 = 8 470 423 587 + 0;
  • 8 470 423 587 ÷ 2 = 4 235 211 793 + 1;
  • 4 235 211 793 ÷ 2 = 2 117 605 896 + 1;
  • 2 117 605 896 ÷ 2 = 1 058 802 948 + 0;
  • 1 058 802 948 ÷ 2 = 529 401 474 + 0;
  • 529 401 474 ÷ 2 = 264 700 737 + 0;
  • 264 700 737 ÷ 2 = 132 350 368 + 1;
  • 132 350 368 ÷ 2 = 66 175 184 + 0;
  • 66 175 184 ÷ 2 = 33 087 592 + 0;
  • 33 087 592 ÷ 2 = 16 543 796 + 0;
  • 16 543 796 ÷ 2 = 8 271 898 + 0;
  • 8 271 898 ÷ 2 = 4 135 949 + 0;
  • 4 135 949 ÷ 2 = 2 067 974 + 1;
  • 2 067 974 ÷ 2 = 1 033 987 + 0;
  • 1 033 987 ÷ 2 = 516 993 + 1;
  • 516 993 ÷ 2 = 258 496 + 1;
  • 258 496 ÷ 2 = 129 248 + 0;
  • 129 248 ÷ 2 = 64 624 + 0;
  • 64 624 ÷ 2 = 32 312 + 0;
  • 32 312 ÷ 2 = 16 156 + 0;
  • 16 156 ÷ 2 = 8 078 + 0;
  • 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 000 111 111 100 011 001 111 000 110 834(10) =


111 1110 0011 1000 0001 1010 0000 1000 1101 0011 1000 1101 1001 1100 1111 0010 1001 1011 1111 1010 1011 1011 1101 0110 1111 0010(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 000 111 111 100 011 001 111 000 110 834(10) =


111 1110 0011 1000 0001 1010 0000 1000 1101 0011 1000 1101 1001 1100 1111 0010 1001 1011 1111 1010 1011 1011 1101 0110 1111 0010(2) =


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


1.1111 1000 1110 0000 0110 1000 0010 0011 0100 1110 0011 0110 0111 0011 1100 1010 0110 1111 1110 1010 1110 1111 0101 1011 1100 10(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 0000 0110 1000 0010 0011 0100 1110 0011 0110 0111 0011 1100 1010 0110 1111 1110 1010 1110 1111 0101 1011 1100 10


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 0000 0011 0100 000 1000 1101 0011 1000 1101 1001 1100 1111 0010 1001 1011 1111 1010 1011 1011 1101 0110 1111 0010 =


111 1100 0111 0000 0011 0100


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 0000 0011 0100


Decimal number 10 000 111 111 100 011 001 111 000 110 834 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0101 - 111 1100 0111 0000 0011 0100


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