ExptNo.9
ExptNo.9
Experiment No.9
Aim: To implement 4-bit ALU design.
Theory: ALU or Arithmetic Logical Unit is a digital circuit to do arithmetic operations like
addition, subtraction, division, multiplication and logical operations like and, OR, XOR, NAND,
NOR etc. A simple block diagram of a 4 bit ALU for operations AND, OR, XOR and ADD is shown
below:
Design Issues:
The circuit functionality of a 1 bit ALU is shown here, depending upon the control signal
S1 and S0 the circuit operates as follows:
DEPARTMENT OF COMPUTER ENGINEERING
SUB: DIGITAL LOGIC AND COMPUTER ARCHITETURE
Procedure:
1. Start the simulator as directed. This simulator supports 5-valued logic.
2. To design the circuit, we need 4 1-bit ALU, 11 Bit switch (to give input, which will toggle
its value with a double click), 5 Bit displays (for seeing output), wires.
4. For 1-bit ALU input A0 is in pin-9, B0 is in pin-10, C0 is in pin-11 (this is input carry), for
selection of operation, S0 is in pin-12, S1 is in pin-13, output F is in pin-8 and output
carry is pin-7
5. Click on the 1-bit ALU component (in the Other Component drawer in the pallet) and
then click on the position of the editor window where you want to add the component
(no drag and drop, simple click will serve the purpose), likewise add 3 more 1-bit ALU
(from the Other Component drawer in the pallet), 11 Bit switches and 5 Bit Displays
(from Display and Input drawer of the pallet, if it is not seen scroll down in the drawer),
3 digital display and 1 bit Displays (from Display and Input drawer of the pallet, if it is
not seen scroll down in the drawer)
6. To connect any two components, select the Connection menu of Palette, and then
click on the Source terminal and click on the target terminal. According to the circuit
diagram connect all the components. Connect the Bit switches with the inputs and Bit
displays component with the outputs. After the connection is over click the selection
tool in the pallete.
7. See the output, in the screenshot diagram we have given the value of S1 S0=11 which
will perform add operation and two number input as A0 A1 A2 A3=0010 and B0 B1 B2
B3=0100 so get output F0 F1 F2 F3=0110 as sum and 0 as carry which is indeed an add
operation. you can also use many other combination of different values and check the
DEPARTMENT OF COMPUTER ENGINEERING
SUB: DIGITAL LOGIC AND COMPUTER ARCHITETURE
result. The operations are implemented using the truth table for 4 bit ALU given in the
theory.