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;
- 26 087 112 740 ÷ 2 = 13 043 556 370 + 0;
- 13 043 556 370 ÷ 2 = 6 521 778 185 + 0;
- 6 521 778 185 ÷ 2 = 3 260 889 092 + 1;
- 3 260 889 092 ÷ 2 = 1 630 444 546 + 0;
- 1 630 444 546 ÷ 2 = 815 222 273 + 0;
- 815 222 273 ÷ 2 = 407 611 136 + 1;
- 407 611 136 ÷ 2 = 203 805 568 + 0;
- 203 805 568 ÷ 2 = 101 902 784 + 0;
- 101 902 784 ÷ 2 = 50 951 392 + 0;
- 50 951 392 ÷ 2 = 25 475 696 + 0;
- 25 475 696 ÷ 2 = 12 737 848 + 0;
- 12 737 848 ÷ 2 = 6 368 924 + 0;
- 6 368 924 ÷ 2 = 3 184 462 + 0;
- 3 184 462 ÷ 2 = 1 592 231 + 0;
- 1 592 231 ÷ 2 = 796 115 + 1;
- 796 115 ÷ 2 = 398 057 + 1;
- 398 057 ÷ 2 = 199 028 + 1;
- 199 028 ÷ 2 = 99 514 + 0;
- 99 514 ÷ 2 = 49 757 + 0;
- 49 757 ÷ 2 = 24 878 + 1;
- 24 878 ÷ 2 = 12 439 + 0;
- 12 439 ÷ 2 = 6 219 + 1;
- 6 219 ÷ 2 = 3 109 + 1;
- 3 109 ÷ 2 = 1 554 + 1;
- 1 554 ÷ 2 = 777 + 0;
- 777 ÷ 2 = 388 + 1;
- 388 ÷ 2 = 194 + 0;
- 194 ÷ 2 = 97 + 0;
- 97 ÷ 2 = 48 + 1;
- 48 ÷ 2 = 24 + 0;
- 24 ÷ 2 = 12 + 0;
- 12 ÷ 2 = 6 + 0;
- 6 ÷ 2 = 3 + 0;
- 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.
26 087 112 740(10) = 110 0001 0010 1110 1001 1100 0000 0010 0100(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 35.
- 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, 35,
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 26 087 112 740(10) converted to signed binary in one's complement representation: