How De Morgan's Laws Convert Between SOP and POS in Logic
In digital electronics, engineers frequently need to translate boolean expressions between Sum-of-Products (SOP) and Product-of-Sums (POS) forms to optimize circuit design, reduce hardware costs, and adapt to available logic gates. This article provides a comprehensive overview of how De Morgan's laws serve as the mathematical bridge between these two standard forms. By applying the principles of negation and operator swapping, engineers can seamlessly transform AND-OR logic configurations into OR-AND configurations, and vice versa, ensuring maximum efficiency in digital system implementation.
Understanding SOP and POS Forms
Before applying De Morgan's laws, it is necessary to define the two canonical forms of boolean expressions used in digital logic design:
- Sum-of-Products (SOP): This form consists of two or
more AND terms (products) that are ORed (summed) together. An example is
(A · B) + (C · D). SOP expressions are naturally implemented using AND gates feeding into a single OR gate, or entirely with NAND gates. - Product-of-Sums (POS): This form consists of two or
more OR terms (sums) that are ANDed (multiplied) together. An example is
(A + B) · (C + D). POS expressions are naturally implemented using OR gates feeding into a single AND gate, or entirely with NOR gates.
The Mechanics of De Morgan's Laws
De Morgan's laws consist of two transformation rules that describe
how the negation of a conjunction (AND) and the negation of a
disjunction (OR) behave. In boolean algebra, where a prime
(') or an overbar represents inversion (NOT), the laws are
stated as:
- (A · B)' = A' + B' (The complement of a product of variables is equal to the sum of the complements of the variables.)
- (A + B)' = A' · B' (The complement of a sum of variables is equal to the product of the complements of the variables.)
In simple terms, De Morgan's laws allow an engineer to "break the line, change the sign." When a negation bar over an expression is broken, the operator directly underneath it flips from AND to OR, or from OR to AND.
Converting SOP to POS
To convert a standard SOP expression into a POS expression without
changing the underlying logic of the circuit, engineers use the Law of
Double Negation (X = X'') combined with De Morgan's
laws.
Here is the step-by-step process to convert the SOP expression
Y = (A · B) + (C · D) into a POS format:
- Double Negate the Expression: Apply two negation
bars over the entire expression. This does not change the truth value of
the output.
Y = ((A · B) + (C · D))'' - Apply De Morgan's Law to the Inner Negation: Break
the bottom negation bar at the main OR (
+) operator, changing it to an AND (·) operator.Y = ((A · B)' · (C · D)')' - Apply De Morgan's Law to the Product Terms: Break
the negation bars over the individual
(A · B)'and(C · D)'terms. This changes their internal AND operators into OR operators.Y = ((A' + B') · (C' + D'))'
At this stage, the inner expression
(A' + B') · (C' + D') is purely in Product-of-Sums (POS)
form, with an overall inversion at the output. If an engineer needs a
strict POS form without the final inversion, they can extract the
complement of the function (Y') from a truth table
(grouping the 0s instead of the 1s) as an SOP, and apply De Morgan's law
a single time to arrive directly at a pure POS expression.
Converting POS to SOP
The reverse process—converting POS to SOP—follows the exact same logic, utilizing the second of De Morgan's laws.
Here is how to convert the POS expression
Y = (A + B) · (C + D):
- Double Negate the Expression:
Y = ((A + B) · (C + D))'' - Break the First Negation Bar: Change the central
AND operator to an OR operator.
Y = ((A + B)' + (C + D)')' - Break the Term Negation Bars: Change the internal
OR operators to AND operators.
Y = ((A' · B') + (C' · D'))'
The internal structure is now in a Sum-of-Products format. Alternatively, multiplying out the terms using the distributive law after applying a single De Morgan transformation to a negated POS expression will also yield a standard SOP expression.
Practical Application in Hardware
In physical circuit design, fabricating a chip with only one type of logic gate is significantly cheaper and more efficient than mixing AND, OR, and NOT gates. These are known as universal gates (NAND and NOR).
De Morgan's laws are the exact mechanism that proves NAND and NOR gates are universal:
- By applying De Morgan's laws to an SOP expression, engineers convert standard AND-OR logic into NAND-NAND logic.
- By applying De Morgan's laws to a POS expression, engineers convert standard OR-AND logic into NOR-NOR logic.
If an engineer derives a POS expression from a system's requirements, but the available Programmable Logic Array (PLA) or integrated circuit stock only utilizes NAND gates, they simply apply De Morgan's laws to translate the POS expression into an SOP structure suitable for the hardware.