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;
- 292 188 197 ÷ 2 = 146 094 098 + 1;
- 146 094 098 ÷ 2 = 73 047 049 + 0;
- 73 047 049 ÷ 2 = 36 523 524 + 1;
- 36 523 524 ÷ 2 = 18 261 762 + 0;
- 18 261 762 ÷ 2 = 9 130 881 + 0;
- 9 130 881 ÷ 2 = 4 565 440 + 1;
- 4 565 440 ÷ 2 = 2 282 720 + 0;
- 2 282 720 ÷ 2 = 1 141 360 + 0;
- 1 141 360 ÷ 2 = 570 680 + 0;
- 570 680 ÷ 2 = 285 340 + 0;
- 285 340 ÷ 2 = 142 670 + 0;
- 142 670 ÷ 2 = 71 335 + 0;
- 71 335 ÷ 2 = 35 667 + 1;
- 35 667 ÷ 2 = 17 833 + 1;
- 17 833 ÷ 2 = 8 916 + 1;
- 8 916 ÷ 2 = 4 458 + 0;
- 4 458 ÷ 2 = 2 229 + 0;
- 2 229 ÷ 2 = 1 114 + 1;
- 1 114 ÷ 2 = 557 + 0;
- 557 ÷ 2 = 278 + 1;
- 278 ÷ 2 = 139 + 0;
- 139 ÷ 2 = 69 + 1;
- 69 ÷ 2 = 34 + 1;
- 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.
292 188 197(10) = 1 0001 0110 1010 0111 0000 0010 0101(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 29.
- 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, 29,
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 292 188 197(10) converted to signed binary in one's complement representation: