Quine–McCluskey algorithm: Difference between revisions

Content deleted Content added
m Fix bugs in pseudocode implementation
Ajmullen (talk | contribs)
Finished the pseudocode, know possible to write the complete algorithm.
Line 300:
 
==== Finding the essential prime implicants ====
Using the function, <code>CreatePrimeImplicantChart</code>, defined above, we can find the essential prime implicants by simply iterating column by column of the values in the dictionary, and where a single <code>"1"</code> is found then an essential prime implicant has been found. This process is described by the pseudocode below.
'''function''' getEssentialPrimeImplicants(Dictionary primeImplicantChart, list minterms)
essentialPrimeImplicants ← new list
mintermCoverages ← list with all of the values in the dictionary
'''for''' i = 0 '''to''' length(ticks) '''do'''
mintermCoverage ← ticks[i]
'''for''' j = 0 '''to''' length(mintermCoverage) '''do'''
'''if''' mintermCoverage[j] == "1" '''then'''
essentialPrimeImplicants.Add(primeImplicantChart.Keys[i])
'''return''' essentialPrimeImplicants
Using the algorithm above it is now possible to find the minimised boolean expression, by converting the essential prime implicants into the canonical form ie. <code>-100 -> BC'D'</code> and separating the implicants by [[Logical disjunction|logical OR]]. It should be noted that the pseudocode assumes that the essential prime implicants will cover the entire boolean expression.
 
==See also==