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;
- 10 011 011 000 467 ÷ 2 = 5 005 505 500 233 + 1;
- 5 005 505 500 233 ÷ 2 = 2 502 752 750 116 + 1;
- 2 502 752 750 116 ÷ 2 = 1 251 376 375 058 + 0;
- 1 251 376 375 058 ÷ 2 = 625 688 187 529 + 0;
- 625 688 187 529 ÷ 2 = 312 844 093 764 + 1;
- 312 844 093 764 ÷ 2 = 156 422 046 882 + 0;
- 156 422 046 882 ÷ 2 = 78 211 023 441 + 0;
- 78 211 023 441 ÷ 2 = 39 105 511 720 + 1;
- 39 105 511 720 ÷ 2 = 19 552 755 860 + 0;
- 19 552 755 860 ÷ 2 = 9 776 377 930 + 0;
- 9 776 377 930 ÷ 2 = 4 888 188 965 + 0;
- 4 888 188 965 ÷ 2 = 2 444 094 482 + 1;
- 2 444 094 482 ÷ 2 = 1 222 047 241 + 0;
- 1 222 047 241 ÷ 2 = 611 023 620 + 1;
- 611 023 620 ÷ 2 = 305 511 810 + 0;
- 305 511 810 ÷ 2 = 152 755 905 + 0;
- 152 755 905 ÷ 2 = 76 377 952 + 1;
- 76 377 952 ÷ 2 = 38 188 976 + 0;
- 38 188 976 ÷ 2 = 19 094 488 + 0;
- 19 094 488 ÷ 2 = 9 547 244 + 0;
- 9 547 244 ÷ 2 = 4 773 622 + 0;
- 4 773 622 ÷ 2 = 2 386 811 + 0;
- 2 386 811 ÷ 2 = 1 193 405 + 1;
- 1 193 405 ÷ 2 = 596 702 + 1;
- 596 702 ÷ 2 = 298 351 + 0;
- 298 351 ÷ 2 = 149 175 + 1;
- 149 175 ÷ 2 = 74 587 + 1;
- 74 587 ÷ 2 = 37 293 + 1;
- 37 293 ÷ 2 = 18 646 + 1;
- 18 646 ÷ 2 = 9 323 + 0;
- 9 323 ÷ 2 = 4 661 + 1;
- 4 661 ÷ 2 = 2 330 + 1;
- 2 330 ÷ 2 = 1 165 + 0;
- 1 165 ÷ 2 = 582 + 1;
- 582 ÷ 2 = 291 + 0;
- 291 ÷ 2 = 145 + 1;
- 145 ÷ 2 = 72 + 1;
- 72 ÷ 2 = 36 + 0;
- 36 ÷ 2 = 18 + 0;
- 18 ÷ 2 = 9 + 0;
- 9 ÷ 2 = 4 + 1;
- 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.
10 011 011 000 467(10) = 1001 0001 1010 1101 1110 1100 0001 0010 1000 1001 0011(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 44.
- 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, 44,
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 10 011 011 000 467(10) converted to signed binary in one's complement representation: