Transcript for:
7 Understanding Min Terms in Boolean Functions

welcome to lecture 7 the material that we're going to begin discussing in this lecture comes from units three and four the first concept I want to talk about or two concepts actually Min terms and Max terms and and we'll talk about Min terms first suppose that we have a function of the Boolean variables X Y and Z and suppose that this function is defined in the following way let's say maybe we have X Prime y or y z or X Prime y z prime or uh maybe we might have X or uh X Y Prime Z Prime as an example now you might uh look at this and and and perhaps we're there would be some ways to simplify this but that doesn't matter uh the main point is that this is our function uh of um uh our function f and again our three independent Boolean variables are X Y and Z and if we look at this expression the uh this term X Prime y z Prime and likewise this term X Y Prime Z Prime are called Min terms but none of the other three terms X Prime y or YZ or X none of those is a minterm so what is a minterm a minterm is the product of all the Boolean I'll say all the available Boolean variables in and perhaps I'll say is the simple product of all the available Ruan variables in either complemented or uncomplemented form and so you can see once you see that definition uh you can understand why the first two terms are not Min terms uh X Prime Y is not a Min term because it doesn't involve Z and Z is one of the Boolean variables um available uh y z is not a Min term because it doesn't contain X and over here uh X alone does not contain y or Z so that's why those three terms are not Min terms and yet uh you can see readily X Prime y z Prime uh it is a simple product of all the available Boolean variables and either complemented or uncomp form so this is a m term and X Y Prime Z Prime uh likewise uh involves all of the it is a simple product of all the available Boolean variables in complimented or uncomplemented form so this is also a Min term uh let's look at another example if we had um uh G of X Y is equal to x or y y prime or uh X Y prime or X in this case this would be the only minterm the XY Prime term is the only minterm uh and the rest of this uh the other two terms are not men terms now to explain that the reason that this first term is not a m term is that it is not a simple product it isn't simply the product of Boolean variables but is a product of a Boolean variable with a sum of Boolean variables so that's why that's not a m term and and the uh last term is not a m term because it doesn't contain either y or Y Prime and notice another interesting thing here uh is that um um here in the previous problem X Prime Y is not a Min term but here in this problem X Y Prime is a Min term and and you might be confused by that of course uh the reason is that in the previous problem we had three Boolean variables available and so for X Prime y to have been a m term it would have had to have had Z or Z Prime involved but down here this G function that we're talking about is only a function of two will variables so so a m term here will have only will be the product of only two variables rather than the product of three variables as was the case up here with f so um so to to just stress that idea if uh somebody ask you is uh WX y prime a minterm if somebody ask you that you cannot answer that question until you know what Boolean variables are available if WX and Y Prime if if if it's a problem like this uh F of wxy is equal to wxy prime plus some other terms then in that case uh wxy Prime is a m term but in in a problem if you had G of WX Y and Z is equal to WX y prime plus some other terms then this in this case wxy Prime is not a m term so in order to say whether or not something is a m term or for that matter a Max term we haven't talked about those yet but in either case you need to know what are all of the Brant variables that are under consideration in the uh problem at hand now uh let's uh go back to our well let's let's just maybe make another example let's say for instance we might say uh f of x y and z is equal to X Y or X Y Prime Z Prime here's an example and I hope um that you are readily agree that this second term here is a Min term because it is a simple product of all of the billion variables under consideration and this uh first term is not a Min term now you might be curious to know where this terminology minterm comes from and and I can uh show you that very easily by looking at the truth table for each of these terms so uh in this problem we have x y and z are the possible Boolean variables and then we'll look at the truth table for XY and then over here we'll make a truth table um for the term X Y Prime Z Prime and let's see what these two truth tables look like and then uh we'll be able to see why X Y Prime Z Prime is a minterm or why it's called a m term and why XY is not now as usual we want to consider all the possible combinations of the Boolean variables and we always will list them in this order when there are three Boolean variables and they're listed in our function in the order X Y and Z then we'll list them in that same order in the truth table and then when we list out the different possible combinations notice we list them in such a fashion that if we considered each threesome to be a binary number then we would have zero 1 2 3 4 5 6 and 7 so it's important to realize that that we always will list it in this way now if we uh go ahead then and evaluate XY for each one of those possibilities we can easily fill in very quickly fill in the first four rows because in each of the first four rows X is equal to Z and zero ended with anything at zero so we know for sure that XY is equal to Zer in the first four rows similarly XY is equal to 0 in the next two rows as well because in those two rows Y is zero and again 0 ended with anything is zero but in the last two rows X and Y are both equal to one and one ended with one is one so for the last two rows XY is equal to one and so this would be the truth table for the term XY now let's find the truth table for the term X Y Prime Z Prime okay um well um we can once again as we did before we can say immediately the first four rows will be zero because we noticed that in this term X Y Prime Z Prime the first variable is X and X is equal to zero in the first four rows and zero ended with anything as zero so we immediately get four zeros now the next term is y Prime and Y Prime will be equal to zero whenever Y is equal to 1 and so if we look at our remaining rows we see that here looking at the Y column we can see that Y is equal to 1 in each of the last two rows so if Y is equal to 1 again then this will make y Prime equal to Z up here in this expression but if y Prime is equal to zero then we have X Ed with zero ended with Z Prime and 0 ended with anything is zero so we can immediately put a zero in the last two rows and now we all we have remaining uh to consider of the of the combinations 1 0 0 and one 01 well uh when X is equal to 1 and Y is equal to 0 and Z is equal to 0 well since X is equal to 1 we'd have a one here for x uh y Prime since Y is zero y Prime will be one since Z is zero Z Prime will be one so this would give us one anded with 1 one ended with one which is one and for the uh this final term 1 01 well notice that when Z is equal to 1 this Z Prime here in this term X Y Prim Z Prime Z Prime will be equal to zero and zero ended with anything is zero so this is the true table for the term x y Z Prime and the difference that we notice when we look at these Tru two truth tables is that the truth table for X Y Prime Z Prime which is a in term yields a value of one under only one circumstance but when we have this other term it yields a value of one under more than one circumstance I don't want to say exactly I mean in this case it's one but for instance if we had U looked at um let's let's look so let me have you second this is not a Min term and uh as another example we could do something like this if we said XY Z and let's say another example of something that's not a minterm would be X Prime and so if we drew up the true table for that well we readily see that um X Prime that's is very easy to get the truth t for that because X is equal to zero in the first four rows so therefore X Prime is one and in the last four rows X is one so X Prime is zero and so this two uh this function as well or this term is um is clearly not a m term because it is equal to one in a number of different cases but a one one is excuse me a Min term is equal to one on a minimum number of occasions which is just one occasion there's only one combination of the variables in this case for this m term it would be 1 0 0 only that combination of the variables will make this term equal to one all other combinations um will make it equal equal to zero so that's the idea of why a Min term is called A Min term is because it's equal to one in a minimum number of situations now this idea is actually very powerful and in fact it relates to the final problem that you had on quiz uh on test six uh let me uh remind you of that problem or uh to be honest I don't remember the exact numbers but I can give you an example similar to it so I'll say example similar to the final problem on test six now you will remember uh that on that final problem we had something like this we had a truth table XYZ and then we had a function f of XYZ and so you had a truth table and uh this was filled in I I believe the numbers might have been this zero no maybe it was um well I think it was 0 1 1 0 0 1 0 0 something like that it doesn't matter this the example is um the the idea is the main point so suppose that we had this function f of XYZ and this is the truth table for f and we want to express F in terms of x y and z well uh so I'll say Express F of XYZ in terms of X Y and Z okay that's our goal well I'm going to do something called um uh uh using the minterm expansion so one way to do this is to find the minterm expansion for f now what does this mean well let me just go ahead and give you the answer and then we'll see uh why it's true and actually what I'll do uh I'll go ahead and put the answer up here and then I'll uh transfer it down to the bottom of the page in a moment the midterm expansion for this function F of XYZ is the following I'll go ahead and write down the answer and then I'll explain why it's true okay that is a an expansion of the function f in terms of men terms which is also called a minterm expansion and uh let's now try to understand this expression well first of all I hope that all of you will agree that each one of these three terms is indeed a m term because each one is a simple product of of all of the available Boolean variables in either complemented or uncomplemented form so it's clear that all of these are Min terms but how can we see that the sum of these three men terms is equal to this function f that's shown over here in the truth table well think about what we just learned remember that each one of these Min terms is only going to be equal to one in one case in in other words under one possible combination of the variables X Y and Z so let's identify those combinations and I think that that will help us to see that this expression is indeed uh equal to the given function f let's first look at X Prime y Prime Z what combination of X Y and Z will make this m term equal to one well um if any one of these variables here is equal to zero it certainly can't be equal to one because zero ended with anything will give us zero so we have to choose X Y and Z in such a way that each one of these will give us one well for X Prime to be equal to 1 x must be zero for y Prime to be one Y Must Be zero and for Z to be one well Z must be one so the combination that will make the first M term equal to one is X = 0 y = 0 and Z = 1 now I'm Sugg suggest that you turn off the tape for a moment and try to find the situations that will make the remaining two Min terms equal to one and then resume okay I hope that you concluded that for this second Min term the situation that we make it equal to 1 is X = 0 y = 1 Z = 0 uh we need X to be zero because we have an X Prime here and we need need Z to be zero because we have Z Prime uh y uh is just itself so when X is equal to zero that will make X Prime 1 when Y is equal to 1 then of course Y is 1 and when Z is equal to zero Z Prime will be one so we have one ended with one ended with one which is one and finally now what is what are the circumstances or what is the combination of variables uh that will make the last Min term equal to one well we want X = to 1 y = 0 and Z = to 1 now um let's think about to to finish our line of reasoning here let's think in the following way okay so the first Min term the X Prime y Prime Z term will always be equal to zero except when X is z y is z and Z is 1 the second term will always be zero except when X is z y is 1 and Z is 0 and the last term will always be equal to zero except when X is 1 and Y is zero and Z is 1 so when we sum these things up when we sum up these three terms well obviously if we're summing up zero or with 0 0 or with zero we're going to get zero so F will always be zero except when one of these M terms is equal to one so so F will be zero in all situations except it won't be zero when X is z and y is z and Z is one because in that case the first M term is one and one now true uh this m term and that M term this second Min term and the third Min term are still equal to zero under the that choice of variables but the first one is now when X is z y is z z is one first M term will be one and one or with Z or with Z is one so in this possible in this combination X is z y is z z is one that's one time when F will be one likewise when X is z y is 1 and Z is z the first M term and the last M term will be zero but this one will be one and so zero or with one or with Z is one and finally X is one y is z and Z is one this midterm will be equal to one the first two will be zero and so we have zero order with 0o or with one which is one so there will be three cases when f is equal to 1 and in all other cases it will be equal to zero in the three cases when F Beal to 1 or x = 0 y = 0 = 1 x = 0 y = 1 = 0 and x = 1 y = 0 Z = 1 and if you look now at the truth table you will see that that exactly the description we just gave exactly matches the information in the true table we see that f is always equal to zero except the first case when it's not equal to zero is when X is zero Y is z and Z is is one which of course is this case the second case when f is not equal to zero is when X is z y is 1 and Z is z which of course is the second case and the final situation that will make F not equal to zero is when X is 1 Y is z and Z is 1 and that's this case so you can see how I was able to come up with this minterm expansion so easily I simply looked for the rows here these three rows that contained uh ones and then thought about what the coresponding minterm would be and that's how we find the minterm expansion for a function so let's repeat down here uh this Min term we have X Prime y Prime Z or X Prime y z prime or X Y Prime Z now uh um again this is the midterm midterm expansion for f now sometimes we use another notation and uh that notation can be uh explained in the following way is convenient especially when you have many Boolean variables available is convenient to find a shorthand way of noting the Min terms rather than having to write out every single variable as we have here notice we have XYZ XYZ XYZ we you know we just have to know which ones get the primes and which ones don't well when you have maybe six billion variables it gets tiresome to write out all six variables again and again and again simply so that you can then put compliments in in uh some locations so what is this alternative notation well it goes in the following way you want to know the situation we we already know that the men term equal one and in only one situation and so we use that situation to actually name the M term let me show you what I mean so if we look at this first minterm here x Prime y Prime Z as we have already noted that will always be equal to zero except in the case when X is z y is zero and C is one now we interpret those three number numbers together is a binary number and the binary number of course 0 01 would be the binary number one and so we say Little M that's because of M term M terms will get a little M and later when we get to Max terms that we get a capital M but this is Little M and then the number one the next M term here will be equal to one when X is zero Y is 1 and Z is z and the binary number 0 1 0 is the same thing as two so this is M2 now take a moment to try to figure out the notation for the last men term and then we'll do it together okay I hope you concluded that uh for this one we need x = 1 y = 0 and Z = 1 and so this uh 101 the binary number 101 is five and so we have little M5 for that and we can also look up here at the truth table we see this is 0 1 2 3 4 5 6 and 7 and sure enough in rows one 2 and five those were the rows that had wands so this is an alternative um uh notation for f and still another way an even more compact way of listing this is the following we say summation of little m 1 2 5 so these are these are just different ways of identifying the function f and expressing it in terms of Min terms uh which is a very handy thing to do let's now look at another example just to emphasize how convenient this idea of a interterm expansion can be suppose in this example that we have of the following G of XYZ is equal to XY Z prime or X Prime y Prime Z prime or XYZ now um I hope you recognize that each one of these is a minterm and suppose that we were asked to find the truth table for G well I hope that you're now ready to do this rather quickly remember as usual we list on the left the uh independent variables which in this case are X Y and Z but now we're not going to have any intermediate columns at all we won't need those because of what we've learned about Min terms we'll be able to write down G of x y z immediately and let's see how this goes now so those are all the possibilities for X Y and Z those are all eight possible combinations and now uh as I mentioned because of the the the power of this minterm expansion idea we're not going to have to list any intermediate columns at all we'll be able to immediately uh write down what G is equal to and the way that our reasoning proceeds is as follows we notice that if we if we think about each one of these men terms individually we see that the first one will be equal to one only when X is one and Y and Y is one and Z is zero the fir the second one will be one only when X is zero Y is z and Z is z and the last M term will be one only when X is one y is one and Z is one so these three combinations 1 1 0 0000 0 and 111 are the only three situations in which this function will be equal to one at all other in all other cases each one of the M terms will be zero and if each one of those is zero then on the right hand side we have zero or with zero or was Z which of course is zero so we come over here to the um table and for the first one we write one because that's the 00 0 option and we're going to also have one in the one one0 position because of the first M term and a one and the 111 row because of the last Min term and everything else will get a zero and that we have the trueu table for G just that quickly and if uh we were challenged uh to write the um uh expression for G in this alternative notation that we learned uh we could write the following we can say uh G of XYZ is equal to usually we write these in ascending order so we would write little m0 or with little M6 or with little M7 notice little m0 is this middle uh M term the 0000 0 one M6 6 of course is 110 and binary and then 111 in binary is is seven so m0 is the middle minterm here M6 is the first One M7 is the last one or we could also write this even more compactly in this way so that's how we would do a problem like that so now that we see the power of this minterm idea uh we can readily see why it's an attractive thing to do and so it might occur to you well suppose you have an expression such as this F of XYZ is equal to maybe um X Prime y or uh y Prime Z and you wanted to find the truth table for that well notice right away that we cannot use the ideas that we've just been developing for minterm expansions because neither one of these terms on the right hand side is a minterm and so this looks like a situation where we'll have to list the independent variables on the left hand side and then have some intermediate columns where we uh would calculate X Prime Y and then y Prime Z and then finally have a a result column where we or those two together uh that looks like the case but actually there is another alternative we can convert this we can take the approach of first converting this to a midterm expansion so we'll say first get a minterm expansion now you might wonder uh how do we get a minterm expansion when neither of these terms on the right hand side is a minterm well it can be done in the following way okay uh we'll rewrite our function f of XYZ is equal to X Prime y now remember that anything anded with one is equal to itself so we're going to end that term with one and likewise we will end the second term with one as well and I notice that I'm putting one in the location of the missing variable in other words um in this first term what's missing uh what what we would need to make it a Min term is a something in the Z position so here I've put a one in the Z position and in the uh last term I've put a one in the X position because we don't have anything there in the second term now I'm going to pull the following trick we know that one way we could rewrite the number one is as this Z or with Z complement any any Boolean variable or board with its complement will be equal to one uh for instance you know when Z when Z is equal to zero Z Prime is one and when Z Prime is zero Z is one so always one or the other of these two terms will be one and one order with anything is one and we do the same thing uh in the second term except this time we rewrite uh one as X or X Prime and now if we multiply this out we get X Prime y z or X Prime y z prime or X Y Prime Z or X Prime y Prime Z and now we have a minterm expansion just that easily and um um to actually get the truth table probably the very easiest way is to go to the alternative uh notation so we do that by remembering that okay the first one is going to go to one when X is zero Y is 1 Z is one the second one will go to one when X is zero Y is 1 one and Z is z the third one when X is 1 Y is z and Z is one and the final one when X is z y is zero and Z is one so uh if we think about these numbers this is the number three this is two this is five and this is one so so F the function f is the same as the summation of the four men terms M1 M2 M3 and M5 and so now to now that we have found the minterm expression for f we can easily uh get the truth table so uh we have M term one 2 3 and five and therefore we put a one in the rows corresponding to the binary numbers one 2 3 and five and all the other rows will get zero and that is it that's the truth table for f and the uh final uh final point I want to make in this U uh lecture let's do one final example and then we'll look at some uh test problems but let's uh in this final example let's suppose that g of XYZ were equal to um X or uh y Prime and uh let's just say that we were asked to find the uh minterm expansion well clearly neither one of the terms on the right hand side is equal to a m term in fact neither one is even very close because the the first term is missing Y and Z the uh second term is missing x and z and so uh we just extend the idea that we employed in the in the previous example we write down one wherever we're missing a variable so that becomes X and one and one for that first term and one or Y prime or or one for the second term and now we will proceed as follows this first one here we will rewi as y or Y Prime and the second one we will rewrite as Z or Z Prime and for the um second term uh we will have X or X Prime y Prime Z or Z Prime and so now if we uh complete this we will have uh XYZ or XYZ prime or X Y Prime Z or X Y Prime Z Prime or X Y Prime Z or X Y Prime Z prime or X Prime y Prime Z or X Prime y Prime Z Prime okay just checking the work here and I believe everything is correct and now uh let's go ahead and put this into the so-called little M notation so we'll have 11 one there 1 one0 no remember now I'm just um writing down the values of the that the variables would need to have in order for the minterm to be equal to one so um 111 and 11 1 0 here we would need 1 0 1 here 1 0 0 1 0 1 1 0 0 0 0 1 and 0 0 0 and of course 111 is 7 11 1 0 is 6 101 is 5 1 0 is 4 101 is 5 1 0 is 4 01 is 1 and 0 0 is z now before we proceed to the final step uh notice that we have some repetition here uh we have a little M4 here x Prime y Prime excuse me X Y Prime Z Prime and we have the same term here X Y Prime Z Prime well we know that any Boolean expression or with itself is itself and so we can take one of those away and likewise we have little M5 repeated X Y Prime Z is here and X Y Prime Z is also over here so we can take away that as well and once we've taken those two away there are no repetitions and so we'll write down our final result I think I'll leave a little more space here and we have um G of XYZ is equal to the sum of the Min terms 0 1 4 five 6 and 7 and there is your minterm expansion for G and now of course uh you know that if you it would be very easy to find the truth table for G so that shows the power of the mm the idea of minterm expansion and now we'll have a u test on that idea and then for the next lecture we'll talk about Max terms and Max term expansions so our two test problems are the following uh 7.1 says which of the following is a valid expression for the function repres represented in this truth table so we have a function f of the three Boolean variables X Y and Z and there you have the truth table for f and then you're given four possible expressions for f and you need to choose which one of these is uh a valid expression for f and then for problem two you're asked to find the minterm expansion for the function G of XYZ which is equal to X complement or with Y and Z and you have U four Expressions there a b c and d given in the Little M notation and you need to find which of these is the correct midterm expansion for the function G uh good luck and that concludes lecture 7