S1 Flashcards
P1 to P4
Q2
1
The Karnaugh map can be thought of as a special version of a truth table that makes it easier to map out parameter values and arrive at a simplified Boolean expression. The Karnaugh map can take two forms Sum of Product (SOP) and Product of Sum (POS) according to the need of the problem. The steps to solve an expression using Karnaugh map are:
1. Select K-map according to the number of variables.
1. Identify minterms or maxterms as given in the problem.
1. For SOP put 1’s in blocks of K-map respective to the minterms (0’s elsewhere).
1. For POS put 0’s in blocks of K-map respective to the maxterms(1’s elsewhere).
1. Make rectangular groups containing total terms in power of two like 2, 4, 8 ..(except 1) and try to cover as many elements as you can in one group.
1
Answer
Note: This is a SOP function, since it’s AND for inputs and then OR for the final output.
Note 33:24: Hazard happens when there’s latency in the gates so it can change the output for a moment.
Note 25:57: We have 2 main reasons for hazards: functional (more than one input changes) and logical (only one input changes -due to gate latency- that causes hazard); functional is out of the scope.
Using only the number of changed bits we can find the answer, only option 1 has one bit changes.
if we want to solve it not using the options:
Note 29:35: Karnaugh map is drawn for 4 bits, to find hazards, we must find 1s that are adjacent but not in the same group for example for ac we put 1s (since it’s sop) where a and c are both 1 which creates the lower right group.
Note 34:30: to find the true direction of arrow, we must have latencies of the gates. it’s not actually bidirectional like in the options, the options are just potential hazards.
Note: Group sizes are a power of 2 so that we can write the terms.
Note Minterm: A minterm is a product term that includes all the variables in the Boolean function, with each variable appearing either in its complemented or uncomplemented form. (Me: the numbers in M() are 1s and the numbers in d() are don’t care values)
Note: to solve this, we need to create a karnaugh map for 5 variables, which is 2 4 * 4 tables, stacked.
Note PI and EPI: A prime implicant (PI) is a minimal product term that covers one or more minterms of a Boolean function. An essential prime implicant (EPI) is a prime implicant that is necessary to represent the Boolean function and cannot be eliminated by combining with other prime implicants.
Note: to solve this, we determine groups in each 4 * 4 table, groups are comprised of adjacent 1s and don’t cares, 0s have no place in the groups) if a group in one table and is not covered completely in the other group, it’s a PI, if this group contains only ones, it’s an EPI.
2
Answer
For this, we don’t use karnaugh, we use the options and keep in mind 2 points:
1) does f have 0? if not, then there should not be all (not)s, here f doesn’t have 0, so ~(BE) can not be in the simplified f (rule out option 1 and 4)
2) does f have 31? if yes, then we need to have an input without (not)s for inputs, f does have 31 and we have BE in the options 2 and 3.
We use the only different term between 2 and 3 and see which one can produce numbers that are in the function.
Note: function simplification does not have a specific answer, we can find different terms but they return the same thing for the same input. so using Karnaugh map here is not advised.
The process of logic minimization (me:simplification here) involves finding the minimum number of PIs and EPIs that cover all the minterms of a Boolean function. Once the PIs and EPIs have been identified, they can be combined to form a simplified logical function.
Note: for SOP functions, if there exists a hazard, it would be level 1 statict hazard (output is 1 but for a brief moment it becomes 0) for POS, if it exists it would be level 0 static (output is 0 but for a brief moment it’s 1).
Note: Only inputs that are in multiple places in the circuit can cause hazards (have a path with different delays to the output)
Note: in POS we work with 0s instead of 1s in the Karnaugh map. meaning that if we have f=(~b+~c)(~a+c+~d) in the map we assign 1 to nots (~) so for the group (~b+~c) we have 0111,1111,0110,1110 in the group and for the value, we put 0 s in the map instead of 1.
Note 50:00: Hazards always go from the group with lower latency to groups with higher latency. here, it takes 8ns for c in (~b+~c) to reach the output and 16ns for c in (~a+c+~d) to reach the output, so by changing the input from 1111 to 1101 (abcd value for adjacent 0 s that belong to two different groups in pos karnaugh map), we create a level 0 hazard by this change.
1
Answer
Note: This is a Pos in the options but sop in the question. so by finding numbers using the function, since it’s in the form of SOP, we find minterms, so maxterms shouldn’t be in them. (maxterms are in functions with POS format)
Note: Xor is an odd function, meaning when the number of 1s in the input is odd, it returns 1 else it’s 0.
Note: A prime implicant (PI) is a product term that covers as many minterms as possible, and it cannot be combined with any other implicant to cover more minterms (P3-49:20 example of non-PI product term ~C~D~E option 4)
3
the difference between option 2 and 3 is that 2 doesn’t return 0, since 0 is a don’t care value, then it could potentially not be in the simplified function, but after drawing a Karnaugh map, we see that including 0 is necessary.
Q18 Note: Can we write a simplified/minimized version of a logic function, without using the don’t cares in the Karnaugh map?
yes.(P3-57:35) because we may not use a don’t care in the groups if not necessary.