0.000 000 000 000 000 000 000 000 000 247 398 812 1 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 1(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 1(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 1.

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 1 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 494 797 624 2;
  • 2) 0.000 000 000 000 000 000 000 000 000 494 797 624 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 000 989 595 248 4;
  • 3) 0.000 000 000 000 000 000 000 000 000 989 595 248 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 001 979 190 496 8;
  • 4) 0.000 000 000 000 000 000 000 000 001 979 190 496 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 003 958 380 993 6;
  • 5) 0.000 000 000 000 000 000 000 000 003 958 380 993 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 007 916 761 987 2;
  • 6) 0.000 000 000 000 000 000 000 000 007 916 761 987 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 015 833 523 974 4;
  • 7) 0.000 000 000 000 000 000 000 000 015 833 523 974 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 031 667 047 948 8;
  • 8) 0.000 000 000 000 000 000 000 000 031 667 047 948 8 × 2 = 0 + 0.000 000 000 000 000 000 000 000 063 334 095 897 6;
  • 9) 0.000 000 000 000 000 000 000 000 063 334 095 897 6 × 2 = 0 + 0.000 000 000 000 000 000 000 000 126 668 191 795 2;
  • 10) 0.000 000 000 000 000 000 000 000 126 668 191 795 2 × 2 = 0 + 0.000 000 000 000 000 000 000 000 253 336 383 590 4;
  • 11) 0.000 000 000 000 000 000 000 000 253 336 383 590 4 × 2 = 0 + 0.000 000 000 000 000 000 000 000 506 672 767 180 8;
  • 12) 0.000 000 000 000 000 000 000 000 506 672 767 180 8 × 2 = 0 + 0.000 000 000 000 000 000 000 001 013 345 534 361 6;
  • 13) 0.000 000 000 000 000 000 000 001 013 345 534 361 6 × 2 = 0 + 0.000 000 000 000 000 000 000 002 026 691 068 723 2;
  • 14) 0.000 000 000 000 000 000 000 002 026 691 068 723 2 × 2 = 0 + 0.000 000 000 000 000 000 000 004 053 382 137 446 4;
  • 15) 0.000 000 000 000 000 000 000 004 053 382 137 446 4 × 2 = 0 + 0.000 000 000 000 000 000 000 008 106 764 274 892 8;
  • 16) 0.000 000 000 000 000 000 000 008 106 764 274 892 8 × 2 = 0 + 0.000 000 000 000 000 000 000 016 213 528 549 785 6;
  • 17) 0.000 000 000 000 000 000 000 016 213 528 549 785 6 × 2 = 0 + 0.000 000 000 000 000 000 000 032 427 057 099 571 2;
  • 18) 0.000 000 000 000 000 000 000 032 427 057 099 571 2 × 2 = 0 + 0.000 000 000 000 000 000 000 064 854 114 199 142 4;
  • 19) 0.000 000 000 000 000 000 000 064 854 114 199 142 4 × 2 = 0 + 0.000 000 000 000 000 000 000 129 708 228 398 284 8;
  • 20) 0.000 000 000 000 000 000 000 129 708 228 398 284 8 × 2 = 0 + 0.000 000 000 000 000 000 000 259 416 456 796 569 6;
  • 21) 0.000 000 000 000 000 000 000 259 416 456 796 569 6 × 2 = 0 + 0.000 000 000 000 000 000 000 518 832 913 593 139 2;
  • 22) 0.000 000 000 000 000 000 000 518 832 913 593 139 2 × 2 = 0 + 0.000 000 000 000 000 000 001 037 665 827 186 278 4;
  • 23) 0.000 000 000 000 000 000 001 037 665 827 186 278 4 × 2 = 0 + 0.000 000 000 000 000 000 002 075 331 654 372 556 8;
  • 24) 0.000 000 000 000 000 000 002 075 331 654 372 556 8 × 2 = 0 + 0.000 000 000 000 000 000 004 150 663 308 745 113 6;
  • 25) 0.000 000 000 000 000 000 004 150 663 308 745 113 6 × 2 = 0 + 0.000 000 000 000 000 000 008 301 326 617 490 227 2;
  • 26) 0.000 000 000 000 000 000 008 301 326 617 490 227 2 × 2 = 0 + 0.000 000 000 000 000 000 016 602 653 234 980 454 4;
  • 27) 0.000 000 000 000 000 000 016 602 653 234 980 454 4 × 2 = 0 + 0.000 000 000 000 000 000 033 205 306 469 960 908 8;
  • 28) 0.000 000 000 000 000 000 033 205 306 469 960 908 8 × 2 = 0 + 0.000 000 000 000 000 000 066 410 612 939 921 817 6;
  • 29) 0.000 000 000 000 000 000 066 410 612 939 921 817 6 × 2 = 0 + 0.000 000 000 000 000 000 132 821 225 879 843 635 2;
  • 30) 0.000 000 000 000 000 000 132 821 225 879 843 635 2 × 2 = 0 + 0.000 000 000 000 000 000 265 642 451 759 687 270 4;
  • 31) 0.000 000 000 000 000 000 265 642 451 759 687 270 4 × 2 = 0 + 0.000 000 000 000 000 000 531 284 903 519 374 540 8;
  • 32) 0.000 000 000 000 000 000 531 284 903 519 374 540 8 × 2 = 0 + 0.000 000 000 000 000 001 062 569 807 038 749 081 6;
  • 33) 0.000 000 000 000 000 001 062 569 807 038 749 081 6 × 2 = 0 + 0.000 000 000 000 000 002 125 139 614 077 498 163 2;
  • 34) 0.000 000 000 000 000 002 125 139 614 077 498 163 2 × 2 = 0 + 0.000 000 000 000 000 004 250 279 228 154 996 326 4;
  • 35) 0.000 000 000 000 000 004 250 279 228 154 996 326 4 × 2 = 0 + 0.000 000 000 000 000 008 500 558 456 309 992 652 8;
  • 36) 0.000 000 000 000 000 008 500 558 456 309 992 652 8 × 2 = 0 + 0.000 000 000 000 000 017 001 116 912 619 985 305 6;
  • 37) 0.000 000 000 000 000 017 001 116 912 619 985 305 6 × 2 = 0 + 0.000 000 000 000 000 034 002 233 825 239 970 611 2;
  • 38) 0.000 000 000 000 000 034 002 233 825 239 970 611 2 × 2 = 0 + 0.000 000 000 000 000 068 004 467 650 479 941 222 4;
  • 39) 0.000 000 000 000 000 068 004 467 650 479 941 222 4 × 2 = 0 + 0.000 000 000 000 000 136 008 935 300 959 882 444 8;
  • 40) 0.000 000 000 000 000 136 008 935 300 959 882 444 8 × 2 = 0 + 0.000 000 000 000 000 272 017 870 601 919 764 889 6;
  • 41) 0.000 000 000 000 000 272 017 870 601 919 764 889 6 × 2 = 0 + 0.000 000 000 000 000 544 035 741 203 839 529 779 2;
  • 42) 0.000 000 000 000 000 544 035 741 203 839 529 779 2 × 2 = 0 + 0.000 000 000 000 001 088 071 482 407 679 059 558 4;
  • 43) 0.000 000 000 000 001 088 071 482 407 679 059 558 4 × 2 = 0 + 0.000 000 000 000 002 176 142 964 815 358 119 116 8;
  • 44) 0.000 000 000 000 002 176 142 964 815 358 119 116 8 × 2 = 0 + 0.000 000 000 000 004 352 285 929 630 716 238 233 6;
  • 45) 0.000 000 000 000 004 352 285 929 630 716 238 233 6 × 2 = 0 + 0.000 000 000 000 008 704 571 859 261 432 476 467 2;
  • 46) 0.000 000 000 000 008 704 571 859 261 432 476 467 2 × 2 = 0 + 0.000 000 000 000 017 409 143 718 522 864 952 934 4;
  • 47) 0.000 000 000 000 017 409 143 718 522 864 952 934 4 × 2 = 0 + 0.000 000 000 000 034 818 287 437 045 729 905 868 8;
  • 48) 0.000 000 000 000 034 818 287 437 045 729 905 868 8 × 2 = 0 + 0.000 000 000 000 069 636 574 874 091 459 811 737 6;
  • 49) 0.000 000 000 000 069 636 574 874 091 459 811 737 6 × 2 = 0 + 0.000 000 000 000 139 273 149 748 182 919 623 475 2;
  • 50) 0.000 000 000 000 139 273 149 748 182 919 623 475 2 × 2 = 0 + 0.000 000 000 000 278 546 299 496 365 839 246 950 4;
  • 51) 0.000 000 000 000 278 546 299 496 365 839 246 950 4 × 2 = 0 + 0.000 000 000 000 557 092 598 992 731 678 493 900 8;
  • 52) 0.000 000 000 000 557 092 598 992 731 678 493 900 8 × 2 = 0 + 0.000 000 000 001 114 185 197 985 463 356 987 801 6;
  • 53) 0.000 000 000 001 114 185 197 985 463 356 987 801 6 × 2 = 0 + 0.000 000 000 002 228 370 395 970 926 713 975 603 2;
  • 54) 0.000 000 000 002 228 370 395 970 926 713 975 603 2 × 2 = 0 + 0.000 000 000 004 456 740 791 941 853 427 951 206 4;
  • 55) 0.000 000 000 004 456 740 791 941 853 427 951 206 4 × 2 = 0 + 0.000 000 000 008 913 481 583 883 706 855 902 412 8;
  • 56) 0.000 000 000 008 913 481 583 883 706 855 902 412 8 × 2 = 0 + 0.000 000 000 017 826 963 167 767 413 711 804 825 6;
  • 57) 0.000 000 000 017 826 963 167 767 413 711 804 825 6 × 2 = 0 + 0.000 000 000 035 653 926 335 534 827 423 609 651 2;
  • 58) 0.000 000 000 035 653 926 335 534 827 423 609 651 2 × 2 = 0 + 0.000 000 000 071 307 852 671 069 654 847 219 302 4;
  • 59) 0.000 000 000 071 307 852 671 069 654 847 219 302 4 × 2 = 0 + 0.000 000 000 142 615 705 342 139 309 694 438 604 8;
  • 60) 0.000 000 000 142 615 705 342 139 309 694 438 604 8 × 2 = 0 + 0.000 000 000 285 231 410 684 278 619 388 877 209 6;
  • 61) 0.000 000 000 285 231 410 684 278 619 388 877 209 6 × 2 = 0 + 0.000 000 000 570 462 821 368 557 238 777 754 419 2;
  • 62) 0.000 000 000 570 462 821 368 557 238 777 754 419 2 × 2 = 0 + 0.000 000 001 140 925 642 737 114 477 555 508 838 4;
  • 63) 0.000 000 001 140 925 642 737 114 477 555 508 838 4 × 2 = 0 + 0.000 000 002 281 851 285 474 228 955 111 017 676 8;
  • 64) 0.000 000 002 281 851 285 474 228 955 111 017 676 8 × 2 = 0 + 0.000 000 004 563 702 570 948 457 910 222 035 353 6;
  • 65) 0.000 000 004 563 702 570 948 457 910 222 035 353 6 × 2 = 0 + 0.000 000 009 127 405 141 896 915 820 444 070 707 2;
  • 66) 0.000 000 009 127 405 141 896 915 820 444 070 707 2 × 2 = 0 + 0.000 000 018 254 810 283 793 831 640 888 141 414 4;
  • 67) 0.000 000 018 254 810 283 793 831 640 888 141 414 4 × 2 = 0 + 0.000 000 036 509 620 567 587 663 281 776 282 828 8;
  • 68) 0.000 000 036 509 620 567 587 663 281 776 282 828 8 × 2 = 0 + 0.000 000 073 019 241 135 175 326 563 552 565 657 6;
  • 69) 0.000 000 073 019 241 135 175 326 563 552 565 657 6 × 2 = 0 + 0.000 000 146 038 482 270 350 653 127 105 131 315 2;
  • 70) 0.000 000 146 038 482 270 350 653 127 105 131 315 2 × 2 = 0 + 0.000 000 292 076 964 540 701 306 254 210 262 630 4;
  • 71) 0.000 000 292 076 964 540 701 306 254 210 262 630 4 × 2 = 0 + 0.000 000 584 153 929 081 402 612 508 420 525 260 8;
  • 72) 0.000 000 584 153 929 081 402 612 508 420 525 260 8 × 2 = 0 + 0.000 001 168 307 858 162 805 225 016 841 050 521 6;
  • 73) 0.000 001 168 307 858 162 805 225 016 841 050 521 6 × 2 = 0 + 0.000 002 336 615 716 325 610 450 033 682 101 043 2;
  • 74) 0.000 002 336 615 716 325 610 450 033 682 101 043 2 × 2 = 0 + 0.000 004 673 231 432 651 220 900 067 364 202 086 4;
  • 75) 0.000 004 673 231 432 651 220 900 067 364 202 086 4 × 2 = 0 + 0.000 009 346 462 865 302 441 800 134 728 404 172 8;
  • 76) 0.000 009 346 462 865 302 441 800 134 728 404 172 8 × 2 = 0 + 0.000 018 692 925 730 604 883 600 269 456 808 345 6;
  • 77) 0.000 018 692 925 730 604 883 600 269 456 808 345 6 × 2 = 0 + 0.000 037 385 851 461 209 767 200 538 913 616 691 2;
  • 78) 0.000 037 385 851 461 209 767 200 538 913 616 691 2 × 2 = 0 + 0.000 074 771 702 922 419 534 401 077 827 233 382 4;
  • 79) 0.000 074 771 702 922 419 534 401 077 827 233 382 4 × 2 = 0 + 0.000 149 543 405 844 839 068 802 155 654 466 764 8;
  • 80) 0.000 149 543 405 844 839 068 802 155 654 466 764 8 × 2 = 0 + 0.000 299 086 811 689 678 137 604 311 308 933 529 6;
  • 81) 0.000 299 086 811 689 678 137 604 311 308 933 529 6 × 2 = 0 + 0.000 598 173 623 379 356 275 208 622 617 867 059 2;
  • 82) 0.000 598 173 623 379 356 275 208 622 617 867 059 2 × 2 = 0 + 0.001 196 347 246 758 712 550 417 245 235 734 118 4;
  • 83) 0.001 196 347 246 758 712 550 417 245 235 734 118 4 × 2 = 0 + 0.002 392 694 493 517 425 100 834 490 471 468 236 8;
  • 84) 0.002 392 694 493 517 425 100 834 490 471 468 236 8 × 2 = 0 + 0.004 785 388 987 034 850 201 668 980 942 936 473 6;
  • 85) 0.004 785 388 987 034 850 201 668 980 942 936 473 6 × 2 = 0 + 0.009 570 777 974 069 700 403 337 961 885 872 947 2;
  • 86) 0.009 570 777 974 069 700 403 337 961 885 872 947 2 × 2 = 0 + 0.019 141 555 948 139 400 806 675 923 771 745 894 4;
  • 87) 0.019 141 555 948 139 400 806 675 923 771 745 894 4 × 2 = 0 + 0.038 283 111 896 278 801 613 351 847 543 491 788 8;
  • 88) 0.038 283 111 896 278 801 613 351 847 543 491 788 8 × 2 = 0 + 0.076 566 223 792 557 603 226 703 695 086 983 577 6;
  • 89) 0.076 566 223 792 557 603 226 703 695 086 983 577 6 × 2 = 0 + 0.153 132 447 585 115 206 453 407 390 173 967 155 2;
  • 90) 0.153 132 447 585 115 206 453 407 390 173 967 155 2 × 2 = 0 + 0.306 264 895 170 230 412 906 814 780 347 934 310 4;
  • 91) 0.306 264 895 170 230 412 906 814 780 347 934 310 4 × 2 = 0 + 0.612 529 790 340 460 825 813 629 560 695 868 620 8;
  • 92) 0.612 529 790 340 460 825 813 629 560 695 868 620 8 × 2 = 1 + 0.225 059 580 680 921 651 627 259 121 391 737 241 6;
  • 93) 0.225 059 580 680 921 651 627 259 121 391 737 241 6 × 2 = 0 + 0.450 119 161 361 843 303 254 518 242 783 474 483 2;
  • 94) 0.450 119 161 361 843 303 254 518 242 783 474 483 2 × 2 = 0 + 0.900 238 322 723 686 606 509 036 485 566 948 966 4;
  • 95) 0.900 238 322 723 686 606 509 036 485 566 948 966 4 × 2 = 1 + 0.800 476 645 447 373 213 018 072 971 133 897 932 8;
  • 96) 0.800 476 645 447 373 213 018 072 971 133 897 932 8 × 2 = 1 + 0.600 953 290 894 746 426 036 145 942 267 795 865 6;
  • 97) 0.600 953 290 894 746 426 036 145 942 267 795 865 6 × 2 = 1 + 0.201 906 581 789 492 852 072 291 884 535 591 731 2;
  • 98) 0.201 906 581 789 492 852 072 291 884 535 591 731 2 × 2 = 0 + 0.403 813 163 578 985 704 144 583 769 071 183 462 4;
  • 99) 0.403 813 163 578 985 704 144 583 769 071 183 462 4 × 2 = 0 + 0.807 626 327 157 971 408 289 167 538 142 366 924 8;
  • 100) 0.807 626 327 157 971 408 289 167 538 142 366 924 8 × 2 = 1 + 0.615 252 654 315 942 816 578 335 076 284 733 849 6;
  • 101) 0.615 252 654 315 942 816 578 335 076 284 733 849 6 × 2 = 1 + 0.230 505 308 631 885 633 156 670 152 569 467 699 2;
  • 102) 0.230 505 308 631 885 633 156 670 152 569 467 699 2 × 2 = 0 + 0.461 010 617 263 771 266 313 340 305 138 935 398 4;
  • 103) 0.461 010 617 263 771 266 313 340 305 138 935 398 4 × 2 = 0 + 0.922 021 234 527 542 532 626 680 610 277 870 796 8;
  • 104) 0.922 021 234 527 542 532 626 680 610 277 870 796 8 × 2 = 1 + 0.844 042 469 055 085 065 253 361 220 555 741 593 6;
  • 105) 0.844 042 469 055 085 065 253 361 220 555 741 593 6 × 2 = 1 + 0.688 084 938 110 170 130 506 722 441 111 483 187 2;
  • 106) 0.688 084 938 110 170 130 506 722 441 111 483 187 2 × 2 = 1 + 0.376 169 876 220 340 261 013 444 882 222 966 374 4;
  • 107) 0.376 169 876 220 340 261 013 444 882 222 966 374 4 × 2 = 0 + 0.752 339 752 440 680 522 026 889 764 445 932 748 8;
  • 108) 0.752 339 752 440 680 522 026 889 764 445 932 748 8 × 2 = 1 + 0.504 679 504 881 361 044 053 779 528 891 865 497 6;
  • 109) 0.504 679 504 881 361 044 053 779 528 891 865 497 6 × 2 = 1 + 0.009 359 009 762 722 088 107 559 057 783 730 995 2;
  • 110) 0.009 359 009 762 722 088 107 559 057 783 730 995 2 × 2 = 0 + 0.018 718 019 525 444 176 215 118 115 567 461 990 4;
  • 111) 0.018 718 019 525 444 176 215 118 115 567 461 990 4 × 2 = 0 + 0.037 436 039 050 888 352 430 236 231 134 923 980 8;
  • 112) 0.037 436 039 050 888 352 430 236 231 134 923 980 8 × 2 = 0 + 0.074 872 078 101 776 704 860 472 462 269 847 961 6;
  • 113) 0.074 872 078 101 776 704 860 472 462 269 847 961 6 × 2 = 0 + 0.149 744 156 203 553 409 720 944 924 539 695 923 2;
  • 114) 0.149 744 156 203 553 409 720 944 924 539 695 923 2 × 2 = 0 + 0.299 488 312 407 106 819 441 889 849 079 391 846 4;
  • 115) 0.299 488 312 407 106 819 441 889 849 079 391 846 4 × 2 = 0 + 0.598 976 624 814 213 638 883 779 698 158 783 692 8;

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 1(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 1(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 1(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 1 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