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;
- 110 011 111 001 097 ÷ 2 = 55 005 555 500 548 + 1;
- 55 005 555 500 548 ÷ 2 = 27 502 777 750 274 + 0;
- 27 502 777 750 274 ÷ 2 = 13 751 388 875 137 + 0;
- 13 751 388 875 137 ÷ 2 = 6 875 694 437 568 + 1;
- 6 875 694 437 568 ÷ 2 = 3 437 847 218 784 + 0;
- 3 437 847 218 784 ÷ 2 = 1 718 923 609 392 + 0;
- 1 718 923 609 392 ÷ 2 = 859 461 804 696 + 0;
- 859 461 804 696 ÷ 2 = 429 730 902 348 + 0;
- 429 730 902 348 ÷ 2 = 214 865 451 174 + 0;
- 214 865 451 174 ÷ 2 = 107 432 725 587 + 0;
- 107 432 725 587 ÷ 2 = 53 716 362 793 + 1;
- 53 716 362 793 ÷ 2 = 26 858 181 396 + 1;
- 26 858 181 396 ÷ 2 = 13 429 090 698 + 0;
- 13 429 090 698 ÷ 2 = 6 714 545 349 + 0;
- 6 714 545 349 ÷ 2 = 3 357 272 674 + 1;
- 3 357 272 674 ÷ 2 = 1 678 636 337 + 0;
- 1 678 636 337 ÷ 2 = 839 318 168 + 1;
- 839 318 168 ÷ 2 = 419 659 084 + 0;
- 419 659 084 ÷ 2 = 209 829 542 + 0;
- 209 829 542 ÷ 2 = 104 914 771 + 0;
- 104 914 771 ÷ 2 = 52 457 385 + 1;
- 52 457 385 ÷ 2 = 26 228 692 + 1;
- 26 228 692 ÷ 2 = 13 114 346 + 0;
- 13 114 346 ÷ 2 = 6 557 173 + 0;
- 6 557 173 ÷ 2 = 3 278 586 + 1;
- 3 278 586 ÷ 2 = 1 639 293 + 0;
- 1 639 293 ÷ 2 = 819 646 + 1;
- 819 646 ÷ 2 = 409 823 + 0;
- 409 823 ÷ 2 = 204 911 + 1;
- 204 911 ÷ 2 = 102 455 + 1;
- 102 455 ÷ 2 = 51 227 + 1;
- 51 227 ÷ 2 = 25 613 + 1;
- 25 613 ÷ 2 = 12 806 + 1;
- 12 806 ÷ 2 = 6 403 + 0;
- 6 403 ÷ 2 = 3 201 + 1;
- 3 201 ÷ 2 = 1 600 + 1;
- 1 600 ÷ 2 = 800 + 0;
- 800 ÷ 2 = 400 + 0;
- 400 ÷ 2 = 200 + 0;
- 200 ÷ 2 = 100 + 0;
- 100 ÷ 2 = 50 + 0;
- 50 ÷ 2 = 25 + 0;
- 25 ÷ 2 = 12 + 1;
- 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.
110 011 111 001 097(10) = 110 0100 0000 1101 1111 0101 0011 0001 0100 1100 0000 1001(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 47.
- 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, 47,
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 110 011 111 001 097(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.