|CS 354||Computer Organization and Systems||Fall 2017|
Project 5 - Arithmetic Logic Unit (ALU) Circuitry
In this project you will create a functioning 4-bit Arithmetic Logic Unit using logisim.
Arithmetic Logic Unit
At the very heart of computers is their ability to compute logical operations that can be interpreted as arithmetic computations. The part of the computer that performs these operations is called the Arithmetic Logic Unit or just simply the ALU. This is described in section C.5 in Appendix C of your text.
Let's think abstractly about the ALU for now. The figure above shows a 1-bit ALU as described in your text. Ignore the internal components and focus on the interface (inputs and outputs). The ALU has several inputs:
While it is often useful to think of the CPU as a black box, the goal of this course is for you to see all the gory details! Let's actually see how an ALU performs the computations and why they are correct. Underneath the interface layer, the main components of the ALU are:
Recall that a MUX allows the selection of one of 2n data inputs from n control inputs. The figure below shows how a MUX can be constructed using NOT and AND gates. Note the pattern of inputs to the AND gates follows the pattern seen in the binary representation of the integers from 0 to 3 (010=002, 110=012, 210=102, 310=112). With this knowledge you should be able to create and understand a MUX of any size.
1-bit ALU: Implement the 1-bit ALU shown in the figure above in Logisim.
Simple 4-bit ALU: Implement a 4-bit ALU using 4 copies of your 1-bit alu, similar to the 32-bit version from Figure C.5.7. You can use a hex display from logisim for your inputs and outputs. Unfortunately you will need to provide four single bit inputs for both A and B.
Advanced 4-bit ALU: Implement a 4-bit ALU using 4 copies of your 1-bit alu, similar to the 32-bit version from Figure B.5.12 (or the electronic C.5.12). This version connects the set output (adder output) from alu3 to the input on alu0. Also, implement the overflow detection circuitry to allow detection of overflow. The overflow is always generated, but only valid if the operation is add. See Figure 3.2 in your text (page 180) for when an overflow is present. Start by creating a truth table for your overflow conditions; it will have 6 inputs, but only 4 combinations where there is overflow. Convert your truth table into a circuit.
Send me an email of your Logisim circuit file (.circ) for the 4-bit ALU an email attachment. Don't include extraneous circuitry in your final submission.
Copyright © 2017, David A. Reimann. All rights reserved.