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;
- 1 011 100 109 999 611 ÷ 2 = 505 550 054 999 805 + 1;
- 505 550 054 999 805 ÷ 2 = 252 775 027 499 902 + 1;
- 252 775 027 499 902 ÷ 2 = 126 387 513 749 951 + 0;
- 126 387 513 749 951 ÷ 2 = 63 193 756 874 975 + 1;
- 63 193 756 874 975 ÷ 2 = 31 596 878 437 487 + 1;
- 31 596 878 437 487 ÷ 2 = 15 798 439 218 743 + 1;
- 15 798 439 218 743 ÷ 2 = 7 899 219 609 371 + 1;
- 7 899 219 609 371 ÷ 2 = 3 949 609 804 685 + 1;
- 3 949 609 804 685 ÷ 2 = 1 974 804 902 342 + 1;
- 1 974 804 902 342 ÷ 2 = 987 402 451 171 + 0;
- 987 402 451 171 ÷ 2 = 493 701 225 585 + 1;
- 493 701 225 585 ÷ 2 = 246 850 612 792 + 1;
- 246 850 612 792 ÷ 2 = 123 425 306 396 + 0;
- 123 425 306 396 ÷ 2 = 61 712 653 198 + 0;
- 61 712 653 198 ÷ 2 = 30 856 326 599 + 0;
- 30 856 326 599 ÷ 2 = 15 428 163 299 + 1;
- 15 428 163 299 ÷ 2 = 7 714 081 649 + 1;
- 7 714 081 649 ÷ 2 = 3 857 040 824 + 1;
- 3 857 040 824 ÷ 2 = 1 928 520 412 + 0;
- 1 928 520 412 ÷ 2 = 964 260 206 + 0;
- 964 260 206 ÷ 2 = 482 130 103 + 0;
- 482 130 103 ÷ 2 = 241 065 051 + 1;
- 241 065 051 ÷ 2 = 120 532 525 + 1;
- 120 532 525 ÷ 2 = 60 266 262 + 1;
- 60 266 262 ÷ 2 = 30 133 131 + 0;
- 30 133 131 ÷ 2 = 15 066 565 + 1;
- 15 066 565 ÷ 2 = 7 533 282 + 1;
- 7 533 282 ÷ 2 = 3 766 641 + 0;
- 3 766 641 ÷ 2 = 1 883 320 + 1;
- 1 883 320 ÷ 2 = 941 660 + 0;
- 941 660 ÷ 2 = 470 830 + 0;
- 470 830 ÷ 2 = 235 415 + 0;
- 235 415 ÷ 2 = 117 707 + 1;
- 117 707 ÷ 2 = 58 853 + 1;
- 58 853 ÷ 2 = 29 426 + 1;
- 29 426 ÷ 2 = 14 713 + 0;
- 14 713 ÷ 2 = 7 356 + 1;
- 7 356 ÷ 2 = 3 678 + 0;
- 3 678 ÷ 2 = 1 839 + 0;
- 1 839 ÷ 2 = 919 + 1;
- 919 ÷ 2 = 459 + 1;
- 459 ÷ 2 = 229 + 1;
- 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;
2. Construct the base 2 representation of the positive number:
Take all the remainders starting from the bottom of the list constructed above.
1 011 100 109 999 611(10) = 11 1001 0111 1001 0111 0001 0110 1110 0011 1000 1101 1111 1011(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 50.
- A signed binary's bit length must be equal to a power of 2, as of:
- 21 = 2; 22 = 4; 23 = 8; 24 = 16; 25 = 32; 26 = 64; ...
- The first bit (the leftmost) indicates the sign:
- 0 = positive integer number, 1 = negative integer number
The least number that is:
1) a power of 2
2) and is larger than the actual length, 50,
3) so that the first bit (leftmost) could be zero
(we deal with a positive number at this moment)
=== is: 64.
4. Get the positive binary computer representation on 64 bits (8 Bytes):
If needed, add extra 0s in front (to the left) of the base 2 number, up to the required length, 64.
Decimal Number 1 011 100 109 999 611(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.