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;
- 290 043 214 572 ÷ 2 = 145 021 607 286 + 0;
- 145 021 607 286 ÷ 2 = 72 510 803 643 + 0;
- 72 510 803 643 ÷ 2 = 36 255 401 821 + 1;
- 36 255 401 821 ÷ 2 = 18 127 700 910 + 1;
- 18 127 700 910 ÷ 2 = 9 063 850 455 + 0;
- 9 063 850 455 ÷ 2 = 4 531 925 227 + 1;
- 4 531 925 227 ÷ 2 = 2 265 962 613 + 1;
- 2 265 962 613 ÷ 2 = 1 132 981 306 + 1;
- 1 132 981 306 ÷ 2 = 566 490 653 + 0;
- 566 490 653 ÷ 2 = 283 245 326 + 1;
- 283 245 326 ÷ 2 = 141 622 663 + 0;
- 141 622 663 ÷ 2 = 70 811 331 + 1;
- 70 811 331 ÷ 2 = 35 405 665 + 1;
- 35 405 665 ÷ 2 = 17 702 832 + 1;
- 17 702 832 ÷ 2 = 8 851 416 + 0;
- 8 851 416 ÷ 2 = 4 425 708 + 0;
- 4 425 708 ÷ 2 = 2 212 854 + 0;
- 2 212 854 ÷ 2 = 1 106 427 + 0;
- 1 106 427 ÷ 2 = 553 213 + 1;
- 553 213 ÷ 2 = 276 606 + 1;
- 276 606 ÷ 2 = 138 303 + 0;
- 138 303 ÷ 2 = 69 151 + 1;
- 69 151 ÷ 2 = 34 575 + 1;
- 34 575 ÷ 2 = 17 287 + 1;
- 17 287 ÷ 2 = 8 643 + 1;
- 8 643 ÷ 2 = 4 321 + 1;
- 4 321 ÷ 2 = 2 160 + 1;
- 2 160 ÷ 2 = 1 080 + 0;
- 1 080 ÷ 2 = 540 + 0;
- 540 ÷ 2 = 270 + 0;
- 270 ÷ 2 = 135 + 0;
- 135 ÷ 2 = 67 + 1;
- 67 ÷ 2 = 33 + 1;
- 33 ÷ 2 = 16 + 1;
- 16 ÷ 2 = 8 + 0;
- 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.
290 043 214 572(10) = 100 0011 1000 0111 1110 1100 0011 1010 1110 1100(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 39.
- 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, 39,
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 290 043 214 572(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.