110 111 110 110 101 110 000 101 000 040 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 110 111 110 110 101 110 000 101 000 040(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
110 111 110 110 101 110 000 101 000 040(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;
  • 110 111 110 110 101 110 000 101 000 040 ÷ 2 = 55 055 555 055 050 555 000 050 500 020 + 0;
  • 55 055 555 055 050 555 000 050 500 020 ÷ 2 = 27 527 777 527 525 277 500 025 250 010 + 0;
  • 27 527 777 527 525 277 500 025 250 010 ÷ 2 = 13 763 888 763 762 638 750 012 625 005 + 0;
  • 13 763 888 763 762 638 750 012 625 005 ÷ 2 = 6 881 944 381 881 319 375 006 312 502 + 1;
  • 6 881 944 381 881 319 375 006 312 502 ÷ 2 = 3 440 972 190 940 659 687 503 156 251 + 0;
  • 3 440 972 190 940 659 687 503 156 251 ÷ 2 = 1 720 486 095 470 329 843 751 578 125 + 1;
  • 1 720 486 095 470 329 843 751 578 125 ÷ 2 = 860 243 047 735 164 921 875 789 062 + 1;
  • 860 243 047 735 164 921 875 789 062 ÷ 2 = 430 121 523 867 582 460 937 894 531 + 0;
  • 430 121 523 867 582 460 937 894 531 ÷ 2 = 215 060 761 933 791 230 468 947 265 + 1;
  • 215 060 761 933 791 230 468 947 265 ÷ 2 = 107 530 380 966 895 615 234 473 632 + 1;
  • 107 530 380 966 895 615 234 473 632 ÷ 2 = 53 765 190 483 447 807 617 236 816 + 0;
  • 53 765 190 483 447 807 617 236 816 ÷ 2 = 26 882 595 241 723 903 808 618 408 + 0;
  • 26 882 595 241 723 903 808 618 408 ÷ 2 = 13 441 297 620 861 951 904 309 204 + 0;
  • 13 441 297 620 861 951 904 309 204 ÷ 2 = 6 720 648 810 430 975 952 154 602 + 0;
  • 6 720 648 810 430 975 952 154 602 ÷ 2 = 3 360 324 405 215 487 976 077 301 + 0;
  • 3 360 324 405 215 487 976 077 301 ÷ 2 = 1 680 162 202 607 743 988 038 650 + 1;
  • 1 680 162 202 607 743 988 038 650 ÷ 2 = 840 081 101 303 871 994 019 325 + 0;
  • 840 081 101 303 871 994 019 325 ÷ 2 = 420 040 550 651 935 997 009 662 + 1;
  • 420 040 550 651 935 997 009 662 ÷ 2 = 210 020 275 325 967 998 504 831 + 0;
  • 210 020 275 325 967 998 504 831 ÷ 2 = 105 010 137 662 983 999 252 415 + 1;
  • 105 010 137 662 983 999 252 415 ÷ 2 = 52 505 068 831 491 999 626 207 + 1;
  • 52 505 068 831 491 999 626 207 ÷ 2 = 26 252 534 415 745 999 813 103 + 1;
  • 26 252 534 415 745 999 813 103 ÷ 2 = 13 126 267 207 872 999 906 551 + 1;
  • 13 126 267 207 872 999 906 551 ÷ 2 = 6 563 133 603 936 499 953 275 + 1;
  • 6 563 133 603 936 499 953 275 ÷ 2 = 3 281 566 801 968 249 976 637 + 1;
  • 3 281 566 801 968 249 976 637 ÷ 2 = 1 640 783 400 984 124 988 318 + 1;
  • 1 640 783 400 984 124 988 318 ÷ 2 = 820 391 700 492 062 494 159 + 0;
  • 820 391 700 492 062 494 159 ÷ 2 = 410 195 850 246 031 247 079 + 1;
  • 410 195 850 246 031 247 079 ÷ 2 = 205 097 925 123 015 623 539 + 1;
  • 205 097 925 123 015 623 539 ÷ 2 = 102 548 962 561 507 811 769 + 1;
  • 102 548 962 561 507 811 769 ÷ 2 = 51 274 481 280 753 905 884 + 1;
  • 51 274 481 280 753 905 884 ÷ 2 = 25 637 240 640 376 952 942 + 0;
  • 25 637 240 640 376 952 942 ÷ 2 = 12 818 620 320 188 476 471 + 0;
  • 12 818 620 320 188 476 471 ÷ 2 = 6 409 310 160 094 238 235 + 1;
  • 6 409 310 160 094 238 235 ÷ 2 = 3 204 655 080 047 119 117 + 1;
  • 3 204 655 080 047 119 117 ÷ 2 = 1 602 327 540 023 559 558 + 1;
  • 1 602 327 540 023 559 558 ÷ 2 = 801 163 770 011 779 779 + 0;
  • 801 163 770 011 779 779 ÷ 2 = 400 581 885 005 889 889 + 1;
  • 400 581 885 005 889 889 ÷ 2 = 200 290 942 502 944 944 + 1;
  • 200 290 942 502 944 944 ÷ 2 = 100 145 471 251 472 472 + 0;
  • 100 145 471 251 472 472 ÷ 2 = 50 072 735 625 736 236 + 0;
  • 50 072 735 625 736 236 ÷ 2 = 25 036 367 812 868 118 + 0;
  • 25 036 367 812 868 118 ÷ 2 = 12 518 183 906 434 059 + 0;
  • 12 518 183 906 434 059 ÷ 2 = 6 259 091 953 217 029 + 1;
  • 6 259 091 953 217 029 ÷ 2 = 3 129 545 976 608 514 + 1;
  • 3 129 545 976 608 514 ÷ 2 = 1 564 772 988 304 257 + 0;
  • 1 564 772 988 304 257 ÷ 2 = 782 386 494 152 128 + 1;
  • 782 386 494 152 128 ÷ 2 = 391 193 247 076 064 + 0;
  • 391 193 247 076 064 ÷ 2 = 195 596 623 538 032 + 0;
  • 195 596 623 538 032 ÷ 2 = 97 798 311 769 016 + 0;
  • 97 798 311 769 016 ÷ 2 = 48 899 155 884 508 + 0;
  • 48 899 155 884 508 ÷ 2 = 24 449 577 942 254 + 0;
  • 24 449 577 942 254 ÷ 2 = 12 224 788 971 127 + 0;
  • 12 224 788 971 127 ÷ 2 = 6 112 394 485 563 + 1;
  • 6 112 394 485 563 ÷ 2 = 3 056 197 242 781 + 1;
  • 3 056 197 242 781 ÷ 2 = 1 528 098 621 390 + 1;
  • 1 528 098 621 390 ÷ 2 = 764 049 310 695 + 0;
  • 764 049 310 695 ÷ 2 = 382 024 655 347 + 1;
  • 382 024 655 347 ÷ 2 = 191 012 327 673 + 1;
  • 191 012 327 673 ÷ 2 = 95 506 163 836 + 1;
  • 95 506 163 836 ÷ 2 = 47 753 081 918 + 0;
  • 47 753 081 918 ÷ 2 = 23 876 540 959 + 0;
  • 23 876 540 959 ÷ 2 = 11 938 270 479 + 1;
  • 11 938 270 479 ÷ 2 = 5 969 135 239 + 1;
  • 5 969 135 239 ÷ 2 = 2 984 567 619 + 1;
  • 2 984 567 619 ÷ 2 = 1 492 283 809 + 1;
  • 1 492 283 809 ÷ 2 = 746 141 904 + 1;
  • 746 141 904 ÷ 2 = 373 070 952 + 0;
  • 373 070 952 ÷ 2 = 186 535 476 + 0;
  • 186 535 476 ÷ 2 = 93 267 738 + 0;
  • 93 267 738 ÷ 2 = 46 633 869 + 0;
  • 46 633 869 ÷ 2 = 23 316 934 + 1;
  • 23 316 934 ÷ 2 = 11 658 467 + 0;
  • 11 658 467 ÷ 2 = 5 829 233 + 1;
  • 5 829 233 ÷ 2 = 2 914 616 + 1;
  • 2 914 616 ÷ 2 = 1 457 308 + 0;
  • 1 457 308 ÷ 2 = 728 654 + 0;
  • 728 654 ÷ 2 = 364 327 + 0;
  • 364 327 ÷ 2 = 182 163 + 1;
  • 182 163 ÷ 2 = 91 081 + 1;
  • 91 081 ÷ 2 = 45 540 + 1;
  • 45 540 ÷ 2 = 22 770 + 0;
  • 22 770 ÷ 2 = 11 385 + 0;
  • 11 385 ÷ 2 = 5 692 + 1;
  • 5 692 ÷ 2 = 2 846 + 0;
  • 2 846 ÷ 2 = 1 423 + 0;
  • 1 423 ÷ 2 = 711 + 1;
  • 711 ÷ 2 = 355 + 1;
  • 355 ÷ 2 = 177 + 1;
  • 177 ÷ 2 = 88 + 1;
  • 88 ÷ 2 = 44 + 0;
  • 44 ÷ 2 = 22 + 0;
  • 22 ÷ 2 = 11 + 0;
  • 11 ÷ 2 = 5 + 1;
  • 5 ÷ 2 = 2 + 1;
  • 2 ÷ 2 = 1 + 0;
  • 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.

110 111 110 110 101 110 000 101 000 040(10) =


1 0110 0011 1100 1001 1100 0110 1000 0111 1100 1110 1110 0000 0101 1000 0110 1110 0111 1011 1111 1010 1000 0011 0110 1000(2)


3. Normalize the binary representation of the number.

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


110 111 110 110 101 110 000 101 000 040(10) =


1 0110 0011 1100 1001 1100 0110 1000 0111 1100 1110 1110 0000 0101 1000 0110 1110 0111 1011 1111 1010 1000 0011 0110 1000(2) =


1 0110 0011 1100 1001 1100 0110 1000 0111 1100 1110 1110 0000 0101 1000 0110 1110 0111 1011 1111 1010 1000 0011 0110 1000(2) × 20 =


1.0110 0011 1100 1001 1100 0110 1000 0111 1100 1110 1110 0000 0101 1000 0110 1110 0111 1011 1111 1010 1000 0011 0110 1000(2) × 296


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


Mantissa (not normalized):
1.0110 0011 1100 1001 1100 0110 1000 0111 1100 1110 1110 0000 0101 1000 0110 1110 0111 1011 1111 1010 1000 0011 0110 1000


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


96 + 2(8-1) - 1 =


(96 + 127)(10) =


223(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;
  • 223 ÷ 2 = 111 + 1;
  • 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;

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) =


223(10) =


1101 1111(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. 011 0001 1110 0100 1110 0011 0 1000 0111 1100 1110 1110 0000 0101 1000 0110 1110 0111 1011 1111 1010 1000 0011 0110 1000 =


011 0001 1110 0100 1110 0011


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) =
1101 1111


Mantissa (23 bits) =
011 0001 1110 0100 1110 0011


Decimal number 110 111 110 110 101 110 000 101 000 040 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1101 1111 - 011 0001 1110 0100 1110 0011


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