Lab Exercise #2 -- Combinational Circuits A. The "sim" Software Package In this course, you will use a software package named "sim" (available only on "north") to study circuits. A brief introduction to "sim" is available as: ~cse320/General/intro.sim If you have not already done so, modify your ".personal" file as follows: 1. Add the following line to your ".personal" file, after any existing "setenv PATH" statements: setenv PATH {$PATH}:/user/csearch/bin 2. Execute the following command: source .personal You won't need to repeat these two steps during subsequent sessions. B. Boolean Functions and Combinational Circuits 1. The file "~cse320/Labs/lab02.circuit.c" contains a C++ module which simulates a four-variable, one-output Boolean function. a) Bring the function into simulation using the UNIX command: sim ~cse320/Labs/lab02.circuit.c b) Experiment with the switches and fill in the following table which describes the behavior of the function. Inputs Output a b c d (0 or 1) 0 0 0 0 ________ 0 0 0 1 ________ 0 0 1 0 ________ 0 0 1 1 ________ 0 1 0 0 ________ 0 1 0 1 ________ 0 1 1 0 ________ 0 1 1 1 ________ 1 0 0 0 ________ 1 0 0 1 ________ 1 0 1 0 ________ 1 0 1 1 ________ 1 1 0 0 ________ 1 1 0 1 ________ 1 1 1 0 ________ 1 1 1 1 ________ c) Give an algebraic expression for the function: F(a,b,c,d) = d) Is the function minimized? Explain. e) Complete the following table to show the Karnaugh map for function F. F | c'd'| c'd | cd | cd' | -----+-----+-----+-----+-----+ a'b' | | | | | +-----+-----+-----+-----+ a'b | | | | | +-----+-----+-----+-----+ ab | | | | | +-----+-----+-----+-----+ ab' | | | | | +-----+-----+-----+-----+ f) Give a minimized expression for the function. F(a,b,c,d) = 2. Consider the Boolean functions F1 and F2 below: F1 = a + b' /* a or not b */ F2 = a + a'b' /* a or (not a and not b) */ Each function has two inputs and one output. a) Develop a "sim" module that simulates F1 and F2 simultaneously. Each function must have its own output Probe but they must share input Switches. b) Execute the "sim" package to test your implementation of F1 and F2, then complete the following table: a b F1 F2 0 0 ____ ____ 0 1 ____ ____ 1 0 ____ ____ 1 1 ____ ____ c) In a few words, what do you notice when you compare functions F1 and F2?