Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
x 0 0 1 1
IC Pin Configuration
B. 7432 OR gate Gate model number on lab kit: DM74L32N Notation Verilog F=x|y Truth Table y F 0 0 1 1 0 1 1 1
x 0 0 1 1
IC Pin Configuration
C. 7400 NAND gate Gate model number on lab kit: SN74ALS00 Notation Verilog F=~(x&y) Truth Table y F 0 1 1 1 0 1 1 0
x 0 0 1 1
IC Pin Configuration
D. 7404 NOT gate Gate model number on lab kit: SN7404N Notation Verilog F=~x Truth Table F 1 1 0 0
x 0 0 1 1
IC Pin Configuration
We could verify that the integrated circuit gates worked correctly by comparing the output values to the Truth Tables listed above. Part III: Bonus For the bonus we connected the four integrated circuits to the same 2 input signals, while the output of each gate was connected to an LED. The bonus consisted in being able to predict the LED pattern by knowing which inputs would affect the output of the gate connected to the LEDs we want to change. Bonus Circuit Schematic
x 0 0 1 1
y 0 1 0 1
F1(NOT) 1 1 0 0
Manual (page 9). The program could be tested once downloaded to the board since the board has fixed switches for the inputs and LEDs for the outputs. Part IV: Bonus There was the option of creating a single module with the four gates, keeping the two inputs but having 4 outputs instead (Basically the same model as in Part III-Bonus but logically programmed rather than physically built). The description used to successfully program that module was:
module lab1bonus4(in1,in2,out1,out2,out3,out4); input in1,in2; output out1,out2,out3,out4; wire in1,in2,outA,outB,outC,outD; and g1(outA,in1,in2); or g2(outB,in1,in2); nand g3(outC,in1,in2); not g4(outD,in1); not not not not endmodule g5(out1,outA); g6(out2,outB); g7(out3,outC); g8(out4,outD); //Defines inputs //Defines outputs //Defines inputs & //outputs to processor //AND gate //OR gate //NAND gate //NOT gate //LED //LED //LED //LED output output output output inverter inverter inverter inverter
F (X Y ) (X Y ) F X X Y X X Y
The first representation required 2 NOT gates, 2 AND gates and 1 OR gate while the second representation only used 4 NAND gates. The following simulations prove that our two representations are valid if we compare with the ExclusiveOR truth table. Exclusive-OR Truth Table x y F 0 0 0 0 1 1 1 0 1 1 1 0
F (X Y ) (X Y )
Simulation 1: x=0, y=0, F=0
F X X Y X X Y
Simulation 1: x=0, y=0, F=0
Where the components used were the following: Referencial Designator U1 U2 U3 U4 Gate NOT AND OR NAND Part # 7404 7408 7432 7400
Part VI. Simplifying an Equation In this section we were given an equation for a circuit with four inputs and one output. Our objective was to prove that using Boolean Algebra It is possible to prove that logical equations can be reduced and still give us the same answers or outputs. As a first step we built the circuit using 3 NOT gates, 3 OR gates and 1 NAND gate. Then we ran a simulation and recorded the data values for different outputs to build the following truth table for the equation:
F (C D) (A B D)
U3
Referencial Designator U1 U2 U3
Then we used Boolean Algebra to reduce the given equation to a simpler form:
F (C D) (A B D) (C D) (A B D) C D A (B D) C D A (B D) F C D A (B D) C D A B D D (C A B)
This new circuit was verified through a simulation and gave us the same truth table as shown above for the original function. This new function only requires 2 AND gates, 1 OR gate and 1 NOT gate, which is less than the number of components required originally.
Referencial Designator U1 U2 U3
Verilog description:
Module equation2(A,B,C,D,F); input a, b, c, d; output f; wire a,b,c,d, b2, outand, outor,outand2; not g1(b2,b); and g2(outand, a,b2); or g3(outor,c,outand); and g4(outand2,d,outor); endmodule;
Location 0 1 2 3 4 5 6 7 8 9 A B C D E F
A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Inputs B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Output F1 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0
F2 1 1 1 1 0 1 1 0 0 1 1 1 0 1 1 0
Using the values on the table we built a K-Map to obtain the logical functions for F1 and F2. Next we reduced the functions according to the number of gates that we have available (4 ANDs, 4 ORs, 4 NANDs and 6 NOTs) F1
F2
F 1 C D A B C C D A (B C ) C D A (B C ) F 2 A B C D C D B C A B C (D B) C D A B C (D B) C D
The equation for F1 uses 2 AND gates, 2 OR gate, 2 NOT gate. The equation F2 uses 2 OR gates, 3 AND gates, 3 NOT gates and 1 NAND gate (for ~(D&B)). Since we only have 4 AND gates available, but both F1 and F2 use the C&D output, we can share it for both F1 and F2. Finally, using this equations we built our circuit and demonstrated it to the instructor to verify its validity (see cover sheet).
Conclusion
As a conclusion, the basic gates that were provided in the lab kit (AND, OR, NOT, NAND) are enough to produce complex logical equations which can also be manipulated by using Boolean Algebra. We also proved that K-Mapping allows us to use the results of the Truth Tables to find the logical equations back from its results.