0.000 000 000 000 000 000 000 000 000 247 398 812 57 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 0.000 000 000 000 000 000 000 000 000 247 398 812 57(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
0.000 000 000 000 000 000 000 000 000 247 398 812 57(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. First, convert to binary (in base 2) the integer part: 0.
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;
  • 0 ÷ 2 = 0 + 0;

2. Construct the base 2 representation of the integer part of the number.

Take all the remainders starting from the bottom of the list constructed above.

0(10) =


0(2)


3. Convert to binary (base 2) the fractional part: 0.000 000 000 000 000 000 000 000 000 247 398 812 57.

Multiply it repeatedly by 2.


Keep track of each integer part of the results.


Stop when we get a fractional part that is equal to zero.


  • #) multiplying = integer + fractional part;
  • 1) 0.000 000 000 000 000 000 000 000 000 247 398 812 57 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 494 797 625 14;
  • 2) 0.000 000 000 000 000 000 000 000 000 494 797 625 14 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 989 595 250 28;
  • 3) 0.000 000 000 000 000 000 000 000 000 989 595 250 28 × 2 = 0 + 0.000 000 000 000 000 000 000 000 001 979 190 500 56;
  • 4) 0.000 000 000 000 000 000 000 000 001 979 190 500 56 × 2 = 0 + 0.000 000 000 000 000 000 000 000 003 958 381 001 12;
  • 5) 0.000 000 000 000 000 000 000 000 003 958 381 001 12 × 2 = 0 + 0.000 000 000 000 000 000 000 000 007 916 762 002 24;
  • 6) 0.000 000 000 000 000 000 000 000 007 916 762 002 24 × 2 = 0 + 0.000 000 000 000 000 000 000 000 015 833 524 004 48;
  • 7) 0.000 000 000 000 000 000 000 000 015 833 524 004 48 × 2 = 0 + 0.000 000 000 000 000 000 000 000 031 667 048 008 96;
  • 8) 0.000 000 000 000 000 000 000 000 031 667 048 008 96 × 2 = 0 + 0.000 000 000 000 000 000 000 000 063 334 096 017 92;
  • 9) 0.000 000 000 000 000 000 000 000 063 334 096 017 92 × 2 = 0 + 0.000 000 000 000 000 000 000 000 126 668 192 035 84;
  • 10) 0.000 000 000 000 000 000 000 000 126 668 192 035 84 × 2 = 0 + 0.000 000 000 000 000 000 000 000 253 336 384 071 68;
  • 11) 0.000 000 000 000 000 000 000 000 253 336 384 071 68 × 2 = 0 + 0.000 000 000 000 000 000 000 000 506 672 768 143 36;
  • 12) 0.000 000 000 000 000 000 000 000 506 672 768 143 36 × 2 = 0 + 0.000 000 000 000 000 000 000 001 013 345 536 286 72;
  • 13) 0.000 000 000 000 000 000 000 001 013 345 536 286 72 × 2 = 0 + 0.000 000 000 000 000 000 000 002 026 691 072 573 44;
  • 14) 0.000 000 000 000 000 000 000 002 026 691 072 573 44 × 2 = 0 + 0.000 000 000 000 000 000 000 004 053 382 145 146 88;
  • 15) 0.000 000 000 000 000 000 000 004 053 382 145 146 88 × 2 = 0 + 0.000 000 000 000 000 000 000 008 106 764 290 293 76;
  • 16) 0.000 000 000 000 000 000 000 008 106 764 290 293 76 × 2 = 0 + 0.000 000 000 000 000 000 000 016 213 528 580 587 52;
  • 17) 0.000 000 000 000 000 000 000 016 213 528 580 587 52 × 2 = 0 + 0.000 000 000 000 000 000 000 032 427 057 161 175 04;
  • 18) 0.000 000 000 000 000 000 000 032 427 057 161 175 04 × 2 = 0 + 0.000 000 000 000 000 000 000 064 854 114 322 350 08;
  • 19) 0.000 000 000 000 000 000 000 064 854 114 322 350 08 × 2 = 0 + 0.000 000 000 000 000 000 000 129 708 228 644 700 16;
  • 20) 0.000 000 000 000 000 000 000 129 708 228 644 700 16 × 2 = 0 + 0.000 000 000 000 000 000 000 259 416 457 289 400 32;
  • 21) 0.000 000 000 000 000 000 000 259 416 457 289 400 32 × 2 = 0 + 0.000 000 000 000 000 000 000 518 832 914 578 800 64;
  • 22) 0.000 000 000 000 000 000 000 518 832 914 578 800 64 × 2 = 0 + 0.000 000 000 000 000 000 001 037 665 829 157 601 28;
  • 23) 0.000 000 000 000 000 000 001 037 665 829 157 601 28 × 2 = 0 + 0.000 000 000 000 000 000 002 075 331 658 315 202 56;
  • 24) 0.000 000 000 000 000 000 002 075 331 658 315 202 56 × 2 = 0 + 0.000 000 000 000 000 000 004 150 663 316 630 405 12;
  • 25) 0.000 000 000 000 000 000 004 150 663 316 630 405 12 × 2 = 0 + 0.000 000 000 000 000 000 008 301 326 633 260 810 24;
  • 26) 0.000 000 000 000 000 000 008 301 326 633 260 810 24 × 2 = 0 + 0.000 000 000 000 000 000 016 602 653 266 521 620 48;
  • 27) 0.000 000 000 000 000 000 016 602 653 266 521 620 48 × 2 = 0 + 0.000 000 000 000 000 000 033 205 306 533 043 240 96;
  • 28) 0.000 000 000 000 000 000 033 205 306 533 043 240 96 × 2 = 0 + 0.000 000 000 000 000 000 066 410 613 066 086 481 92;
  • 29) 0.000 000 000 000 000 000 066 410 613 066 086 481 92 × 2 = 0 + 0.000 000 000 000 000 000 132 821 226 132 172 963 84;
  • 30) 0.000 000 000 000 000 000 132 821 226 132 172 963 84 × 2 = 0 + 0.000 000 000 000 000 000 265 642 452 264 345 927 68;
  • 31) 0.000 000 000 000 000 000 265 642 452 264 345 927 68 × 2 = 0 + 0.000 000 000 000 000 000 531 284 904 528 691 855 36;
  • 32) 0.000 000 000 000 000 000 531 284 904 528 691 855 36 × 2 = 0 + 0.000 000 000 000 000 001 062 569 809 057 383 710 72;
  • 33) 0.000 000 000 000 000 001 062 569 809 057 383 710 72 × 2 = 0 + 0.000 000 000 000 000 002 125 139 618 114 767 421 44;
  • 34) 0.000 000 000 000 000 002 125 139 618 114 767 421 44 × 2 = 0 + 0.000 000 000 000 000 004 250 279 236 229 534 842 88;
  • 35) 0.000 000 000 000 000 004 250 279 236 229 534 842 88 × 2 = 0 + 0.000 000 000 000 000 008 500 558 472 459 069 685 76;
  • 36) 0.000 000 000 000 000 008 500 558 472 459 069 685 76 × 2 = 0 + 0.000 000 000 000 000 017 001 116 944 918 139 371 52;
  • 37) 0.000 000 000 000 000 017 001 116 944 918 139 371 52 × 2 = 0 + 0.000 000 000 000 000 034 002 233 889 836 278 743 04;
  • 38) 0.000 000 000 000 000 034 002 233 889 836 278 743 04 × 2 = 0 + 0.000 000 000 000 000 068 004 467 779 672 557 486 08;
  • 39) 0.000 000 000 000 000 068 004 467 779 672 557 486 08 × 2 = 0 + 0.000 000 000 000 000 136 008 935 559 345 114 972 16;
  • 40) 0.000 000 000 000 000 136 008 935 559 345 114 972 16 × 2 = 0 + 0.000 000 000 000 000 272 017 871 118 690 229 944 32;
  • 41) 0.000 000 000 000 000 272 017 871 118 690 229 944 32 × 2 = 0 + 0.000 000 000 000 000 544 035 742 237 380 459 888 64;
  • 42) 0.000 000 000 000 000 544 035 742 237 380 459 888 64 × 2 = 0 + 0.000 000 000 000 001 088 071 484 474 760 919 777 28;
  • 43) 0.000 000 000 000 001 088 071 484 474 760 919 777 28 × 2 = 0 + 0.000 000 000 000 002 176 142 968 949 521 839 554 56;
  • 44) 0.000 000 000 000 002 176 142 968 949 521 839 554 56 × 2 = 0 + 0.000 000 000 000 004 352 285 937 899 043 679 109 12;
  • 45) 0.000 000 000 000 004 352 285 937 899 043 679 109 12 × 2 = 0 + 0.000 000 000 000 008 704 571 875 798 087 358 218 24;
  • 46) 0.000 000 000 000 008 704 571 875 798 087 358 218 24 × 2 = 0 + 0.000 000 000 000 017 409 143 751 596 174 716 436 48;
  • 47) 0.000 000 000 000 017 409 143 751 596 174 716 436 48 × 2 = 0 + 0.000 000 000 000 034 818 287 503 192 349 432 872 96;
  • 48) 0.000 000 000 000 034 818 287 503 192 349 432 872 96 × 2 = 0 + 0.000 000 000 000 069 636 575 006 384 698 865 745 92;
  • 49) 0.000 000 000 000 069 636 575 006 384 698 865 745 92 × 2 = 0 + 0.000 000 000 000 139 273 150 012 769 397 731 491 84;
  • 50) 0.000 000 000 000 139 273 150 012 769 397 731 491 84 × 2 = 0 + 0.000 000 000 000 278 546 300 025 538 795 462 983 68;
  • 51) 0.000 000 000 000 278 546 300 025 538 795 462 983 68 × 2 = 0 + 0.000 000 000 000 557 092 600 051 077 590 925 967 36;
  • 52) 0.000 000 000 000 557 092 600 051 077 590 925 967 36 × 2 = 0 + 0.000 000 000 001 114 185 200 102 155 181 851 934 72;
  • 53) 0.000 000 000 001 114 185 200 102 155 181 851 934 72 × 2 = 0 + 0.000 000 000 002 228 370 400 204 310 363 703 869 44;
  • 54) 0.000 000 000 002 228 370 400 204 310 363 703 869 44 × 2 = 0 + 0.000 000 000 004 456 740 800 408 620 727 407 738 88;
  • 55) 0.000 000 000 004 456 740 800 408 620 727 407 738 88 × 2 = 0 + 0.000 000 000 008 913 481 600 817 241 454 815 477 76;
  • 56) 0.000 000 000 008 913 481 600 817 241 454 815 477 76 × 2 = 0 + 0.000 000 000 017 826 963 201 634 482 909 630 955 52;
  • 57) 0.000 000 000 017 826 963 201 634 482 909 630 955 52 × 2 = 0 + 0.000 000 000 035 653 926 403 268 965 819 261 911 04;
  • 58) 0.000 000 000 035 653 926 403 268 965 819 261 911 04 × 2 = 0 + 0.000 000 000 071 307 852 806 537 931 638 523 822 08;
  • 59) 0.000 000 000 071 307 852 806 537 931 638 523 822 08 × 2 = 0 + 0.000 000 000 142 615 705 613 075 863 277 047 644 16;
  • 60) 0.000 000 000 142 615 705 613 075 863 277 047 644 16 × 2 = 0 + 0.000 000 000 285 231 411 226 151 726 554 095 288 32;
  • 61) 0.000 000 000 285 231 411 226 151 726 554 095 288 32 × 2 = 0 + 0.000 000 000 570 462 822 452 303 453 108 190 576 64;
  • 62) 0.000 000 000 570 462 822 452 303 453 108 190 576 64 × 2 = 0 + 0.000 000 001 140 925 644 904 606 906 216 381 153 28;
  • 63) 0.000 000 001 140 925 644 904 606 906 216 381 153 28 × 2 = 0 + 0.000 000 002 281 851 289 809 213 812 432 762 306 56;
  • 64) 0.000 000 002 281 851 289 809 213 812 432 762 306 56 × 2 = 0 + 0.000 000 004 563 702 579 618 427 624 865 524 613 12;
  • 65) 0.000 000 004 563 702 579 618 427 624 865 524 613 12 × 2 = 0 + 0.000 000 009 127 405 159 236 855 249 731 049 226 24;
  • 66) 0.000 000 009 127 405 159 236 855 249 731 049 226 24 × 2 = 0 + 0.000 000 018 254 810 318 473 710 499 462 098 452 48;
  • 67) 0.000 000 018 254 810 318 473 710 499 462 098 452 48 × 2 = 0 + 0.000 000 036 509 620 636 947 420 998 924 196 904 96;
  • 68) 0.000 000 036 509 620 636 947 420 998 924 196 904 96 × 2 = 0 + 0.000 000 073 019 241 273 894 841 997 848 393 809 92;
  • 69) 0.000 000 073 019 241 273 894 841 997 848 393 809 92 × 2 = 0 + 0.000 000 146 038 482 547 789 683 995 696 787 619 84;
  • 70) 0.000 000 146 038 482 547 789 683 995 696 787 619 84 × 2 = 0 + 0.000 000 292 076 965 095 579 367 991 393 575 239 68;
  • 71) 0.000 000 292 076 965 095 579 367 991 393 575 239 68 × 2 = 0 + 0.000 000 584 153 930 191 158 735 982 787 150 479 36;
  • 72) 0.000 000 584 153 930 191 158 735 982 787 150 479 36 × 2 = 0 + 0.000 001 168 307 860 382 317 471 965 574 300 958 72;
  • 73) 0.000 001 168 307 860 382 317 471 965 574 300 958 72 × 2 = 0 + 0.000 002 336 615 720 764 634 943 931 148 601 917 44;
  • 74) 0.000 002 336 615 720 764 634 943 931 148 601 917 44 × 2 = 0 + 0.000 004 673 231 441 529 269 887 862 297 203 834 88;
  • 75) 0.000 004 673 231 441 529 269 887 862 297 203 834 88 × 2 = 0 + 0.000 009 346 462 883 058 539 775 724 594 407 669 76;
  • 76) 0.000 009 346 462 883 058 539 775 724 594 407 669 76 × 2 = 0 + 0.000 018 692 925 766 117 079 551 449 188 815 339 52;
  • 77) 0.000 018 692 925 766 117 079 551 449 188 815 339 52 × 2 = 0 + 0.000 037 385 851 532 234 159 102 898 377 630 679 04;
  • 78) 0.000 037 385 851 532 234 159 102 898 377 630 679 04 × 2 = 0 + 0.000 074 771 703 064 468 318 205 796 755 261 358 08;
  • 79) 0.000 074 771 703 064 468 318 205 796 755 261 358 08 × 2 = 0 + 0.000 149 543 406 128 936 636 411 593 510 522 716 16;
  • 80) 0.000 149 543 406 128 936 636 411 593 510 522 716 16 × 2 = 0 + 0.000 299 086 812 257 873 272 823 187 021 045 432 32;
  • 81) 0.000 299 086 812 257 873 272 823 187 021 045 432 32 × 2 = 0 + 0.000 598 173 624 515 746 545 646 374 042 090 864 64;
  • 82) 0.000 598 173 624 515 746 545 646 374 042 090 864 64 × 2 = 0 + 0.001 196 347 249 031 493 091 292 748 084 181 729 28;
  • 83) 0.001 196 347 249 031 493 091 292 748 084 181 729 28 × 2 = 0 + 0.002 392 694 498 062 986 182 585 496 168 363 458 56;
  • 84) 0.002 392 694 498 062 986 182 585 496 168 363 458 56 × 2 = 0 + 0.004 785 388 996 125 972 365 170 992 336 726 917 12;
  • 85) 0.004 785 388 996 125 972 365 170 992 336 726 917 12 × 2 = 0 + 0.009 570 777 992 251 944 730 341 984 673 453 834 24;
  • 86) 0.009 570 777 992 251 944 730 341 984 673 453 834 24 × 2 = 0 + 0.019 141 555 984 503 889 460 683 969 346 907 668 48;
  • 87) 0.019 141 555 984 503 889 460 683 969 346 907 668 48 × 2 = 0 + 0.038 283 111 969 007 778 921 367 938 693 815 336 96;
  • 88) 0.038 283 111 969 007 778 921 367 938 693 815 336 96 × 2 = 0 + 0.076 566 223 938 015 557 842 735 877 387 630 673 92;
  • 89) 0.076 566 223 938 015 557 842 735 877 387 630 673 92 × 2 = 0 + 0.153 132 447 876 031 115 685 471 754 775 261 347 84;
  • 90) 0.153 132 447 876 031 115 685 471 754 775 261 347 84 × 2 = 0 + 0.306 264 895 752 062 231 370 943 509 550 522 695 68;
  • 91) 0.306 264 895 752 062 231 370 943 509 550 522 695 68 × 2 = 0 + 0.612 529 791 504 124 462 741 887 019 101 045 391 36;
  • 92) 0.612 529 791 504 124 462 741 887 019 101 045 391 36 × 2 = 1 + 0.225 059 583 008 248 925 483 774 038 202 090 782 72;
  • 93) 0.225 059 583 008 248 925 483 774 038 202 090 782 72 × 2 = 0 + 0.450 119 166 016 497 850 967 548 076 404 181 565 44;
  • 94) 0.450 119 166 016 497 850 967 548 076 404 181 565 44 × 2 = 0 + 0.900 238 332 032 995 701 935 096 152 808 363 130 88;
  • 95) 0.900 238 332 032 995 701 935 096 152 808 363 130 88 × 2 = 1 + 0.800 476 664 065 991 403 870 192 305 616 726 261 76;
  • 96) 0.800 476 664 065 991 403 870 192 305 616 726 261 76 × 2 = 1 + 0.600 953 328 131 982 807 740 384 611 233 452 523 52;
  • 97) 0.600 953 328 131 982 807 740 384 611 233 452 523 52 × 2 = 1 + 0.201 906 656 263 965 615 480 769 222 466 905 047 04;
  • 98) 0.201 906 656 263 965 615 480 769 222 466 905 047 04 × 2 = 0 + 0.403 813 312 527 931 230 961 538 444 933 810 094 08;
  • 99) 0.403 813 312 527 931 230 961 538 444 933 810 094 08 × 2 = 0 + 0.807 626 625 055 862 461 923 076 889 867 620 188 16;
  • 100) 0.807 626 625 055 862 461 923 076 889 867 620 188 16 × 2 = 1 + 0.615 253 250 111 724 923 846 153 779 735 240 376 32;
  • 101) 0.615 253 250 111 724 923 846 153 779 735 240 376 32 × 2 = 1 + 0.230 506 500 223 449 847 692 307 559 470 480 752 64;
  • 102) 0.230 506 500 223 449 847 692 307 559 470 480 752 64 × 2 = 0 + 0.461 013 000 446 899 695 384 615 118 940 961 505 28;
  • 103) 0.461 013 000 446 899 695 384 615 118 940 961 505 28 × 2 = 0 + 0.922 026 000 893 799 390 769 230 237 881 923 010 56;
  • 104) 0.922 026 000 893 799 390 769 230 237 881 923 010 56 × 2 = 1 + 0.844 052 001 787 598 781 538 460 475 763 846 021 12;
  • 105) 0.844 052 001 787 598 781 538 460 475 763 846 021 12 × 2 = 1 + 0.688 104 003 575 197 563 076 920 951 527 692 042 24;
  • 106) 0.688 104 003 575 197 563 076 920 951 527 692 042 24 × 2 = 1 + 0.376 208 007 150 395 126 153 841 903 055 384 084 48;
  • 107) 0.376 208 007 150 395 126 153 841 903 055 384 084 48 × 2 = 0 + 0.752 416 014 300 790 252 307 683 806 110 768 168 96;
  • 108) 0.752 416 014 300 790 252 307 683 806 110 768 168 96 × 2 = 1 + 0.504 832 028 601 580 504 615 367 612 221 536 337 92;
  • 109) 0.504 832 028 601 580 504 615 367 612 221 536 337 92 × 2 = 1 + 0.009 664 057 203 161 009 230 735 224 443 072 675 84;
  • 110) 0.009 664 057 203 161 009 230 735 224 443 072 675 84 × 2 = 0 + 0.019 328 114 406 322 018 461 470 448 886 145 351 68;
  • 111) 0.019 328 114 406 322 018 461 470 448 886 145 351 68 × 2 = 0 + 0.038 656 228 812 644 036 922 940 897 772 290 703 36;
  • 112) 0.038 656 228 812 644 036 922 940 897 772 290 703 36 × 2 = 0 + 0.077 312 457 625 288 073 845 881 795 544 581 406 72;
  • 113) 0.077 312 457 625 288 073 845 881 795 544 581 406 72 × 2 = 0 + 0.154 624 915 250 576 147 691 763 591 089 162 813 44;
  • 114) 0.154 624 915 250 576 147 691 763 591 089 162 813 44 × 2 = 0 + 0.309 249 830 501 152 295 383 527 182 178 325 626 88;
  • 115) 0.309 249 830 501 152 295 383 527 182 178 325 626 88 × 2 = 0 + 0.618 499 661 002 304 590 767 054 364 356 651 253 76;

