Digital Es Practica 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

ENGLISH

Abstract
Based on the DeMorgan theorems, simplified expressions of Boolean algebra
can be made; thus, we can represent all the basic logic gates with their
equivalent NAND and OR logical operations.

Introduction
Since the design of the first logic gates, Boolean algebra was born; and
since that, DeMorgan proposed two theorems which are fundamental in
Boolean algebra. These theorems demonstrate the equivalence between the
NAND and NEGATIVE-OR logic gates, and a NOR and NEGATIVE-AND logic
gates.
The first theorem DeMorgan indicates that the complement of a product of
variables is equal to the sum of the complements of the variables; that is,
the complement of two or more variables to which the AND operation is
applied is equivalent to applying the OR operation complements each
variable; as shown in Fig.1 can be observed and its corresponding truth
table in Fig. 2.
- Formula to express the theorem:

=X
+ Y
XY
- Equivalent gate and truth table:

Fig. 1: NAND gate equivalent to a negative-OR.

Fig. 2: Truth table of inputs and outputs.


The second theorem DeMorgan indicates that the complement of a sum of
variables is the product of the complements of the variables; that is, the
complement of two or more variables to which the OR operation applied is
equivalent to applying the AND operation to supplements of each variable;
as shown in Fig.3 can be observed and its corresponding truth table in Fig. 4.
- Formula to express the theorem:

= X Y
X +Y
- Equivalent gate and truth table:

Fig. 1: NOR gate equivalent to a negative-AND.

Fig. 2: Truth table of inputs and outputs.


IMPLEMENTDESIGN
To begin the implementation in the FPGA what was done first was to make a
simulation with a Testbench in which the seven logic gates (AND, NOT,
NAND, OR, NOR, XOR and XNOR) were implemented using two inpputs.

For the implementation of a logic gate where the output is declared as f1,
the code is written as shown below:
f1 <= a XOR b;
To implement the same logic gate where the output is declared as f2 , but
using the first theorem DeMorgan, the code is written as shown below:

f2 <= (((a NAND b) NAND a)NAND ((a NAND b) NAND b));

To implement the same logic gate where the output is declared as f3, but
using the second theorem DeMorgan, the code is written as shown below:

f3 <= ((a NOR b)NOR((b NOR b)NOR(a NOR a)));

We proceed to write each logic gate in its NAND and NOR representation
(similar to the example previously seen), generating three signals for each
logic gate which can be compared.

You might also like