0% found this document useful (0 votes)
112 views7 pages

CNF DNF

The document explains Disjunctive Normal Form (DNF) and Conjunctive Normal Form (CNF) in Boolean algebra, detailing how to express Boolean functions as sums of products and products of sums, respectively. It provides examples and solutions for converting expressions into DNF and CNF, including complete forms, using both truth tables and algebraic manipulation. The document emphasizes the importance of including all variables or their complements in the expressions.

Uploaded by

sohommister
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views7 pages

CNF DNF

The document explains Disjunctive Normal Form (DNF) and Conjunctive Normal Form (CNF) in Boolean algebra, detailing how to express Boolean functions as sums of products and products of sums, respectively. It provides examples and solutions for converting expressions into DNF and CNF, including complete forms, using both truth tables and algebraic manipulation. The document emphasizes the importance of including all variables or their complements in the expressions.

Uploaded by

sohommister
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Disjunctive Normal Form (DNF)

If a Boolean function 𝑓 of 𝑛 Boolean variables be expressed as the sum of


products of variable present in the function or its complements, then the
expression is called the disjunctive normal form (d.n.f) of 𝑓.

If each product term in the disjunctive normal form involves all the
variables or its complements exactly once, then the expression is called
complete/full disjunctive normal form.

Examples :

(a) 𝑓(𝑥, 𝑦, 𝑧) = 𝑥𝑧 / + 𝑥𝑦 / 𝑧 + 𝑥 / 𝑦 / is a d.n.f but not a complete/full


disjunctive normal form.

(b) 𝑓(𝑥, 𝑦, 𝑧) = 𝑥𝑦𝑧 + 𝑥𝑦 / 𝑧 + 𝑥 / 𝑦𝑧 is an example of complete/full disjunctive


normal form.
Problem :

Reduce the following expression into disjunctive normal form and then to
complete disjunctive normal form

𝑓(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 / )(𝑦 + 𝑧 / )(𝑧 + 𝑥 / )(𝑥 / + 𝑦 / )

Solution :

𝑓(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 / )(𝑦 + 𝑧 / )(𝑧 + 𝑥 / )(𝑥 / + 𝑦 / )

= (𝑥𝑦 + 𝑥𝑧 / + 𝑦 / 𝑦 + 𝑦 / 𝑧 / ). (𝑥 / 𝑧 + 𝑥 / + 𝑦 / 𝑧 + 𝑥 / 𝑦 / )

[ Commutative, Distributive & Idempotent law ]

= (𝑥𝑦 + 𝑥𝑧 / + 𝑦 / 𝑧 / ). (𝑥 / 𝑧 + 𝑥 / + 𝑦 / 𝑧 + 𝑥 / 𝑦 / ) [ Since, 𝑦 / 𝑦 = 0 ]

= 𝑥/𝑦/𝑧/ [Commutative & Distributive law ]

This is the required disjunctive normal form which is complete d.n.f as well.

Note :

Sometimes it is useful to use truth table to reduce the expression into


complete/full disjunctive normal form. For this we have to write the
Boolean expression in terms of the variables or its complements, where the
functional value becomes 1.
Problem :

Reduce the following expression into disjunctive normal form and then to
complete disjunctive normal form

𝑓(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 + 𝑧). (𝑥𝑦 + 𝑥 / 𝑧)/

Solution : (Using Truth Table)

𝒙 𝒚 𝒛 𝒙/ 𝒙𝒚 𝒙/ 𝒛 (𝒙𝒚 + 𝒙/ 𝒛)/ 𝒙 + 𝒚 + 𝒛 𝒇(𝒙, 𝒚, 𝒛)

0 0 0 1 0 0 1 0 0

0 0 1 1 0 1 0 1 0

0 1 0 1 0 0 1 1 1

0 1 1 1 0 1 0 1 0

1 0 0 0 0 0 1 1 1

1 0 1 0 0 0 1 1 1

1 1 0 0 1 0 0 1 0

1 1 1 0 1 0 0 1 0

Here 𝑓(𝑥, 𝑦, 𝑧) assumes the value ‘1’ at 3rd, 5th and 6th row.

Thus, 𝑓(𝑥, 𝑦, 𝑧) = 𝑥 / 𝑦𝑧 / + 𝑥𝑦 / 𝑧 / + 𝑥𝑦 / 𝑧

This is the required disjunctive normal form which is complete d.n.f as well.
(Without Using Truth Table)

𝑓(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 + 𝑧). (𝑥𝑦 + 𝑥 / 𝑧)/

= (𝑥 + 𝑦 + 𝑧). {(𝑥𝑦)/ . (𝑥 / 𝑧)/ } [ De Morgan’s law ]

= (𝑥 + 𝑦 + 𝑧). (𝑥 / + 𝑦 / ). (𝑥 + 𝑧 / ) [ De Morgan’s law ]

= (𝑥. 𝑥 / + 𝑥. 𝑦 / + 𝑥 / . 𝑦 + 𝑦. 𝑦 / + 𝑥 / . 𝑧 + 𝑦 / . 𝑧). (𝑥 + 𝑧 / )

[ Commutative & Distributive law ]

= (𝑥. 𝑦 / + 𝑥 / . 𝑦 + 𝑥 / . 𝑧 + 𝑦 / . 𝑧). (𝑥 + 𝑧 / ) [ Since, 𝑥. 𝑥 / = 𝑦. 𝑦 / = 0 ]

= 𝑥. 𝑦 / + 𝑥. 𝑦 / . 𝑧 + 𝑥. 𝑦 / 𝑧 / + 𝑥 / . 𝑦. 𝑧 /

