LEC 2 ALU
LEC 2 ALU
Arithmetic Circuit
This circuit cannot handle the carry input, so it is termed as half adder.
Full Adder:
A full adder is a combinational circuit that forms the arithmetic sum of three bits. It consists of three
inputs and two outputs. Two of the input variables, denoted by x and y, represent the two bits to be added.
The third input Z, represents the carry from the previous lower position.
The two outputs are designated by the symbols S for sum and C for carry.
The circuit diagram full adder is shown in the figure. n-such single bit full adder blocks are used to make
n-bit full adder.
To demonstrate the binary addition of four bit numbers, let us consider a specific example.
Consider two binary numbers
A =1 0 0 1 B=0011
To get the four bit adder, we have to use 4 full adder block. The carry output the lower bit is used as a
carry input to the next higher bit.
The circuit of 4-bit adder shown in the figure.
Binary subtractor : The subtraction operation can be implemented with the help of binary adder circuit,
because
We know that 2's complement representation of a number is treated as a negative number of the given
number.
We can get the 2's complements of a given number by complementing each bit and adding 1 to it.
The circuit for subtracting A-B consist of an added with inverter placed between each data input B and the
corresponding input of the full adder. The input carry must be equal to 1 when performing subtraction.
The operation thus performed becomes A, plus the 1's complement of B , plus 1. This is equal to A plus 2's
complement of B. With this principle, a single circuit can be used for both addition and subtraction.
If , then
If then then (A+1's complement of B+1
Multiplication
Multiplication of two numbers in binary representation can be performed by a process of SHIFT and
ADD operations. Since the binary number system allows only 0 and 1's, the digit multiplication can be
replaced by SHIFT and ADD operation only, because multiplying by 1 gives the number itself and
multiplying by 0 produces 0 only.
For example.
The process consists of looking at successive bits of the multiplier, least significant bit first. If the
multiplier bit is a 1, the multiplicand is copied down, otherwise, zeros are copied down. The numbers
copied down in successive lines are shifted one position to the left from the previous number. Finally, the
numbers are added and their sum forms the product.