Hey friends, welcome to the YouTube channel ALL ABOUT ELECTRONICS. So in this video, we will see that how to represent any Boolean function or the Boolean expression in a sum of product and the product of some form. And we will also understand the concept of mean terms and the max terms. So we know that in the digital electronics, if we have any logic circuit, then its output is the function of the.
digital inputs. And the relationship between the input and output can be represented either using the truth table or using the Boolean expression. So from the truth table, we can understand that for what input combinations the output of the logic circuit is high. And the same thing can also be represented using the Boolean expression. Now this Boolean expression or the Boolean function can be represented either in the sum of product form or in the product of some form.
So first, let's see the sum of product form of representation. So in this SOP form, the product term is the logical end operation of the different input variables. Where the variables could be in the true form or in the complemented form. So these are the few examples of the product term. So in this a.b, both the variables are in the true form.
While in the second case, this a and c are in the true form, while the b is in the complemented form. Similarly, in the third case, this A is in the true form while the B is in the complemented form. Now in this SOP, this sum refers to the logical OR operation. So in this sum of product form of expression, different product terms are logically ORed.
And this logical OR operation is represented using this plus sign, while these terms are the product terms. So let us see some expressions which are in the sum of product form. So, if you see this function f1, then it is in the sum of product form. Because here, this a can be represented as a.a.
So, if you see all these three terms, then they are the product terms. And this plus sign represents the logical OR operation. Similarly, let's say this f2 is the function of variable a and b. And this function is also in the SOP form.
Now the expression in this SOP form. can be in the canonical form or in the non-canonical form. So, in this non-canonical SOP form, each product term may or may not contain all the variables of the function.
For example, this first expression is in the non-canonical form. So, if you see this expression f1, then it is the function of the three variables. But if you see this first product term, then it contains only one variable. While if you see this second and third term, then they contains only two variables.
That means each product term does not contain all the variables of the function. Therefore, this expression is in the non-canonical form. On the other hand, in the canonical SOP form, each product term contains all the variables of the function. Where the variables in each product term can be in the true form or in the complemented form. So this second expression is in the canonical form.
Because here Each product term contains all the variables of the function. Similarly, if you see this function f3, then it is also in the canonical SOP form. Because here, this f3 is the function of three variables.
And here, each product term contains all the variables of the function. Therefore, this expression is in the canonical SOP form. So in short, the sum of product form of expression can be categorized in the two types. That is canonical SOP form and the non-canonical SOP form. Similarly, now let us see the second type of representation, which is known as the product of sum.
So as I mentioned earlier, this sum refers to the logical OR operation, while this product refers to the logical AND operation. So in this POS form of representation, this sum term is the logical OR operation of the different variables, where each variable could be in the true form. or in the complemented form. So these are the few examples of the sum terms.
So in this product of sum or the pos form of representation, different sum terms are logically ended. So this dot represents the product or the logical end operation, while this term inside the bracket represents the sum terms. So that is the product of some form of representation.
So now let us see few more expressions which are in the product of sum form. so here this function f1 and f2 represents the boolean expression in the pos form So, as you can see, each expression contains the sum terms and these terms are logically ended. Now, similar to the SOP form, this product of some form of expression can be categorized in two types.
That is canonical and the non-canonical. So in non-canonical type of POS form, each sum term may or may not contain all the variables of the function. For example, this Fr and F2 are non-canonical form of expressions. Because if you see this f1, then it is the function of 3 variables. But if you see the first sum term, then it contains only 2 variables.
Similarly, this last term is also missing the variable a. Similarly, if you see this f2, then it is the function of 4 variables. But if you see each sum term, then it does not contain all 4 variables. Therefore, these two expressions are in non-canonical POS form.
On the other hand, in the canonical POS form of expression, each sum term contains all the variables of the function. So if you see this function f3, then it is in the canonical POS form. Because here, each sum term contains all the variables of the function. So these variables could be in the true form or in the complemented form. So similarly, if you see these functions f4 and f5, then they are also in the canonical POS form.
So, in short, this product of some form of representation can be of two types. That is canonical and the non-canonical. Now if we just talk about the canonical form of representation, then in the canonical SOP form, each product term is also called mean term. And therefore, this canonical SOP form of representation is also said to be a sum of mean terms. Similarly, in the canonical POS form of representation, Each sum term is also called Max term.
And this canonical POS form of representation is also said to be a product of Max terms. So first, let us understand what is this mean term and the Max term. And let us start with the mean term.
So this mean term is the product term which consists of all the variables of the function either in the true form or in the complemented form. So now let us see, if we have some function of n variables, Then, what are the possible mean terms of that function? And if we have been given the truth table of some logic circuit, then how we can write its Boolean expression in the form of mean terms? So if we have some function with the two variables a and b, then there are total 4 different possible input combinations.
And following are the mean terms corresponding to each combination. So now, let's see how to write these mean terms. So in the particular combination.
If the value of that variable is 0, then in the mean term expression, it can be written in the complemented form. And if the value of that variable is 1, then in the mean term expression, it is written in the true form. For example, in this first case, the value of the both variables a and b is 0. And therefore, they are written in the complemented form.
While in the second case, this a is 0, while this b is 1. Therefore, This a is written in the complemented form, while this b is written in the true form. Similarly, in the third case, this mean term is equal to ab bar. And in the fourth case, this mean term is equal to a dot b. So, that is how we can write all the mean terms according to the input combination. Now, for convenience, these mean terms are also represented by the lowercase letter m followed by the number which is decimal equivalent of the input combination.
That means this 0 0 corresponds to m0 while this 0 1 corresponds to m1. Likewise this 1 0 corresponds to m2 and this 1 1 corresponds to m3. Similarly for the three variables following are the main terms. Now since the main terms are the product terms, so its output is 1 only for the specific input combination.
For example this main term a bar dot b bar dot c bar is 1 when all the inputs are 0. Likewise, this min term m3 is 1 when the input a is equal to 0 and the input b and c are 1. And likewise, the output of each min term is 1 only for the specific input combination. So as you can see, for the 3 input variables, there are total 8 min terms. Or in general, for the n input variables, we have total 2 to the power and midterms.
So now let us see if we have been given the truth table of some logic circuit. Then how to write its Boolean expression in the form of mean terms. So as you can see, this f1 is the function of three variables a, b and c.
And this function f1 is 1, only for the specific input combinations. Now if you want to write this function f1 in the algebraic form, then what we will do? We will write down all the mean terms corresponding to those combinations for which the output of this function is equal to 1. And then we will logically OR all these terms.
And if you see this function f1, then it is in the canonical SOP form. Or we can say that it is the sum of main terms. Alternatively, we can also write this expression as m0 plus m2 plus m4 plus m7. Because as we have seen, this a bar dot b bar dot c bar is equal to m0.
While this a bar dot b dot c bar is equal to m2. Likewise, this a dot b dot c corresponds to m7. while this a.b bar.c bar corresponds to m4. That means alternatively, we can also write this expression like this. And further in the more abbreviated form, it can also be written like this.
So here, this σ represents the summation of main terms and these decimal numbers are the subscript of these main terms. So all these three expressions of the F1 are in the canonical SOP form. So similarly, let us take one more example.
So here, this function f2 is 1, only for the three input combinations. So first, let us write down the mean terms corresponding to those input combinations. And then, let us perform the logical OR operation of these mean terms.
So further, this function f2 can be written in this form, where this m1 is equal to a bar dot b bar dot c, while this m4 is equal to a dot b bar dot. And this m6 corresponds to a.b.c bar. And in the more abbreviated form, it can also be written like this. So in this way, from the truth table, we can write the Boolean expression of the function in the form of main terms.
Similarly, now let us see what is maxterm. So if we have a function with n variables, then its maxterm is the sum term which contains all the variables of the function. where the variables could be in the true form or in the complemented form.
So for a function with the n different variables, there are 2 to the power n different possible max terms. So let us take the case of two variables. So for the two variables a and b, there are total four different input combinations.
And here are the max terms corresponding to each combination. So as you can see, each max term is the summation of all the variables of the function. Now, these variables can be in the true form or in the complemented form. And that depends on the value of the variable. So if the value of that variable is 0, then in the max term, that variable is represented in the true form.
On the other hand, if the value of that variable is 1, then in the max term, it is represented in the complemented form. So as you can see, in the first case, the value of both variables A and B is 0. And therefore, they are represented in the true form. Similarly, in the second case, this a is equal to 0 while b is equal to 1. So this a is represented in the true form while this b is represented in the complemented form.
And the same procedure is followed for the remaining combinations. And for the convenience, these max terms are also represented by the uppercase letter m followed by the number but is the decimal equivalent of the input combination. So in this case, we have max terms. Starting from M0 to M3. Similarly, for the 3 variables a, b and c, following are the 8 max terms.
So now, let's see, if we have a truth table of some digital circuit, then algebraically, how to write its output in the form of max terms. So here is the truth table of the function f1. And as you can see, the output of this function is 1 for the 4 different combinations. So first, let's find the f1 bar. Now, since the f1 bar is the complement of the f1, so when f1 is equal to 0, this f1 bar will be equal to 1. So, first of all, let us represent this f1 bar in the form of sum of main terms.
And for that, let us do the summation of all the main terms for which this f1 bar is equal to 1. So here, this main term corresponding to is equal to a bar dot b bar dot c, while the main term corresponding to is 011. is equal to a bar dot b dot c likewise The mean term corresponding to 101 is equal to a.b bar.c and the mean term corresponding to 110 is equal to a.b.c bar. Now if we take the complement of this f1 bar, then we will get the f1, right? So using the De Morgan's law, let us simplify it.
So just break this bar and give it to the individual group and at the same time also change the sign. So once again, Using the De Morgan's law, we will get the following expression, which is in the product of some form. And here, each term is the max term. Now, if you closely observe, then this max term A plus B plus C bar corresponds to.
Likewise, this max term A plus B bar plus C bar corresponds to. Similarly, this A bar plus B plus C bar corresponds to. And likewise, this corresponds to.
So, all these four combinations correspond to max terms m1, m3, m5, and m6. So, in a simplified form, we can also write it like this. Or equivalently, it can also be written like this, where this pi represents the product or the logical end operation of all max terms. And the number inside the bracket represents the corresponding Now one more thing if you observe, then for all these max terms, this function f1 is equal to 0. So directly from the truth table, if we want to write this expression in the POS form or in the form of product of max terms, then we just need to consider the terms for which this function f1 is equal to 0. So let us take one more example so that it will get clear to you. So here is the truth table of the function f2.
So, if we want to write it in the form of max terms, then just consider the terms for which this function f2 is equal to 0. So these max terms are 0, 1, 6 and 7. Or equivalently, it can also be written like this. And if we want to represent it in the algebraic form, then we can also write it in this fashion. So in this way, directly from the truth table, we can write the function in the canonical PS form or in the product of.
max term. Alright, so for the three inputs A, B and C, here are the corresponding mean terms and the max terms. So if we see any max term, then its output is equal to 0 only for the specific input combination. For example, this A plus B plus C is equal to 0 when all the inputs A, B and C are 0. Likewise, this A bar plus B bar plus C bar is 0 when all the inputs A, B and C are 1. Moreover, if you observe, then each mean term is the complement of the corresponding max term.
For example, if you take the complement of this, then we will get this a bar dot b bar dot c bar. But we can say that this m0 bar is equal to m0. So in general, we can say that these mean terms are the complement of the max term.
So using this, we can convert any canonical SO form into the equivalent POS form. And vice versa, we can convert any canonical POS form into the equivalent SOP form. So let's say, we have been given this function f1 and it is in the canonical SOP form.
And as you can see, it is the function of 3 variables. Now if we take the complement of this f1, then it contains all the mean terms for which this function f1 is equal to 0, right? That is equal to 1, 3, 5 and 6. Or we can write it as m1 plus m3 plus m5 plus m6.
Now once again, if we take the complement of this f1 bar, then we will get the f1. And using the De Morgan's law, we can write it as m1 bar dot m3 bar dot m5 bar dot m6 bar. And as we have seen, these mean terms are the complement of the max term. That means if we take the complement of these mean terms, then we will get the corresponding max terms.
That is equal to m1.m3.m5.m6. That means in the canonical POS form, this expression can be written as m1.m3.m5.m6. Or in more abbreviated form, it can also be written like this. So in this way, we can convert any canonical SOB form of expression into the equivalent POS form. And if you closely observe, Then this POS form contains the number which is not present in the SOP form.
That means without the truth table also. We can convert any canonical SOP form into the equivalent POS form. Or vice versa, we can convert any canonical POS form into the equivalent SOP form.
So to understand that, let's take one more example. So let's say, we have given one expression in the canonical SOP form. And we want to find the equivalent POS form. So as you can see, this F2 is the function of 3 variables.
That means it will have total 8 mean terms and the max terms. starting from 0 to 7. Now in the POS form, we will have the numbers which is not present in the SOP form. So in this case, those numbers are 0, 3, 4 and 7. And therefore, this is the equivalent POS form of expression. So in this way, we can convert any one canonical form into the other canonical form.
So similarly in the next video, we will see that how to convert any non-canonical form into the equivalent canonical form. So we will see that how to convert the non-canonical POS form of expression into the equivalent canonical form. And likewise, how to convert the non-canonical SOB form of expression into the equivalent canonical form.
But I hope in this video you understood the sum of product and the product of sum form of representation of the Boolean expression. And you also understood the concept of mean term and the max term. So if you have any question or suggestion, Then do let me know here in the comment section below. If you like this video, hit the like button and subscribe to the channel for more such videos.