34 Alu Assg
34 Alu Assg
Lab Tasks:
Half adder:
Half adder is the simplest of all adder circuits. Half adder is a
combinational arithmetic circuit that adds two numbers and produces a
sum bit (s) and carry bit (c) both as output. The addition of 2 bits is done
using a combination circuit called a Half adder. The input variables are
augend and addend bits and output variables are sum & carry bits. A and
B are the two input bits.
let us consider two input bits A and B, then sum bit (s) is the X-OR of A
and B. it is evident from the function of a half adder that it requires one
X-OR gate and one AND gate for its construction.
Full Adder:
The half adder is used to add only two numbers. To overcome this
problem, the full adder was developed. The full adder is used to add
three 1-bit binary numbers A, B, and carry C. The full adder has three
input states and two output states e.g( sum and carry).
In the above table:
'A' and B' are the input variables. These variables represent the two bits
which are going to be added
Cin is the third input which represents the carry. From the previous
lower significant position, the carry bit is fetched.
The 'Sum' and 'Carry' define the output values.
The eight rows under the input variable designate all possible
combinations of 0 and 1 that can occur in these variables.
1-Bit ALU:
A one-bit ALU (Arithmetic Logic Unit) is a digital circuit that performs
arithmetic and logical operations on one-bit binary numbers. It is a
fundamental component in computer processors and CPUs.
4-Bit ALU:
The provided truth table depicts the behavior of a 4-bit Arithmetic Logic Unit
(ALU). This ALU is responsible for executing various operations on two 4-bit
inputs, denoted as A and B, resulting in an output determined by the control signal,
S. Its purpose encompasses operations like addition, subtraction, and logical
operations.
The ALU operates through four control signals, namely S[2], S[1], and S[0], which
determine the specific operation to be carried out. The output of the ALU is
represented in the "Output" column.
For instance, when S[2:0] is equal to 000, the circuit executes a logical AND
operation on A and B, producing an output of 0. Alternatively, when S[2:0] is
equal to 101, the circuit performs an addition operation on A and B, resulting in an
output of 0000.
TRUTH TABLE:
A B S OUTPUT
0000 0000 000 0
0000 0000 1 0
- - - -
- - - -
1111 1111 101 0000
1111 1111 110 1110
1111 1111 111 0000
CIRCUIT DIAGRAM: