document.write( "Question 1191166: Simplify the following functions using a K-map
\n" ); document.write( "a. F(X,Y, Z) = π ( 0, 2, 5,7)
\n" ); document.write( "b. F(X, Y, Z) = XY’Z + X’ + Z + Y’Z’
\n" ); document.write( "c. F(W, X, Y, Z) = X’ Y’Z’ + XYZ’ + WXY + W’X’Y’ + WZ
\n" ); document.write( "d. F(W, X, Y, Z) = X’ + XZ’ + WX’Y + W’Y’ + WZ\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Can you also explain me this second homework step-by-step please? Thank you!
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #823090 by math_tutor2020(3817)\"\" \"About 
You can put this solution on YOUR website!

\n" ); document.write( "I'll do part A to get you started. \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "If you still need help with the others, then please make a new post.
\n" ); document.write( "Please post one problem at a time.
\n" ); document.write( "The solution page tends to get a bit cluttered when there are multiple problems per post.
\n" ); document.write( "Though to be fair, my responses get a bit lengthy/wordy sometimes. I apologize in advance.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "========================================================================================================\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Part A\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Maxterms (3 variables)
\n" ); document.write( "\n" ); document.write( "\n" ); document.write( "
     Maxterms
XYZTermDesignation
000X+Y+ZM0
001X+Y+Z'M1
010X+Y'+ZM2
011X+Y'+Z'M3
100X'+Y+ZM4
101X'+Y+Z'M5
110X'+Y'+ZM6
111X'+Y'+Z'M7
\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "F(X, Y, Z) = π ( 0, 2, 5,7) ..... product pi function of those listed maxterms
\n" ); document.write( "F(X, Y, Z) = M0 * M2 * M5 * M7 .... another way to state the product
\n" ); document.write( "F(X, Y, Z) = (M0) * (M2) * (M5) * (M7)
\n" ); document.write( "F(X, Y, Z) = (X+Y+Z) * (X+Y'+Z) * (X'+Y+Z') * (X'+Y'+Z') .... use the table above\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Let's set up the K-map, more formally known as the Karnaugh Map, but I'll refer to it as K-map from now on.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "We have n = 3 literals X,Y,Z.
\n" ); document.write( "This yields 2^n = 2^3 = 8 different inner cells of the K-map.
\n" ); document.write( "This particular K-map is going to be a table with 2 rows and 4 columns to produce the 2*4 = 8 cells needed.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Along the left side, we'll have 0 and 1 to represent the idea of either X or X' in that order.
\n" ); document.write( "This applies to maxterms only.
\n" ); document.write( "With minterms, the order would be swapped (0 goes with X' and 1 goes with X).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Along the top we have these values: 00, 01, 11, 10
\n" ); document.write( "The order is important.
\n" ); document.write( "The first slot is the Y position, and the second slot is the Z position.
\n" ); document.write( "0 in the 1st slot means Y, 1 in the 1st slot means Y'
\n" ); document.write( "0 in the 2nd slot means Z, 1 in the 2nd slot means Z'\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "You might be thinking \"wait a minute, isn't 11 supposed to be AFTER 10 in binary?\".
\n" ); document.write( "You'd be correct in thinking that, but I'm instead using Gray Code notation.
\n" ); document.write( "More on that is provided at the following links for further reading.
\n" ); document.write( "https://www.tutorialspoint.com/what-is-gray-code
\n" ); document.write( "https://www.learnabout-electronics.org/Digital/dig16.php#gray
\n" ); document.write( "Also, this link
\n" ); document.write( "https://www.learnabout-electronics.org/Digital/dig24.php
\n" ); document.write( "makes a mention of a gray code sequence as well.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Basically when going from 01 to 11, we only change one binary digit.
\n" ); document.write( "Namely, we change the left digit from 0 to 1. Then going from 11 to 10 we flip the right-most bit.
\n" ); document.write( "Once again, we change one digit at a time.
\n" ); document.write( "Notice that when conventionally counting in binary we have 01 turn into 10 where both bits flip, which is what we don't want.
\n" ); document.write( "I'm probably not explaining this very well, but hopefully those links will do a better job to clear up any confusion. \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "To summarize the table so far, we have:
  • 0 and 1 as a column on the left most side to represent either X or X' in that order.
  • 00, 01, 11, 10 along the top to represent The combos of Y, Y', Z, Z'.
Figure 1 shows what we have so far.
\n" ); document.write( "
\n" ); document.write( "Only the left and top headers are filled in. The actual inner stuff is blank for now.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Now to fill in this table with an intermediate set of expressions. Those expressions being M0 through M7.
\n" ); document.write( "We'll combine the headers we made to pinpoint the location of each maxterm.
\n" ); document.write( "In the top left corner we have X = 0 and YZ = 00. They combine to XYZ = 000. I'm not multiplying these items. I'm doing string concatenation. My use of notation here is probably a bit unconventional but hopefully you get the idea of what I mean.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Refer to the maxterms chart above to see that (X,Y,Z) = (0,0,0) refers to M0.
\n" ); document.write( "As another example, the bottom right corner has X = 1 and YZ = 10 to produce XYZ = 110. This binary number 110 corresponds to M6.
\n" ); document.write( "The other M values will follow the same idea.
\n" ); document.write( "Once all the M0 through M7 values are in place, you should get what you see in Figure 2 as shown above.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Next we replace the M values with either 0's or 1's.
\n" ); document.write( "More specifically we replace the following M terms {M0,M2,M5,M7} with 0s. Everything else gets a 1.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Check out Figure 3 to see what the K-map should look like once it is filled out completely (minus any groupings just yet).
\n" ); document.write( "\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Then in figure 4, I've color-coded the groups as described by the rules/steps mentioned in these links
\n" ); document.write( "https://www.learnabout-electronics.org/Digital/dig24.php
\n" ); document.write( "https://www.javatpoint.com/simplification-of-boolean-expressions-using-karnaugh-map
\n" ); document.write( "There are a few rules to keep in mind, but the idea is to group up the 0s together (this applies to maxterms only).
\n" ); document.write( "Each group of zeros has a count of either 1, 2, 4, 8, 16, ... ie some power of 2.
\n" ); document.write( "We can only group to the immediate adjacent neighbor but not along any diagonal.
\n" ); document.write( "We can span off the edge and end up on the other side to form a group that way, which is how I formed group A.
\n" ); document.write( "The first link goes into more detail why we can join up the edges. The link shows a cylinder shape in one of their diagrams to illustrate what's going on.
\n" ); document.write( "The goal of simplification is of course to have as few groups as possible.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Now to figure out what to do with the groups (you'll have to pretend that the very bottom of figure 4 didn't spoil the punchline).
\n" ); document.write( "In group A, we have X = 0 and Z = 0. This produces the sum X+Z. We use zeros for maxterms for the original literal.
\n" ); document.write( "In group B, we have X = 1 and Z = 1. This produces the sum X'+Z'. Ones indicate complements of the original literal.
\n" ); document.write( "Therefore, the product of these groups is F(X, Y, Z) = (X + Z)(X' + Z') which is the final answer.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "So we can say F(X, Y, Z) = π( 0, 2, 5, 7) = (X + Z)(X' + Z')
\n" ); document.write( "Or more thoroughly,
\n" ); document.write( "π( 0, 2, 5, 7) = (X+Y+Z) * (X+Y'+Z) * (X'+Y+Z') * (X'+Y'+Z') = (X + Z)(X' + Z')\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Notice how Y is nowhere to be found in the simplified product-of-sums answer.
\n" ); document.write( "This is because neither the presence of Y nor Y' affect the final outcome based on what the K-map shows.
\n" ); document.write( "In the first pink cell of group A (on the left) we have Y = 0; in the right pink cell we have Y = 1.
\n" ); document.write( "For both cells mentioned, the result is 0. Hence this is the reason the literal Y doesn't matter, so it can be eliminated.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "For similar reasoning, group B doesn't have Y either. The Y is entirely redundant.
\n" ); document.write( "If your teacher has introduced circuit analysis, try to draw a circuit diagram so you can spot the visual reason/proof the variable Y is not needed. This is an exercise left to the reader, but feel free to ask if you get stuck. \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Here is a useful K-map calculator to check your work.
\n" ); document.write( "https://www.charlie-coleman.com/experiments/kmap/
\n" ); document.write( "Try not to rely solely on the calculator without having to do any (home)work or thinking beforehand.
\n" ); document.write( "Rather, you should only use it when to check your work or perhaps use it when you get stuck somehow.
\n" ); document.write( "There are other handy free online calculators as well you can search out, if you prefer.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "It appears that calculator only accepts minterms (well the index number of them anyway). So you'll have to keep that in mind for maxterm problems.
\n" ); document.write( "Instead of typing in the list of maxterms 0,2,5,7 you would type in the minterms 1,3,4,6.
\n" ); document.write( "The calculator has a nice feature to swap between Product-of-Sums and Sum-of-Products formats.
\n" ); document.write( "It displays the algebraic notation, as well as of course the Karnaugh Map itself when you scroll down to the bottom of the page.
\n" ); document.write( "The map also shows how the terms group up (one marked in pink, the other in light blue).
\n" ); document.write( "As you swap between Product-of-Sums and Sum-of-Products formats, the groupings will change but the numbers themselves will stay fixed.
\n" ); document.write( "This in my opinion is a very nice way to tie minterms and maxterms together in a visual sense.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "------------------------------------------------------------------------------------------------------------------\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Here's how you could simplify without the use of a K-map. This is an optional section.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "First we'll need a handy reference of Boolean Algebra laws (unless you've memorized them and don't need the table)
\n" ); document.write( "\n" ); document.write( "\n" ); document.write( "
NameAND formOR form
Identity Law1*A = AA+0 = A
Null Law0*A = 0A+1 = 1
Idempotent LawA*A = AA+A = A
Inverse LawA*A' = 0A+A' = 1
Commutative LawA*B = B*AA+B = B+A
Associative LawA*(B*C) = (A*B)*CA+(B+C) = (A+B)+C
Distributive LawA+B*C = (A+B)*(A+C)A*(B+C) = A*B+A*C
Absorption LawA*(A+B) = AA+A*B = A
De Morgan's Law(A*B)' = A' + B'(A+B)' = A'*B'
The star or asterisk symbol is sometimes omitted.
\n" ); document.write( "Overhead horizontal bars are sometimes used in place of tickmarks to mean complements.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "I'll also be using this standard list of minterms (3 variables)
\n" ); document.write( "\n" ); document.write( "\n" ); document.write( "
     Minterms
XYZTermDesignation
000X'Y'Z'm0
001X'Y'Zm1
010X'YZ'm2
011X'YZm3
100XY'Z'm4
101XY'Zm5
110XYZ'm6
111XYZm7
\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "From there we can say this:
\n" ); document.write( "F(X, Y, Z) = π ( 0, 2, 5, 7) ............... product of given maxterms
\n" ); document.write( "F(X, Y, Z) = ∑ ( 1, 3, 4, 6) ................ sum of minterms not previously listed
\n" ); document.write( "F(X, Y, Z) = m1 + m3 + m4 + m6 ............. translate from sigma form to an actual sum of minterms
\n" ); document.write( "F(X, Y, Z) = X'Y'Z + X'YZ + XY'Z' + XYZ' ..... replace each minterm using the table above
\n" ); document.write( "F(X, Y, Z) = X'(Y'Z + YZ) + X(Y'Z' + YZ') ....... Distributive Law
\n" ); document.write( "F(X, Y, Z) = X'((Y'+Y)Z) + X((Y'+Y)Z') ....... Distributive Law
\n" ); document.write( "F(X, Y, Z) = X'((1)Z) + X((1)Z') ....... Inverse Law
\n" ); document.write( "F(X, Y, Z) = X'Z + XZ' ....... Identity Law.
\n" ); document.write( "F(X, Y, Z) = XZ' + X'Z ....... Commutative Law
\n" ); document.write( "F(X, Y, Z) = 0+X*Z'+Z*X'+0 ....... Identity Law
\n" ); document.write( "F(X, Y, Z) = X*X'+X*Z'+Z*X'+Z*Z' ....... Inverse Law
\n" ); document.write( "F(X, Y, Z) = X(X'+Z')+Z(X'+Z') ....... Distributive Law
\n" ); document.write( "F(X, Y, Z) = (X + Z)(X' + Z') ....... Distributive Law\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "In step 2, I converted to a sum of products because I think that's the easier route to take.
\n" ); document.write( "Though of course you might find the product-of-sums method easier.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Product-of-Sums answer format:
\n" ); document.write( "F(X, Y, Z) = (X + Z)(X' + Z')\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Sum-of-Products answer format:
\n" ); document.write( "F(X, Y, Z) = X'Z + XZ'\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Since you started with the product pi function, it probably makes sense to stick with the product-of-sums answer format.
\n" ); document.write( "Though it's beneficial to know how to go back and forth between each form.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Here is the verification boolean table (which may be optional based on your teacher's requirements).
\n" ); document.write( "https://docs.google.com/spreadsheets/d/1dfZ5jU_fWKpOaWb1WYjyAU2I1ykmDqZTiyj81yLNlVo/edit?usp=sharing
\n" ); document.write( "You don't need to have a google account to be able to view the page.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Answer to part A is F(X, Y, Z) = (X + Z)(X' + Z')
\n" ); document.write( "
\n" ); document.write( "
\n" );