1. Divide the number repeatedly by 2:
Keep track of each remainder.
Stop when you get a quotient that is equal to zero.
- division = quotient + remainder;
- 11 000 012 323 ÷ 2 = 5 500 006 161 + 1;
- 5 500 006 161 ÷ 2 = 2 750 003 080 + 1;
- 2 750 003 080 ÷ 2 = 1 375 001 540 + 0;
- 1 375 001 540 ÷ 2 = 687 500 770 + 0;
- 687 500 770 ÷ 2 = 343 750 385 + 0;
- 343 750 385 ÷ 2 = 171 875 192 + 1;
- 171 875 192 ÷ 2 = 85 937 596 + 0;
- 85 937 596 ÷ 2 = 42 968 798 + 0;
- 42 968 798 ÷ 2 = 21 484 399 + 0;
- 21 484 399 ÷ 2 = 10 742 199 + 1;
- 10 742 199 ÷ 2 = 5 371 099 + 1;
- 5 371 099 ÷ 2 = 2 685 549 + 1;
- 2 685 549 ÷ 2 = 1 342 774 + 1;
- 1 342 774 ÷ 2 = 671 387 + 0;
- 671 387 ÷ 2 = 335 693 + 1;
- 335 693 ÷ 2 = 167 846 + 1;
- 167 846 ÷ 2 = 83 923 + 0;
- 83 923 ÷ 2 = 41 961 + 1;
- 41 961 ÷ 2 = 20 980 + 1;
- 20 980 ÷ 2 = 10 490 + 0;
- 10 490 ÷ 2 = 5 245 + 0;
- 5 245 ÷ 2 = 2 622 + 1;
- 2 622 ÷ 2 = 1 311 + 0;
- 1 311 ÷ 2 = 655 + 1;
- 655 ÷ 2 = 327 + 1;
- 327 ÷ 2 = 163 + 1;
- 163 ÷ 2 = 81 + 1;
- 81 ÷ 2 = 40 + 1;
- 40 ÷ 2 = 20 + 0;
- 20 ÷ 2 = 10 + 0;
- 10 ÷ 2 = 5 + 0;
- 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.
11 000 012 323(10) = 10 1000 1111 1010 0110 1101 1110 0010 0011(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 34.
- 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, 34,
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 11 000 012 323(10) converted to signed binary in one's complement representation: