Arithmetic & Logic Unit
Within a computer system, Arithemtic is handled by the Arithmetic and Logic Unit also known as the ALU. It performs arithmetic and logic operations on data. While all ALUs handle integers only some may handle real numbers or floating point numbers.
What is Binary?
Binary is a base 2 number system which represents numeric values in either 0 or 1.
What is Unsigned Binary?
Unsigned Binary represents numbers in binary that are non-negative.
How to add numbers in binary?
Adding:
0 + 0 = 0
0 + 1 = 1
1 + 1 = 0 with a carry of 1
1 + 1 + 1 = 1 with a carry of 1
How to multiply numbers in binary?
Multiplication:
0 x 0 = 0
0 x 1 or 1 x 0 = 0
1 x 1 = 1 with no carry bits
How to perform one's complement on a binary number?
Change all 0's to 1's and all 1's to 0's. Example 0110 in one's complement is 1001
How to perform two's complement on a binary number?
First, perform the one's complement on the number and then add 1. Using the example from above, add one to the one's complement of the number. This would give you: 1001 + 1 = 1010
For further reading on the methods used to carry out operations in the ALU you can use the links provided below or use the navigation bar to the left.
Unsigned Binary Multiplication
Booth's Algorithm for Two's Complement Multiplication
Unsigned Binary Division