Arithmetic operations are performed by using Boolean Gates in a register.
A register consists of 32 or 64 bits usually.
For eg we want to add two single bits A and B.
We have
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Now, clearly
Sum = A (xor) B; and
Carry = A (and) B
If you are adding more than one bit (8 bit, say).
Then you need 8 such operations.
Carry from one bit will be forwarded to another bit and would be taken into consideration.
Then
Sum = A (xor) B (xor) Cprev
Carry(new) = A (and) B + B (and) Cprev + A (and) Cprev
+ = (or)
. = (and)
forward slash /
The ALU (Arithmetic/Logic Unit)
ALU
In computing, an arithmetic logic unit ( ALU) is a digital circuit that performs arithmetic and logical operations.
the arithmetic logic unit
ALU
The ALU (arithmetic logic unit) An ALU loads data from input registres, an external Control Unit then tells the ALU what operation to perform on that data, and then the ALU stores its result into an output register. Other mechanisms move data between these registers and memory.
There is a special part of the CPU that performs Arithmetic and Logical calculations. Its called Arithmetic Logic Unit ( ALU ).
The unit that performs the arithmetic and logical operations within the processor is called the Arithmetic Logic Unit (ALU).
Things that can count.
The ALU performs arithmetic and logic operations. ALU stands for Arithmetic Logic Unit.
The "arithmetic logic unit" performs these operations in classical standard microprocessor architectures
ALU
logic unit
forward slash /
The ALU (Arithmetic/Logic Unit)
The bitwise & operator performs a bitwise AND operation. The bitwise ^ operator performs a bitwise exclusive OR operation. The bitwise | operator performs a bitwise inclusive OR operation.