Realization of a logic function in SOP form using NAND gate


SOP Form

SOP form stands for Sum of Products form. SOP form is one in which a Boolean expression is expressed as a sum of product terms.

For example,

$$\mathrm{\mathit{f}\lgroup A,B,C\rgroup=AB+ABC+B\overline{C}}$$

This is a Boolean function expressed in SOP (Sum of Products) form.

NAND Gate

The NAND Gate is a type of universal logic gate. It is a logic gate one that can be used to realize any kind of logical function or any other type of logic gate.

A NAND gate is basically a combination of two basic logic gates namely AND gate and NOT gate, i.e.

$$\mathrm{NAND \:Logic = AND\: Logic + NOT \:Logic}$$

A NAND gate is the type of logic gate whose output is LOW (Logic 0) when all its inputs are high, and its output is HIGH (Logic 1), when any of its inputs is LOW (Logic 0). Therefore, the operation of the NAND gate is opposite that of the AND gate. The logic symbol of a two input NAND gate is shown in Figure 1.

Here, A and B are the input variables and Y is the output variable of the NAND gate, then its output is given by,

$$\mathrm{Y=\overline{A.B}=\lgroup A.B\rgroup'}$$

It is read as "Y is equal to A.B whole bar".

The operation of a NAND gate for a set of input variables can be understood with help of truth table. The following is the truth table of a two input NAND gate-

Inputs

Output

A

B

Y = (A.B)'

0

0

1

0

1

1

1

0

1

1

1

0

De Morgan’s Theorem

The implementation of a Boolean function in SOP form using only NAND gates requires the knowledge of De Morgan’s theorem of Boolean algebra.

According to De Morgan’s theorem, the complement of a logical OR operation of variables is equivalent to the logical AND operation of variables in complemented form, i.e.

$$\mathrm{\overline{A+B+C}=\overline{A}.\overline{B}.\overline{C}}$$

Now, we have discussed all the basic concepts required for the realization of a logical expression in SOP form using NAND gates only. So, let us discuss the realization of a logic function in SOP form using NAND gates.

Implementation of Logic Function in SOP Form using NAND Gates

A Boolean function or logic function in SOP (Sum of Products) form can be implemented using NAND gates only. To realize an SOP expression using NAND gates only, the following steps should be followed −

  • Step 1 − Double complements the given Boolean or logical function.

  • Step 2 − Convert the logical OR operations into the logical AND operation by applying De Morgan’s theorem.

  • Step 3 − Determine the number of product terms in the logical function. Here, the number of product terms in function will give the number of NAND gates required to implement the function.

  • Step 4 − Finally, implement the logic circuit diagram by connecting all the NAND gates together according to logic expression.

Now, let us consider some examples to understand the concept in depth.

Example 1

Realize the following logic function in SOP form using only NAND gates.

$$\mathrm{\mathit{f}=A\overline{C}+BC+ABC}$$

Solution

The given logic function is,

$$\mathrm{\mathit{f}=A\overline{C}+BC+ABC}$$

Double complementing the function on both sides, we

$$\mathrm{\overline{\overline{\mathit{f}}}=\mathit{f}=\overline{\overline{A\overline{C}+BC+ABC}}}$$

Applying De Morgan’s theorem,

$$\mathrm{\mathit{\overline{\overline{f}}}=\mathit{f}=\overline{\overline{A\overline{C}}.\overline{BC}.\overline{ABC}}}$$

To realize this Boolean function, we require 4 NAND gates, i.e., three NAND gates for implementing three product terms and one NAND gate for combining the outputs of previous three NAND gates. The realization of this Boolean function is shown in Figure 2.

Example 2

Implement the following Boolean function in SOP form using NAND gates.

$$\mathrm{Y=AB+A\overline{C}+\overline{B}̅C+ABC}$$

Solution

The given Boolean function is,

$$\mathrm{Y=AB+A\overline{C}+\overline{B}̅C+ABC}$$

Double complementing the function on both sides, we get,

$$\mathrm{\overline{\overline{Y}}=Y=\overline{\overline{AB+A\overline{C}+\overline{B}C+ABC}}}$$

Applying De Morgan’s theorem, we get,

$$\mathrm{\overline{\overline{Y}}=Y= \overline{\overline{AB}.\overline{A\overline{C}}. \overline{\overline{B}C}.\overline{ABC}}}$$

To implement this expression, we require 5 NAND gates. Here, 4 NAND gates are needed to implement the product terms and one NAND gate is required to combine the outputs of previous 4 NAND gates. The implement of this Boolean expression using NAND gates is shown in Figure 3.

Conclusion

This is all about the realization of a logic function in SOP form using NAND gates. From the above discussion, it is clear that the realization of a Boolean function in SOP form first need to be converted into product form by using De Morgan’s theorem in Boolean algebra.

Updated on: 03-Oct-2023

552 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements