# POS and SOP form representation of a Boolean Function

Here, we are going to learn about the **POS and SOP form representation of a Boolean Function** in digital electronics.

Submitted by Saurabh Gupta, on November 27, 2019

There are four ways in which a Boolean function can be expressed which are as follows,

- Product of Sum (POS) Form
- Sum of Product (SOP) Form
- Canonical Form of POS/SOP Form

### 1) Product of Sum (POS) Form

As the name suggests, **A POS expression contains the sum of various terms ANDed/multiplied together**.

Example: Y = (A + B). (C + D). (E + F)

### 2) Sum of Product (SOP) Form

As the name suggests, **A SOP expression is a group of product terms ORed/added together**.

Example: Y = (A. B) + (C. D) + (E. F)

### 3) Canonical Form of POS/SOP Form

**If each term of SOP/POS expression contains all the literals in the Boolean function, then they are said to be in canonical form**. Suppose, we have a Boolean function (Y) having three literals A, B and C, then canonical Boolean expressions can be written as,

Y = ABC + A. B. C + A.B.C

This is an example of **canonical SOP Form**, because each term in the SOP form contains all the literals **A**, **B** and **C**.

Similarly, Y = (A+B+C). (A + B + C). (A+B+C)

This is an example of **canonical POS form**, because each term of the POS form contains all the literals.

Now, let's see a few problems on canonical form.

**Example 1: Convert the following expressions in their canonical form.**

**Y (A, B, C) = AB + BC + CA****Y (X, Y, Z) = X. (X + Y). (X + Y + Z)**

**Solution (i):**

**Y (A, B, C) = AB + BC + CA**, this expression is a **SOP expression**, since we notice the Boolean function has three literals **A**, **B** and **C**, so each term of the Boolean expression must contain all the three literals to convert it into canonical SOP form. Therefore,

= Y (A, B, C) = AB + BC + CA = AB. (C + C) + BC. (A + A) + CA. (B + B) [Since, C + C = 1] = ABC + AB. C + ABC + A. BC + ABC + A. B. C = ABC + AB. C + A. BC + A. B. CHence, Y = ABC + AB. C + A. BC + A. B.C is the required canonical SOP form representation.

**Solution (ii):**

**Y (X, Y, Z) = X. (X + Y). (X + Y + Z)**, is an example of **POS expression**, since all the sum terms in the expression doesn't have all the literals **X**, **Y** and **Z**, so we have to express it in such a way that it will have all the three literals in each term.

= Y (X, Y, Z) = X. (X + Y). (X + Y + Z) = (X + Y. Y + Z. Z) (X + Y + Z. Z). (X + Y + Z) = (X + Y. Y + Z) (X + Y. Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) = (X + Y +Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) = (X + Y +Z) (X + Y + Z) (X + Y + Z) (X + Y + Z)Hence, Y = (X + Y +Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) is the required canonical POS form representation.

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.