Professional Documents
Culture Documents
University of Perpetual Help System Dalta: FAUSTINO, Vicente S
University of Perpetual Help System Dalta: FAUSTINO, Vicente S
College of Engineering
College of Engineering
Remarks Grade
FAUSTINO, Vicente S.
BSCpE / 3rd Year
I. OBJECTIVES
3. To design and create a program of the universal logic gates using Verilog
Hardware Description Language.
2. Computer System
3. Cmd Application
College of Engineering
While many digital circuits can be constructed with just the three basic
digital elements – AND, OR, and NOT – most digital equipment are
implemented with special versions of these circuits known as NAND and
NOR gates, or the so-called Universal Gates. Such Circuits are basically
AND and OR gates combined with an INVERTER. Universal gates are
the most widely used types of digital logic element because they offer
numerous advantages over the simple gates considered earlier. In large
complex digital logic networks, it is difficult to cascade more than just a
few of the simple logic gates. Because there is no buffering between the
gates, loading problems occur and the speed of the operation suffers. For
these reasons, it is generally desirable to combine a simple logic gate with
some types of transistor buffer (such as an inverter) to permit more
flexible interconnection of circuits.
Like the NAND gate, the NOR gate is an improved logic element used for
implemented decision-making logic functions. The term NOR is a
contraction for the expression NOT – OR. Therefore, the NOR gate is
essentially a circuit
Machine Problem 2: UNIVERSAL LOGIC GATES 2
ENGR. JENNELYN PEREZ-
CABALE
Alabang-Zapote Road, Pamplona 3, Las Piñas
City, Metro Manila 1740, PHILIPPINES
www.perpetualdalta.edu.ph • +63(02) 871-06-39
College of Engineering
IV. ACTIVITY
Create a Verilog HDL program that emulates the function of a NAND and
NOR gate. Show your program listing using primitive gates and Boolean
expression. Display your output in command prompt and in gtkwave
simulation window.
NAND GATE: ̅̅
(a) (b)
Input
Output
X Y
0 0 1
0 1 1
1 0 1
1 1 0
College of Engineering
NOR GATE:̅̅̅
̅
(a) (b)
Input
Output
X Y
0 0 1
0 1 0
1 0 0
1 1 0
College of Engineering
V. SOURCE CODE
endmodule
module experiment2_main;
reg x, y;
wire outnand, outnor;
#0 x=0; y=0;
#1 x=0; y=1;
#2 x=1; y=0;
#3 x=1; y=1;
end
endmodule
College of Engineering
College of Engineering