How to Create Logic Diagrams using NAND Gates?

Previous Article
Next Article
NAND gate is a universal gate. A circuit of any complexity can be constructed using a NAND gates only.

Consider an example,

Example 1:

F = x  + y’z  is the given function. Show the result in truth table and draw a logic diagram using only NAND gate.


Given function F = x + y’z is combinational circuit ,meaning it takes input and produce output and does not store any bit information.

There are three variable in this function then we will draw a 3 variable Truth Table for this function.

Truth Table

Next we will implement the function using NOT-AND-OR gate .

Logic Diagram

F = x + y’z uses only two gates – an OR gate and an AND gate.


To convert the circuit with NOT-OR-AND circuit we need to change the AND gate and OR gate to NAND equivalent.

This is shown below,

NAND implementation using AND and OR gate

NAND Gate construction using AND gate

F = (x . y)’

NAND Gate construction using OR gate

F = ( x’ + y’) = (x . y)’

In the above diagram, the AND is converted into a NAND by adding a complement to the output. Similarly, OR gate is converted into a NAND equivalent gate by complementing both the inputs.

In the following diagram, I have implemented F= X + Y’Z using NAND equivalent circuit.

NAND Circuit

The output of the function should be same as previous circuit that’s why we need to complement the input of gates accordingly, which means the output of F = ((Y’ . Z) . X’)

Previous Article
Next Article