We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit) and at least one integer that was different from zero => FULL STOP (Losing precision - the converted number we get in the end will be just a very good approximation of the initial one).


4. Construct the base 2 representation of the fractional part of the number.

Take all the integer parts of the multiplying operations, starting from the top of the constructed list above:


0.000 000 000 000 000 000 000 000 000 247 398 812 57(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0011 1001 1001 1101 1000 000(2)

5. Positive number before normalization:

0.000 000 000 000 000 000 000 000 000 247 398 812 57(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0011 1001 1001 1101 1000 000(2)

6. Normalize the binary representation of the number.

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


0.000 000 000 000 000 000 000 000 000 247 398 812 57(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0011 1001 1001 1101 1000 000(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0011 1001 1001 1101 1000 000(2) × 20 =


1.0011 1001 1001 1101 1000 000(2) × 2-92


7. 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): -92


Mantissa (not normalized):
1.0011 1001 1001 1101 1000 000


8. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


-92 + 2(8-1) - 1 =


(-92 + 127)(10) =


35(10)


9. 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;
  • 35 ÷ 2 = 17 + 1;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

10. Construct the base 2 representation of the adjusted exponent.

Take all the remainders starting from the bottom of the list constructed above.


Exponent (adjusted) =


35(10) =


0010 0011(2)


11. 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, only if necessary (not the case here).


Mantissa (normalized) =


1. 001 1100 1100 1110 1100 0000 =


001 1100 1100 1110 1100 0000


12. 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) =
0010 0011


Mantissa (23 bits) =
001 1100 1100 1110 1100 0000


Decimal number 0.000 000 000 000 000 000 000 000 000 247 398 812 57 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 0010 0011 - 001 1100 1100 1110 1100 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