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;
- 261 073 230 707 ÷ 2 = 130 536 615 353 + 1;
- 130 536 615 353 ÷ 2 = 65 268 307 676 + 1;
- 65 268 307 676 ÷ 2 = 32 634 153 838 + 0;
- 32 634 153 838 ÷ 2 = 16 317 076 919 + 0;
- 16 317 076 919 ÷ 2 = 8 158 538 459 + 1;
- 8 158 538 459 ÷ 2 = 4 079 269 229 + 1;
- 4 079 269 229 ÷ 2 = 2 039 634 614 + 1;
- 2 039 634 614 ÷ 2 = 1 019 817 307 + 0;
- 1 019 817 307 ÷ 2 = 509 908 653 + 1;
- 509 908 653 ÷ 2 = 254 954 326 + 1;
- 254 954 326 ÷ 2 = 127 477 163 + 0;
- 127 477 163 ÷ 2 = 63 738 581 + 1;
- 63 738 581 ÷ 2 = 31 869 290 + 1;
- 31 869 290 ÷ 2 = 15 934 645 + 0;
- 15 934 645 ÷ 2 = 7 967 322 + 1;
- 7 967 322 ÷ 2 = 3 983 661 + 0;
- 3 983 661 ÷ 2 = 1 991 830 + 1;
- 1 991 830 ÷ 2 = 995 915 + 0;
- 995 915 ÷ 2 = 497 957 + 1;
- 497 957 ÷ 2 = 248 978 + 1;
- 248 978 ÷ 2 = 124 489 + 0;
- 124 489 ÷ 2 = 62 244 + 1;
- 62 244 ÷ 2 = 31 122 + 0;
- 31 122 ÷ 2 = 15 561 + 0;
- 15 561 ÷ 2 = 7 780 + 1;
- 7 780 ÷ 2 = 3 890 + 0;
- 3 890 ÷ 2 = 1 945 + 0;
- 1 945 ÷ 2 = 972 + 1;
- 972 ÷ 2 = 486 + 0;
- 486 ÷ 2 = 243 + 0;
- 243 ÷ 2 = 121 + 1;
- 121 ÷ 2 = 60 + 1;
- 60 ÷ 2 = 30 + 0;
- 30 ÷ 2 = 15 + 0;
- 15 ÷ 2 = 7 + 1;
- 7 ÷ 2 = 3 + 1;
- 3 ÷ 2 = 1 + 1;
- 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.
261 073 230 707(10) = 11 1100 1100 1001 0010 1101 0101 1011 0111 0011(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 38.
- 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, 38,
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 261 073 230 707(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.