Question: For this lab you will implement a basic 4 - bit ALU. Our ALU will take in two 4 - bit inputs, perform a selected

For this lab you will implement a basic 4-bit ALU. Our ALU will take in two 4-bit inputs,
perform a selected operation, then output the result. The four operations our ALU will
implement will be: ADD, AND, NOT, and EQUALITY
Getting Started
Open the provided Lab_2_template project in Logisim. You'll see several inputs and outputs
already added to the circuit. They are:
Two 4-bit pins for the ALU inputs
One 2-bit pin for selecting the ALU operation
One 4-bit pin for the ALU output
One 1-bit pin to store the carry bit of an ADD operation
Using only simple logic gates, implement each of the four operations. Each operation should
receive its input data from the same two 4-bit ALU input pins and output its result to the 4-
bit ALU output pin. You will use a multiplexer to select which operations output is stored in
the ALU output pin. Implementing the ADD operation
The ADD operation will sum the values of ALU_input_a and ALU_input_b. The result of
the summation will be stored in ALU_output and the final carry bit will be stored in
ADD_carry. The ADD result will only be stored when ALU_select is 00. If the ADD
operation is not selected, the ADD portion of the circuit should not affect the value of
ALU_output in anyway. If ADD is not selected, the value of ADD_carry should be 0.
Hint: As mentioned in the lecture slides, chaining multiple 1-bit adders together allows for
multibit numbers to be summed.
Implementing the AND operation
The AND operation will perform a logical AND operation on the values of ALU_input_a
and ALU_input_b. The result of the logical AND will be stored in ALU_output. The AND
result will only be stored when ALU_select is 01. If the AND operation is not selected, the
AND portion of the circuit should not affect the value of ALU_output in anyway.
Implementing the NOT operation
The NOT operation will perform a logical NOT operation on the value of ALU_input_a.
The result of the logical NOT will be stored in ALU_output. The NOT result will only be
stored when ALU_select is 10. If the NOT operation is not selected, the NOT portion of the
circuit should not affect the value of ALU_output in anyway.
Implementing the EQUALITY operation
The EQUALITY operation will compare the values of ALU_input_a and ALU_input_b and
determine if they are equal. If the two input values are the same, ALU_output should be all
0s. If the values are not equal ALU_output should be a non-zero value. Note is does not
matter what the specific output of the EQUALITY operation is when two values are not
equal, just as long as the output is non-zero. The EQUALITY result will only be stored
when ALU_select is 11. If the EQUALITY operation is not selected, the EQUALITY
portion of the circuit should not affect the value of ALU_output in anyway.
Hint: For the AND, NOT, and EQUALITY operations, do not overcomplicate your
solutions. You can start by developing a truth table for the operation then design the circuit
Build a Multiplexer
Lastly, create a 4-bit, 4 to 1 multiplexer circuit. Using only simple logic gates, build a
multiplexer circuit so that each combination of ALU_select connections a different
operation to ALU_output. Note that while similar to the multiplexer from Lab 1, the inputs
and output of this multiplexer are 4 bits wide rather than 1 bit wide
For this lab you will implement a basic 4 - bit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!