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;
- 613 438 224 ÷ 2 = 306 719 112 + 0;
- 306 719 112 ÷ 2 = 153 359 556 + 0;
- 153 359 556 ÷ 2 = 76 679 778 + 0;
- 76 679 778 ÷ 2 = 38 339 889 + 0;
- 38 339 889 ÷ 2 = 19 169 944 + 1;
- 19 169 944 ÷ 2 = 9 584 972 + 0;
- 9 584 972 ÷ 2 = 4 792 486 + 0;
- 4 792 486 ÷ 2 = 2 396 243 + 0;
- 2 396 243 ÷ 2 = 1 198 121 + 1;
- 1 198 121 ÷ 2 = 599 060 + 1;
- 599 060 ÷ 2 = 299 530 + 0;
- 299 530 ÷ 2 = 149 765 + 0;
- 149 765 ÷ 2 = 74 882 + 1;
- 74 882 ÷ 2 = 37 441 + 0;
- 37 441 ÷ 2 = 18 720 + 1;
- 18 720 ÷ 2 = 9 360 + 0;
- 9 360 ÷ 2 = 4 680 + 0;
- 4 680 ÷ 2 = 2 340 + 0;
- 2 340 ÷ 2 = 1 170 + 0;
- 1 170 ÷ 2 = 585 + 0;
- 585 ÷ 2 = 292 + 1;
- 292 ÷ 2 = 146 + 0;
- 146 ÷ 2 = 73 + 0;
- 73 ÷ 2 = 36 + 1;
- 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.
613 438 224(10) = 10 0100 1001 0000 0101 0011 0001 0000(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 30.
- 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, 30,
3) so that the first bit (leftmost) could be zero
(we deal with a positive number at this moment)
=== is: 32.
4. Get the positive binary computer representation on 32 bits (4 Bytes):
If needed, add extra 0s in front (to the left) of the base 2 number, up to the required length, 32.
Decimal Number 613 438 224(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.