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;
- 571 800 992 ÷ 2 = 285 900 496 + 0;
- 285 900 496 ÷ 2 = 142 950 248 + 0;
- 142 950 248 ÷ 2 = 71 475 124 + 0;
- 71 475 124 ÷ 2 = 35 737 562 + 0;
- 35 737 562 ÷ 2 = 17 868 781 + 0;
- 17 868 781 ÷ 2 = 8 934 390 + 1;
- 8 934 390 ÷ 2 = 4 467 195 + 0;
- 4 467 195 ÷ 2 = 2 233 597 + 1;
- 2 233 597 ÷ 2 = 1 116 798 + 1;
- 1 116 798 ÷ 2 = 558 399 + 0;
- 558 399 ÷ 2 = 279 199 + 1;
- 279 199 ÷ 2 = 139 599 + 1;
- 139 599 ÷ 2 = 69 799 + 1;
- 69 799 ÷ 2 = 34 899 + 1;
- 34 899 ÷ 2 = 17 449 + 1;
- 17 449 ÷ 2 = 8 724 + 1;
- 8 724 ÷ 2 = 4 362 + 0;
- 4 362 ÷ 2 = 2 181 + 0;
- 2 181 ÷ 2 = 1 090 + 1;
- 1 090 ÷ 2 = 545 + 0;
- 545 ÷ 2 = 272 + 1;
- 272 ÷ 2 = 136 + 0;
- 136 ÷ 2 = 68 + 0;
- 68 ÷ 2 = 34 + 0;
- 34 ÷ 2 = 17 + 0;
- 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.
571 800 992(10) = 10 0010 0001 0100 1111 1101 1010 0000(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 571 800 992(10) converted to signed binary in one's complement representation: