NOTE: The following methods return only the integer part of the result. No fractions, decimals, or remainders will be returned.
In binary, just shift one place to the right. (Example: 1101001 changes to 110100)
The following algorithm is for decimal. However, it can be used as a model to construct an algorithm for taking half of any number N in any even base.
If first digit is | Even | Even | Even | Even | Even | Odd | Odd | Odd | Odd | Odd |
---|---|---|---|---|---|---|---|---|---|---|
And second digit is | 0 or 1 | 2 or 3 | 4 or 5 | 6 or 7 | 8 or 9 | 0 or 1 | 2 or 3 | 4 or 5 | 6 or 7 | 8 or 9 |
Write | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Example: 1738/2=?
Write 01738. We will now work on finding the result.