Home CPSC 305

Multiplexer Exercise

 

Objective

To gain experience using multiplexers and also using sub-circuits in Logisim.


 

Task: Simple Logic Unit

One critical component of a CPU is the ALU: the arithmetic logic unit. This component allows us to actually perform computations. For this Lab you will create a sub-circuit that will function as a simple logic unit. That is, it will do the logic functions of a CPU (and, or, xor and not in this case) but not yet any arithmetic (because we haven't seen how to yet!).

Start by creating a sub-circuit in Logisim by choosing Project->Add Circuit from the main menu. This circuit should have the following pins:

In the case of the NOT operation, only the first input is used. The output should be the inverse of that first input in that case.

Test your circuit by placing it in the "main" area and wiring some pins into it so that you can test that it works as expected.


 

Tips

  1. Begin by placing all of the pins and setting them to the right bit-width and input/output.
  2. Place the 4 gates you will need for each operation and wire them to the inputs (you will need to set the data bits to 8).
  3. Wire the four outputs of those into a multiplexer (using the one available in the "Plexers" menu in Logisim). Use the operation code pin as the select bits for the mux.
  4. The output of the mux should be the output of the sub-circuit.

 

Submitting

When your circuit works, please submit the .circ file under the lab assignment on Canvas

Copyright © 2024 Ian Finlayson | Licensed under a Creative Commons BY-NC-SA 4.0 License.