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;
- 601 111 710 ÷ 2 = 300 555 855 + 0;
- 300 555 855 ÷ 2 = 150 277 927 + 1;
- 150 277 927 ÷ 2 = 75 138 963 + 1;
- 75 138 963 ÷ 2 = 37 569 481 + 1;
- 37 569 481 ÷ 2 = 18 784 740 + 1;
- 18 784 740 ÷ 2 = 9 392 370 + 0;
- 9 392 370 ÷ 2 = 4 696 185 + 0;
- 4 696 185 ÷ 2 = 2 348 092 + 1;
- 2 348 092 ÷ 2 = 1 174 046 + 0;
- 1 174 046 ÷ 2 = 587 023 + 0;
- 587 023 ÷ 2 = 293 511 + 1;
- 293 511 ÷ 2 = 146 755 + 1;
- 146 755 ÷ 2 = 73 377 + 1;
- 73 377 ÷ 2 = 36 688 + 1;
- 36 688 ÷ 2 = 18 344 + 0;
- 18 344 ÷ 2 = 9 172 + 0;
- 9 172 ÷ 2 = 4 586 + 0;
- 4 586 ÷ 2 = 2 293 + 0;
- 2 293 ÷ 2 = 1 146 + 1;
- 1 146 ÷ 2 = 573 + 0;
- 573 ÷ 2 = 286 + 1;
- 286 ÷ 2 = 143 + 0;
- 143 ÷ 2 = 71 + 1;
- 71 ÷ 2 = 35 + 1;
- 35 ÷ 2 = 17 + 1;
- 17 ÷ 2 = 8 + 1;
- 8 ÷ 2 = 4 + 0;
- 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.
601 111 710(10) = 10 0011 1101 0100 0011 1100 1001 1110(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 30.
- 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, 30,
3) so that the first bit (leftmost) could be zero
(we deal with a positive number at this moment)
=== is: 32.
4. Get the positive binary computer representation on 32 bits (4 Bytes):
If needed, add extra 0s in front (to the left) of the base 2 number, up to the required length, 32.
Decimal Number 601 111 710(10) converted to signed binary in one's complement representation: