If we know how to add two unsigned binary numbers together, and how to convert from 2's complement to decimal, we almost know everything about computer arithmetic for integers. Subtraction is done by negating the second number and adding it to the first. Multiplication is done by repeatedly adding one of the numbers to an ongoing sum while counting, and the division is done by repeatedly subtracting one of the numbers from the dividend while counting. |