[ Idempotent & Distributive law ]

= 𝑥. 𝑦 / . (𝑧 + 1) + 𝑥. 𝑦 / 𝑧 / + 𝑥 / . 𝑦. 𝑧 /

[ Commutative & Distributive law ]

= 𝑥. 𝑦 / + 𝑥. 𝑦 / 𝑧 / + 𝑥 / . 𝑦. 𝑧 / [ Boundedness law ]

This is a disjunctive normal form of 𝑓(𝑥, 𝑦, 𝑧) which is not complete. To find


complete d.n.f we have to proceed further.

𝑓(𝑥, 𝑦, 𝑧) = 𝑥. 𝑦 / + 𝑥. 𝑦 / 𝑧 / + 𝑥 / . 𝑦. 𝑧 /

= 𝑥. 𝑦 / . (𝑧 + 𝑧 / ) + 𝑥. 𝑦 / 𝑧 / + 𝑥 / . 𝑦. 𝑧 /

[ Commutative law & 𝑧 + 𝑧 / = 1 ]

= 𝑥. 𝑦 / . 𝑧 + 𝑥. 𝑦 / . 𝑧 / + 𝑥 / . 𝑦. 𝑧 /

[ Idempotent & Distributive law ]

This is the required complete d.n.f of the given Boolean expression.


Conjunctive Normal Form (CNF)

If a Boolean function 𝑓 of 𝑛 Boolean variables be expressed as the product


of sums of variable present in the function or its complements, then the
expression is called the conjunctive normal form (c.n.f) of 𝑓.

If each product term in the conjunctive normal form involves all the
variables or its complements exactly once, then the expression is called
complete/full conjunctive normal form.

Examples :

(a) 𝑓(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 / ). (𝑦 + 𝑧 / ). (𝑧 + 𝑥 / ) is a c.n.f but not a complete/full


conjunctive normal form.

(b) 𝑓(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 + 𝑧 / ). (𝑥 + 𝑦 / + 𝑧). (𝑥 / + 𝑦 + 𝑧 / ). (𝑥 / + 𝑦 / + 𝑧) is an


example of complete/full conjunctive normal form.

Note :

Sometimes it is useful to use truth table to reduce the expression into


complete/full conjunctive normal form. For this we have to write the
Boolean expression in terms of the variables or its complements,
corresponding to that row where the functional value becomes 0.
Problem :

Reduce the following expression into conjunctive normal form and then to
complete conjunctive normal form

𝑓(𝑥, 𝑦, 𝑧) = 𝑥 / + (𝑥. 𝑧 + 𝑥. 𝑦 / )/

Solution : (Using Truth Table)

𝒙 𝒚 𝒛 𝒙/ 𝒚/ 𝒙. 𝒛 𝒙. 𝒚/ (𝒙. 𝒛 + 𝒙. 𝒚/ )/ 𝒇(𝒙, 𝒚, 𝒛)

0 0 0 1 1 0 0 1 1

0 0 1 1 1 0 0 1 1

0 1 0 1 0 0 0 1 1

0 1 1 1 0 0 0 1 1

1 0 0 0 1 0 1 0 0

1 0 1 0 1 1 1 0 0

1 1 0 0 0 0 0 1 1

1 1 1 0 0 1 0 0 0

Here 𝑓(𝑥, 𝑦, 𝑧) assumes the value ‘0’ at 5th, 6th and 8th row.
/ /
Thus, 𝑓(𝑥, 𝑦, 𝑧) = (𝑥. 𝑦 / . 𝑧 / ) . (𝑥. 𝑦 / . 𝑧) . (𝑥. 𝑦. 𝑧)/

[ Complement of 5th, 6th and 8th row ]


𝑓(𝑥, 𝑦, 𝑧) = (𝑥 / + 𝑦 + 𝑧). (𝑥 / + 𝑦 + 𝑧 / ). (𝑥 / + 𝑦 / + 𝑧 / )

This is the required conjunctive normal form which is complete c.n.f as well.

(Without Using Truth Table)

𝑓(𝑥, 𝑦, 𝑧) = 𝑥 / + (𝑥. 𝑧 + 𝑥. 𝑦 / )/

= 𝑥 / + {(𝑥. 𝑧)/ . (𝑥. 𝑦 / )/ } [ De Morgan’s law ]

= 𝑥 / + (𝑥 / + 𝑧 / ). (𝑥 / + 𝑦) [ De Morgan’s law ]

= (𝑥 / + 𝑧 / ). (𝑥 / + 𝑦) [ Distributive & Idempotent law ]

This is a conjunctive normal form of 𝑓(𝑥, 𝑦, 𝑧) which is not complete. To find


complete c.n.f we have to proceed further.

𝑓(𝑥, 𝑦, 𝑧) = (𝑥 / + 𝑧 / ). (𝑥 / + 𝑦)

= {(𝑥 / + 𝑧 / ) + 𝑦. 𝑦 / }. {(𝑥 / + 𝑦) + 𝑧. 𝑧 / } [ Since, 𝑧. 𝑧 / = 0 ]

= (𝑥 / + 𝑦 + 𝑧 / ). (𝑥 / + 𝑦 / + 𝑧 / ). (𝑥 / + 𝑦 + 𝑧). (𝑥 / + 𝑦 + 𝑧 / )

[ Distributive law ]

= (𝑥 / + 𝑦 + 𝑧 / ). (𝑥 / + 𝑦 / + 𝑧 / ). (𝑥 / + 𝑦 + 𝑧) [ Idempotent law ]

This is the required complete c.n.f of the given Boolean expression.

You might also like