Sub topic 17
GATE Problem Patterns and Shortcuts
Prerequisites and exam strategy
This chapter assumes that you can read binary numbers, use basic logic gates, write minterms and maxterms, and simplify Boolean expressions. You should also know Karnaugh-map grouping and the Quine-McCluskey method.
GATE questions usually test one of four skills:
- Finding a minimum SOP or POS expression.
- Counting literals, terms, gates, or gate inputs.
- Implementing a function using only NAND or only NOR gates.
- Selecting prime implicants and handling don't-care conditions.
First identify the required output. A minimum expression, a minimum number of gates, and a minimum number of literals are different optimization goals.
A reliable minimization workflow
Use this sequence when a question gives minterms:
- Write the function as \(F=\Sigma m(\ldots)\), including don't-care terms separately as \(d(\ldots)\).
- Decide whether SOP or POS is requested.
- For SOP, group 1-cells. For POS, group 0-cells.
- Use don't-care cells only when they enlarge a group. They do not have to be covered.
- Prefer groups with more cells because they remove more variables.
- Check that every required 1-cell or 0-cell is covered.
- Count the requested quantity only after obtaining the final expression.
A group must contain \(1,2,4,8,\ldots\) cells. Groups may wrap around an edge, and corner cells can be adjacent. Diagonal cells are never adjacent.
Counting shortcuts
For a two-level SOP expression, the number of product terms is the number of AND terms. The literal count is the total number of variable appearances.
For example, in
\[ F=AB+\overline{A}C+BCD \]
there are three product terms and seven literals. If complemented variables require separate NOT gates, count those gates according to the question's stated model.
| Quantity | What to count | Example for \(AB+\overline{A}C+BCD\) |
|---|---|---|
| Product terms | AND terms separated by OR | 3 |
| Literals | Variable appearances | 7 |
| Two-input AND gates | Depends on fan-in restriction | 4 if decomposed |
| Final OR gate | One OR combining terms | 1 |
A \(k\)-literal product term needs \(k-1\) two-input AND gates when only two-input gates are allowed. An OR gate combining \(r\) terms needs \(r-1\) two-input OR gates. Do not apply these counts when gates have unlimited fan-in.
NAND-only and NOR-only patterns
NAND gates implement NOT, AND, and OR:
\[ \overline{A}=\operatorname{NAND}(A,A) \]
\[ AB=\operatorname{NAND}(\operatorname{NAND}(A,B),\operatorname{NAND}(A,B)) \]
\[ A+B=\operatorname{NAND}(\overline{A},\overline{B}) \]
A factored SOP expression maps naturally to NAND-NAND logic. A POS expression maps naturally to NOR-NOR logic. This structure often gives fewer gates than converting the expression first.
def literal_count(terms):
"""Count variable symbols in a list of product terms."""
return sum(len(term.replace("'", "")) for term in terms)
terms = ["AB", "A'C", "BCD"]
print("terms:", len(terms))
print("literals:", literal_count(terms))Common traps
- Treating diagonal K-map cells as adjacent.
- Using a don't-care cell as if it were a required output.
- Forgetting that POS groups zeros, not ones.
- Choosing a cover with fewer terms but more literals when the question asks for literal minimization.
- Assuming a minimal expression is unique. Several minimum covers may exist.
- Counting gates without checking fan-in and whether complemented inputs are already available.
- Using Quine-McCluskey combinations that differ in more than one bit.
Exercise
For a two-level SOP expression with four product terms containing 2, 3, 1, and 4 literals, how many literals and how many two-input AND gates are needed if each term is implemented separately?
Show answer
There are 10 literals. The AND-gate count is (2-1)+(3-1)+(1-1)+(4-1)=5.