23 456 789 876 543 234 567 654 323 447 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 23 456 789 876 543 234 567 654 323 447(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
23 456 789 876 543 234 567 654 323 447(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;
  • 23 456 789 876 543 234 567 654 323 447 ÷ 2 = 11 728 394 938 271 617 283 827 161 723 + 1;
  • 11 728 394 938 271 617 283 827 161 723 ÷ 2 = 5 864 197 469 135 808 641 913 580 861 + 1;
  • 5 864 197 469 135 808 641 913 580 861 ÷ 2 = 2 932 098 734 567 904 320 956 790 430 + 1;
  • 2 932 098 734 567 904 320 956 790 430 ÷ 2 = 1 466 049 367 283 952 160 478 395 215 + 0;
  • 1 466 049 367 283 952 160 478 395 215 ÷ 2 = 733 024 683 641 976 080 239 197 607 + 1;
  • 733 024 683 641 976 080 239 197 607 ÷ 2 = 366 512 341 820 988 040 119 598 803 + 1;
  • 366 512 341 820 988 040 119 598 803 ÷ 2 = 183 256 170 910 494 020 059 799 401 + 1;
  • 183 256 170 910 494 020 059 799 401 ÷ 2 = 91 628 085 455 247 010 029 899 700 + 1;
  • 91 628 085 455 247 010 029 899 700 ÷ 2 = 45 814 042 727 623 505 014 949 850 + 0;
  • 45 814 042 727 623 505 014 949 850 ÷ 2 = 22 907 021 363 811 752 507 474 925 + 0;
  • 22 907 021 363 811 752 507 474 925 ÷ 2 = 11 453 510 681 905 876 253 737 462 + 1;
  • 11 453 510 681 905 876 253 737 462 ÷ 2 = 5 726 755 340 952 938 126 868 731 + 0;
  • 5 726 755 340 952 938 126 868 731 ÷ 2 = 2 863 377 670 476 469 063 434 365 + 1;
  • 2 863 377 670 476 469 063 434 365 ÷ 2 = 1 431 688 835 238 234 531 717 182 + 1;
  • 1 431 688 835 238 234 531 717 182 ÷ 2 = 715 844 417 619 117 265 858 591 + 0;
  • 715 844 417 619 117 265 858 591 ÷ 2 = 357 922 208 809 558 632 929 295 + 1;
  • 357 922 208 809 558 632 929 295 ÷ 2 = 178 961 104 404 779 316 464 647 + 1;
  • 178 961 104 404 779 316 464 647 ÷ 2 = 89 480 552 202 389 658 232 323 + 1;
  • 89 480 552 202 389 658 232 323 ÷ 2 = 44 740 276 101 194 829 116 161 + 1;
  • 44 740 276 101 194 829 116 161 ÷ 2 = 22 370 138 050 597 414 558 080 + 1;
  • 22 370 138 050 597 414 558 080 ÷ 2 = 11 185 069 025 298 707 279 040 + 0;
  • 11 185 069 025 298 707 279 040 ÷ 2 = 5 592 534 512 649 353 639 520 + 0;
  • 5 592 534 512 649 353 639 520 ÷ 2 = 2 796 267 256 324 676 819 760 + 0;
  • 2 796 267 256 324 676 819 760 ÷ 2 = 1 398 133 628 162 338 409 880 + 0;
  • 1 398 133 628 162 338 409 880 ÷ 2 = 699 066 814 081 169 204 940 + 0;
  • 699 066 814 081 169 204 940 ÷ 2 = 349 533 407 040 584 602 470 + 0;
  • 349 533 407 040 584 602 470 ÷ 2 = 174 766 703 520 292 301 235 + 0;
  • 174 766 703 520 292 301 235 ÷ 2 = 87 383 351 760 146 150 617 + 1;
  • 87 383 351 760 146 150 617 ÷ 2 = 43 691 675 880 073 075 308 + 1;
  • 43 691 675 880 073 075 308 ÷ 2 = 21 845 837 940 036 537 654 + 0;
  • 21 845 837 940 036 537 654 ÷ 2 = 10 922 918 970 018 268 827 + 0;
  • 10 922 918 970 018 268 827 ÷ 2 = 5 461 459 485 009 134 413 + 1;
  • 5 461 459 485 009 134 413 ÷ 2 = 2 730 729 742 504 567 206 + 1;
  • 2 730 729 742 504 567 206 ÷ 2 = 1 365 364 871 252 283 603 + 0;
  • 1 365 364 871 252 283 603 ÷ 2 = 682 682 435 626 141 801 + 1;
  • 682 682 435 626 141 801 ÷ 2 = 341 341 217 813 070 900 + 1;
  • 341 341 217 813 070 900 ÷ 2 = 170 670 608 906 535 450 + 0;
  • 170 670 608 906 535 450 ÷ 2 = 85 335 304 453 267 725 + 0;
  • 85 335 304 453 267 725 ÷ 2 = 42 667 652 226 633 862 + 1;
  • 42 667 652 226 633 862 ÷ 2 = 21 333 826 113 316 931 + 0;
  • 21 333 826 113 316 931 ÷ 2 = 10 666 913 056 658 465 + 1;
  • 10 666 913 056 658 465 ÷ 2 = 5 333 456 528 329 232 + 1;
  • 5 333 456 528 329 232 ÷ 2 = 2 666 728 264 164 616 + 0;
  • 2 666 728 264 164 616 ÷ 2 = 1 333 364 132 082 308 + 0;
  • 1 333 364 132 082 308 ÷ 2 = 666 682 066 041 154 + 0;
  • 666 682 066 041 154 ÷ 2 = 333 341 033 020 577 + 0;
  • 333 341 033 020 577 ÷ 2 = 166 670 516 510 288 + 1;
  • 166 670 516 510 288 ÷ 2 = 83 335 258 255 144 + 0;
  • 83 335 258 255 144 ÷ 2 = 41 667 629 127 572 + 0;
  • 41 667 629 127 572 ÷ 2 = 20 833 814 563 786 + 0;
  • 20 833 814 563 786 ÷ 2 = 10 416 907 281 893 + 0;
  • 10 416 907 281 893 ÷ 2 = 5 208 453 640 946 + 1;
  • 5 208 453 640 946 ÷ 2 = 2 604 226 820 473 + 0;
  • 2 604 226 820 473 ÷ 2 = 1 302 113 410 236 + 1;
  • 1 302 113 410 236 ÷ 2 = 651 056 705 118 + 0;
  • 651 056 705 118 ÷ 2 = 325 528 352 559 + 0;
  • 325 528 352 559 ÷ 2 = 162 764 176 279 + 1;
  • 162 764 176 279 ÷ 2 = 81 382 088 139 + 1;
  • 81 382 088 139 ÷ 2 = 40 691 044 069 + 1;
  • 40 691 044 069 ÷ 2 = 20 345 522 034 + 1;
  • 20 345 522 034 ÷ 2 = 10 172 761 017 + 0;
  • 10 172 761 017 ÷ 2 = 5 086 380 508 + 1;
  • 5 086 380 508 ÷ 2 = 2 543 190 254 + 0;
  • 2 543 190 254 ÷ 2 = 1 271 595 127 + 0;
  • 1 271 595 127 ÷ 2 = 635 797 563 + 1;
  • 635 797 563 ÷ 2 = 317 898 781 + 1;
  • 317 898 781 ÷ 2 = 158 949 390 + 1;
  • 158 949 390 ÷ 2 = 79 474 695 + 0;
  • 79 474 695 ÷ 2 = 39 737 347 + 1;
  • 39 737 347 ÷ 2 = 19 868 673 + 1;
  • 19 868 673 ÷ 2 = 9 934 336 + 1;
  • 9 934 336 ÷ 2 = 4 967 168 + 0;
  • 4 967 168 ÷ 2 = 2 483 584 + 0;
  • 2 483 584 ÷ 2 = 1 241 792 + 0;
  • 1 241 792 ÷ 2 = 620 896 + 0;
  • 620 896 ÷ 2 = 310 448 + 0;
  • 310 448 ÷ 2 = 155 224 + 0;
  • 155 224 ÷ 2 = 77 612 + 0;
  • 77 612 ÷ 2 = 38 806 + 0;
  • 38 806 ÷ 2 = 19 403 + 0;
  • 19 403 ÷ 2 = 9 701 + 1;
  • 9 701 ÷ 2 = 4 850 + 1;
  • 4 850 ÷ 2 = 2 425 + 0;
  • 2 425 ÷ 2 = 1 212 + 1;
  • 1 212 ÷ 2 = 606 + 0;
  • 606 ÷ 2 = 303 + 0;
  • 303 ÷ 2 = 151 + 1;
  • 151 ÷ 2 = 75 + 1;
  • 75 ÷ 2 = 37 + 1;
  • 37 ÷ 2 = 18 + 1;
  • 18 ÷ 2 = 9 + 0;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 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.

23 456 789 876 543 234 567 654 323 447(10) =


100 1011 1100 1011 0000 0000 0111 0111 0010 1111 0010 1000 0100 0011 0100 1101 1001 1000 0000 1111 1011 0100 1111 0111(2)


3. Normalize the binary representation of the number.

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


23 456 789 876 543 234 567 654 323 447(10) =


100 1011 1100 1011 0000 0000 0111 0111 0010 1111 0010 1000 0100 0011 0100 1101 1001 1000 0000 1111 1011 0100 1111 0111(2) =


100 1011 1100 1011 0000 0000 0111 0111 0010 1111 0010 1000 0100 0011 0100 1101 1001 1000 0000 1111 1011 0100 1111 0111(2) × 20 =


1.0010 1111 0010 1100 0000 0001 1101 1100 1011 1100 1010 0001 0000 1101 0011 0110 0110 0000 0011 1110 1101 0011 1101 11(2) × 294


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


Mantissa (not normalized):
1.0010 1111 0010 1100 0000 0001 1101 1100 1011 1100 1010 0001 0000 1101 0011 0110 0110 0000 0011 1110 1101 0011 1101 11


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


94 + 2(8-1) - 1 =


(94 + 127)(10) =


221(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;
  • 221 ÷ 2 = 110 + 1;
  • 110 ÷ 2 = 55 + 0;
  • 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) =


221(10) =


1101 1101(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. 001 0111 1001 0110 0000 0000 111 0111 0010 1111 0010 1000 0100 0011 0100 1101 1001 1000 0000 1111 1011 0100 1111 0111 =


001 0111 1001 0110 0000 0000


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 1101


Mantissa (23 bits) =
001 0111 1001 0110 0000 0000


Decimal number 23 456 789 876 543 234 567 654 323 447 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1101 1101 - 001 0111 1001 0110 0000 0000


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