Gate-Level Minimization

Learn how to turn a Boolean function into the simplest practical circuit. Use two-, three- and four-variable Karnaugh maps to find prime implicants and minimal sum-of-products and product-of-sums expressions, and use don't-care conditions to simplify further. Then build the results from NAND gates or NOR gates alone, in two-level and multilevel form, and use exclusive-OR gates for odd functions and parity checking.

BeginnerLesson 2 of 7 in Digital Logic Design Course

What you will learn

  1. Place a function of two, three or four variables on a Karnaugh map, group adjacent 1s into rectangles, and read off a minimal sum-of-products expression by choosing prime implicants.
    • Build and read two- and three-variable maps
      Set up a Karnaugh map in Gray-code order, fill it from a truth table or minterm list, and turn groups of adjacent 1s into simplified product terms.
    • Simplify four-variable functions
      Use the 16-cell map, including its wraparound edges and corners, to find the largest possible groups of 1, 2, 4, 8 or 16 cells.
    • Use prime implicants to find a minimal cover
      Identify all prime implicants and the essential ones, then choose the fewest and largest groups so that every 1 is covered and no group is redundant.
  2. Simplify a function by grouping its 0s, take advantage of input combinations whose output does not matter, and choose and check the cheaper minimal form.
    • Simplify to a product of sums
      Group the 0s of a map to simplify the complement, then apply DeMorgan's theorem to write a minimal product-of-sums expression.
    • Use don't-care conditions
      Mark input combinations whose output does not matter and treat each one as a 1 or a 0, whichever gives a simpler expression.
    • Compare costs and verify a minimized design
      Measure the cost of a two-level circuit, choose between the sum-of-products and product-of-sums forms, and confirm that a simplified expression matches its truth table.
  3. Build any function from NAND gates alone or NOR gates alone, convert two-level and multilevel AND-OR circuits into these forms by matching inversion bubbles, and read such circuits back as Boolean expressions.
    • Use NAND and NOR as universal gates
      Explain why NAND and NOR gates can each build any circuit, and use their alternative graphic symbols to reason about inversions.
    • Build two-level NAND and NOR circuits
      Turn a sum of products into a NAND-NAND circuit and a product of sums into a NOR-NOR circuit, and recognize the other two-level gate forms.
    • Convert and analyze multilevel NAND and NOR circuits
      Convert circuits with more than two levels of AND and OR gates into NAND-only or NOR-only form by placing and matching bubbles, and find the function of a given NAND or NOR circuit.
  4. Use the properties of XOR and XNOR, recognize odd and even functions on a map, and design parity generators and checkers for error detection.
    • Apply exclusive-OR and equivalence properties
      Define XOR and XNOR, use their identities, and recognize and implement odd and even functions.
    • Generate and check parity bits
      Design even- and odd-parity generators and checkers with XOR gates and explain which transmission errors parity detects.

Gate-Level Minimization study guide

4 chapters

1

Read maps and choose a minimal cover

A truth table lists the required outputs; a Karnaugh map arranges them so useful combinations sit together. Begin with two- and three-variable maps, then use both wraparound directions in a four-variable map. Reading a group removes changing inputs, but choosing a minimal expression also requires deciding which groups are necessary. Prime and essential prime implicants make that choice systematic, even when several answers have the same cost.

1.1 Two- and three-variable maps

A Karnaugh map makes Boolean simplification visible. Each cell is one truth-table row, and neighboring cells differ in just one input. Grouping those cells removes inputs that no longer affect the result.

Boolean algebra reaches the same simplifications, but does not give a clear stopping signal by itself. A map shows which groups can still grow.

Put inputs in the right cells

A literal is a variable or its complement, such as x or x′. A prime mark means NOT; an overbar means the same thing. Read minterm numbers as binary, with the first listed variable as the most significant bit. In F(x,y,z), m5 means 101, so its product is xy′z. A list such as F=∑m(2,3,4,5) marks the cells where the output is 1; all other cells are 0.

A two-variable map has rows x=0,1 and columns y=0,1. Its top row contains minterms 0 and 1, and its bottom row contains 2 and 3. Three variables need eight cells. Keep x on the rows and put yz across the columns in Gray-code order:

x\yz00011110
0m0m1m3m2
1m4m5m7m6

The order 00, 01, 11, 10 makes each change involve one bit. The first and last columns also differ in only one bit, so the map wraps from left to right. Binary column order would create false neighbors.

Turn a group into a term

A valid group is a rectangle of 1, 2, 4 or 8 cells containing only 1s. Rectangles may cross the wraparound edge. Diagonal cells and groups of three are invalid. For example, 000 and 011 differ in two inputs, so they cannot form a pair.

Adjacent minterms combine by the Boolean law x′yz+xyz=yz(x′+x)=yz. Keep each input that stays fixed throughout the group: use its plain form for a fixed 1 and its complemented form for a fixed 0. Omit every input that changes. A pair removes one variable, a group of four removes two, and all eight cells give the constant F=1.

For F=∑m(2,3,4,5), pair 2 with 3. Their inputs are 010 and 011, so x=0 and y=1 stay fixed: the term is x′y. Pair 4 with 5 to get xy′. Thus F=x′y+xy′. Four three-literal minterms become two two-literal products.

Use edges and overlap

For F=∑m(3,4,6,7), pair 3 with 7 to get yz. Pair 4 with 6 across the outer columns to get xz′. The result is F=yz+xz′.

Larger groups can reuse cells. In F=∑m(0,2,4,5,6), cells 0, 2, 4 and 6 form a wrapped group of four giving z′. Pair 4 with 5 to cover the remaining 1, giving xy′. Cell 4 belongs to both groups; this is valid because repeating a covered 1 does not change the function. Even in a two-variable map, ∑m(1,2,3)=x+y uses two pairs that share cell 3.

For a minimal SOP, first minimize the number of product terms, then minimize literals among expressions with that term count.

Key Takeaways

  • Gray-code order keeps neighboring cells one bit apart, including the outer columns.
  • A group keeps fixed inputs and removes changing inputs.
  • Use rectangular power-of-two groups; overlap is allowed.
  • Minimal SOP means fewest terms, then fewest literals.

1.2 Four-variable groups and wraparound

A four-variable map has 16 cells. It follows the same grouping rule as a smaller map, but both pairs of opposite edges are adjacent. This makes groups at the corners easy to miss.

Lay out all 16 inputs

For F(A,B,C,D), put AB on the rows and CD on the columns. Use 00, 01, 11, 10 on both axes:

AB\CD00011110
000132
014576
1112131514
10891110

The entries above are minterm numbers, not output values. Replace them with the function's 0s and 1s when filling a map. Each cell has four one-bit neighbors: left, right, above and below, with wraparound at an edge.

The four corners are minterms 0, 2, 8 and 10. Their binary inputs are 0000, 0010, 1000 and 1010. All have B=0 and D=0; A and C vary. A group containing these four corners gives B′D′. Opposite diagonal corners alone do not make a pair: 0000 and 1010 differ in two bits.

Choose rectangles that remove literals

The side lengths of a valid rectangle are 1, 2 or 4 cells, allowing groups of 1, 2, 4, 8 or 16. A row of four and a 2-by-2 block are both valid. The two outer columns together form a wrapped 2-by-4 rectangle. An L-shape or a six-cell block is invalid.

In an n-variable map, 2k cells leave n−k literals. For four variables:

Cells in groupLiterals left
14
23
42
81
160: the function is 1

Cover every 1 at least once, using large groups and as few groups as possible. Start with cells that have only one possible largest group. Overlap can enlarge a group without causing any conflict.

Work from a large group to the remaining cells

Consider F(w,x,y,z)=∑m(0,1,2,4,5,6,8,9,12,13,14). The eight cells in columns 00 and 01 all have y=0, so they give y′. This leaves minterms 2, 6 and 14 uncovered.

Use cells 0, 2, 4 and 6: rows 00 and 01, across the outer columns. They keep w=0 and z=0, giving w′z′. Next use 4, 6, 12 and 14, which keep x=1 and z=0, giving xz′. Therefore F=y′+w′z′+xz′. The expression has five literals; the original 11 minterms contained 44.

A small group can be valid yet wasteful. For the four-corner function, pairing 0 with 2 gives A′B′D′, but expanding to all four corners removes A too. After writing the expression, check a 0-cell as well as the 1s. In the worked example, input 0011 makes all three terms 0. A complete check evaluates all 16 inputs.

Key Takeaways

  • Four-variable maps wrap horizontally and vertically.
  • The four corners form a group, but opposite corners alone are not a pair.
  • A group of eight leaves one literal; a group of four leaves two.
  • Cover every 1 and expand groups where possible.
  • Check that the final expression keeps specified 0s at 0.

1.3 Prime implicants and minimum covers

Finding large rectangles is only part of minimization. You must also choose which rectangles belong in the final expression. A group can be as large as possible and still be unnecessary.

Distinguish three kinds of group

An implicant is a product term that never outputs 1 at a 0-cell of the function. A prime implicant cannot be enlarged without including a 0. An essential prime implicant covers at least one 1 that no other prime implicant covers.

Question about a groupWhat it tells you
Does it contain only 1s?It is an implicant.
Can it grow while remaining valid?If not, it is prime.
Is it the only prime group covering some 1?It is essential.

Every term in a minimal SOP is prime, and all essential prime implicants must be selected. Other primes are choices, not automatic additions.

Find a cover systematically
  1. Find every prime implicant, including overlapping and wrapped groups.
  2. For each 1, record the primes that cover it. A cell listed under only one prime forces that prime into the answer.
  3. Mark the cells covered by those essential primes.
  4. Cover the remaining 1s with the fewest additional primes. Break ties by literal count.

For F(A,B,C,D)=∑m(0,2,3,5,7,8,9,10,11,13,15), the six primes are:

PrimeCells covered
BD5, 7, 13, 15
B′D′0, 2, 8, 10
CD3, 7, 11, 15
B′C2, 3, 10, 11
AD9, 11, 13, 15
AB′8, 9, 10, 11

Only BD covers cell 5; only B′D′ covers cell 0. Select both. Cells 3, 9 and 11 remain. Cell 3 needs CD or B′C, while cell 9 needs AD or AB′. No single prime covers both 3 and 9, so two more terms are necessary. Each of the four combinations covers cell 11 too. One answer is F=BD+B′D′+CD+AD; another is F=BD+B′D′+B′C+AB′. All four minimal choices have four terms and eight literals.

Remove groups that add no coverage

For ∑m(1,5,6,7,11,12,13,15), cells 1, 6, 11 and 12 force the pairs A′C′D, A′BC, ACD and ABC′. These pairs already cover every 1, including all cells of the larger prime BD. Adding BD would increase cost without changing the function.

Redundancy also appears in the consensus theorem: xy+x′z+yz=xy+x′z. When yz=1, either x=1 activates xy or x=0 activates x′z; the extra term adds no new 1s.

Essential primes need not exist. For F(x,y,z)=∑m(0,1,2,5,6,7), all six primes are pairs and every 1 has two possible covers. The two minimal results are x′y′+yz′+xz and x′z′+y′z+xy. Each has three terms and six literals.

Key Takeaways

  • Prime means a group cannot grow; essential means a specified 1 has no other prime cover.
  • Select essential primes first, then cover the remaining 1s.
  • A large prime can be redundant when selected groups already cover its cells.
  • Minimal expressions can have equal cost without being identical.
  • The consensus theorem removes a term that contributes no new 1s.
  • Choosing every prime implicant usually adds unnecessary terms.
2

Simplify with zeros and unrestricted inputs

The 1s of a function are only one route to a small circuit. Its 0s can produce a cheaper product of sums, and unused input combinations can enlarge useful groups. Work through both forms, keep required outputs separate from unrestricted ones, and compare gate inputs under the same convention. A complete truth-table, map or algebraic check then establishes that the saving has preserved every specified output.

2.1 Zero-groups and product-of-sums forms

Grouping 1s produces a sum of products. Grouping 0s gives another useful form: a product of sums, or POS. A POS is an AND of OR terms, so any one factor becoming 0 makes the whole output 0.

Read the zeros with the correct polarity

A maxterm contains every variable in a sum and equals 0 at exactly one input combination. The notation F=∏M(3,4,6,7,11,12,13,14,15) lists the 0s. For four variables, the other minterms are the 1s: ∑m(0,1,2,5,8,9,10).

Use the same rectangular power-of-two grouping rules for 0s as for 1s. First read each zero-group as a product describing where F′=1. Then complement the entire SOP with DeMorgan's theorem. Each product becomes a sum, each literal changes polarity, and the OR between products becomes AND between sums.

You can also read a zero-group directly:

Fixed input in the groupLiteral in the POS factor
0Plain variable
1Complemented variable
ChangesOmit the variable

The polarity is reversed from grouping 1s because the sum factor must be 0 inside its group. A group fixed at A=1,B=1 gives (A′+B′): both literals are 0 there.

Derive both forms of one function

Take F(A,B,C,D)=∑m(0,1,2,5,8,9,10). Its 1-groups give F=B′D′+B′C′+A′C′D. Now use the 0s:

  • Cells 12, 13, 14 and 15 keep A=B=1, so their product for F′ is AB.
  • Cells 3, 7, 11 and 15 keep C=D=1, giving CD.
  • Cells 4, 6, 12 and 14 keep B=1,D=0, giving BD′.

Therefore F′=AB+CD+BD′. Complement the whole expression:

F=(AB+CD+BD′)′=(A′+B′)(C′+D′)(B′+D).

The last factor contains plain D because the zero-group fixed D=0. Leaving it complemented would move the zeros to different inputs.

Check a one and a zero

At minterm 5, the inputs are 0101. The three factors become 1+0, 1+0 and 0+1, so their product is 1. The SOP also gives 1 because A′C′D=1.

At minterm 12, the inputs are 1100. The first factor A′+B′ is 0, so the whole POS is 0 without evaluating the remaining factors. A POS describes the function's 1s through conditions that must all hold, even though its factors were found by grouping 0s.

Keep the output name attached to the algebra: AB+CD+BD′ describes F′, not F. Complementing literals alone is insufficient; AND and OR must also swap. The POS can be built with OR gates feeding AND, or converted to NOR gates feeding NOR. Its cost can differ from the SOP, so finding the simplest SOP does not settle which circuit to build.

Key Takeaways

  • Group 0s to obtain a minimal SOP for the complement.
  • DeMorgan changes products into sums and complements each literal.
  • A fixed 0 gives a plain literal in a POS factor; a fixed 1 gives a complement.
  • One zero factor makes the whole POS zero.

2.2 Don't-cares and simpler circuits

Some input combinations place no requirement on the output. These don't-care conditions can enlarge map groups, often removing literals that would otherwise be needed.

Decide which inputs truly do not matter

An input is a don't-care when it never occurs in the system or when the output is ignored for that input. Mark it X and list it separately from the required 1s and 0s. A BCD input represents a decimal digit with four bits: 0000 through 1001 represent 0 through 9. Codes 1010 through 1111 are unused BCD digit codes. In a circuit specified to receive valid BCD digits, those unused codes can be don't-cares.

An X is freedom to choose an output, not a third output value. The finished circuit still produces a definite 0 or 1 at every input. If an unused combination occurs, its output follows the expression you built.

Include an X only when it helps

For an SOP, combine required 1s with useful Xs, never with a required 0. Choose each X independently. No X needs coverage. A group containing only Xs contributes nothing to covering required 1s and is unnecessary. For a POS, combine required 0s with useful Xs, never with a required 1.

A prime group can contain 1s and Xs and must be as large as possible without including a 0. Essentiality still depends on required 1s: being the only group covering an X does not force a term into the answer.

Simplify a BCD decision

A BCD circuit outputs 1 for digits 5 through 9. With A as the most significant bit, write F=∑m(5,6,7,8,9)+d(10,11,12,13,14,15). Mark digits 0 through 4 as required 0s.

Use the six Xs to expand groups:

  1. All eight cells with A=1 form a group, giving A. Only cells 8 and 9 are required 1s; the others are Xs.
  2. Cells 5, 7, 13 and 15 give BD.
  3. Cells 6, 7, 14 and 15 give BC.

The result is F=A+BD+BC, with five literals. If the six unused codes instead had to output 0, the minimal result would be A′BC+A′BD+AB′C′, with nine literals. The saving comes from the missing output requirements, not from changing any specified digit's output.

Different choices can both be correct

For F(w,x,y,z)=∑m(1,3,7,11,15)+d(0,2,5), cells 3, 7, 11 and 15 give the essential term yz. The remaining 1 at cell 1 can join 0, 2 and 3 to give w′x′, or join 3, 5 and 7 to give w′z. Both results have two terms and four literals:

F=yz+w′x′,F=yz+w′z.

The first makes cells 0 and 2 high and cell 5 low; the second makes 0 and 2 low and 5 high. Both match every required output. Grouping 0s with Xs gives F′=z′+wy′ and hence F=z(w′+y), equivalent to the second SOP. Compare solutions on specified inputs; differing X outputs alone do not make one solution wrong.

Key Takeaways

  • An X marks an input whose output is unrestricted.
  • Use Xs to enlarge useful groups; they never require coverage.
  • Essentiality is judged by required 1s, not by Xs.
  • Use Xs with 0s for POS simplification.
  • Two valid designs can disagree at don't-care inputs.

2.3 Circuit cost and complete verification

An expression can be correct without being economical. After minimizing, count its implementation cost under one convention and verify that every specified output is preserved.

Count literals and gate inputs separately

The literal count counts each variable occurrence, complemented or plain. The gate-input count adds the input pins used by all logic gates. Here both polarities of each input are available, so input inverters are excluded. A one-literal term or factor goes directly to the final gate.

For F=y′+w′z′+xz′, the literal count is 1+2+2=5. Only the last two terms need AND gates: two inputs each. The final OR takes three inputs, so the gate-input count is 2+2+3=7. Counting an AND gate for y′ would add a gate that is not needed.

Compare SOP and POS under the same rules

For ∑m(0,1,2,5,8,9,10), the minimal forms are:

FormLiteralsGate inputs
B′D′+B′C′+A′C′D72+2+3+3=10
(A′+B′)(C′+D′)(B′+D)62+2+2+3=9

The POS is cheaper by both measures. Another function may favor SOP, or the costs may tie. A three-input majority function is 1 when at least two inputs are 1. Its 1s are 3, 5, 6 and 7, giving F=AB+AC+BC. Grouping its 0s gives F=(A+B)(A+C)(B+C). Both forms have six literals and nine gate inputs.

Two-level minimization optimizes a chosen form. Factoring may reveal a cheaper implementation: AC+AD+BC+BD=(A+B)(C+D). The expanded AND-OR circuit has 12 gate inputs; the OR-AND circuit has six. Both have two gate levels, so this saving does not require another level.

Prove that the function is preserved

A four-input function has 16 input rows. A few successful checks can expose some mistakes, but they do not establish equivalence. Use one complete method:

  1. Truth-table check: evaluate the expression on every specified input and compare the output. Skip don't-care rows because they have no required output.
  2. Map check: for SOP, put each product's 1-group on an empty map. The union must cover all required 1s and no required 0s. For POS, draw each factor's zero-group. Their union must cover all required 0s and no required 1s. Xs are optional in either check.
  3. Algebraic proof: transform one form into the other with valid Boolean laws. For example, w′z+yz=z(w′+y) follows by factoring out z.

A specification written in words needs a truth table before these checks can begin. For majority, “at least two” includes 111 as well as 011, 101 and 110. Omitting 111 changes the required function. For the same reason, verify required zeros as carefully as required ones: an oversized group often looks correct on every 1 while accidentally covering a 0.

Key Takeaways

  • Count literal occurrences and gate inputs as different cost measures.
  • Use the same inverter convention for every design being compared.
  • Single-literal terms feed the final gate directly.
  • Compare minimal SOP and POS; either can be cheaper.
  • Verify every specified row, the complete map coverage, or an algebraic equivalence.
  • Factoring can reduce gate inputs without adding gate levels.
3

Build and read NAND and NOR circuits

A circuit made from one gate type can still perform every Boolean operation. NAND and NOR achieve this through inversion, which must be tracked at each connection. Start with their equivalent bubble symbols, convert two-level expressions, and then follow the intermediate signals of factored circuits. The same signal equations let you read an unfamiliar NAND or NOR network back into a familiar Boolean function.

3.1 Universal gates and inversion bubbles

NAND and NOR each form a complete gate library: either type alone can build any Boolean function. Their inversion bubbles also provide a way to translate familiar AND-OR logic into circuits made from one gate type.

Build the basic operations

A NAND outputs (xy)′. It is 0 only when all inputs are 1. A NOR outputs (x+y)′. It is 1 only when all inputs are 0. Three-input versions complement the three-input AND or OR in the same way.

OperationNAND-only constructionNOR-only construction
NOT x(xx)′=x′(x+x)′=x′
ANDInvert the output of (xy)′(x′+y′)′=xy
OR(x′y′)′=x+yInvert the output of (x+y)′

Tying both inputs together makes an inverter. Thus the complemented inputs needed in the table can also be generated with the same gate type. With only plain inputs available, NAND-built OR uses two input inverters and one final NAND. Since NOT, AND and OR can express any Boolean function, these constructions establish universality.

Do not combine NANDs as though they were ANDs

NAND and NOR are not associative. Cascading two NANDs gives ((xy)′z)′, which need not equal (xyz)′. At x=0,y=0,z=1, the cascade gives 0 but the three-input NAND gives 1. The first gate's inversion has changed the signal entering the next gate.

To build a three-input NAND from two-input NANDs, restore the intermediate AND: let t=(xy)′, then u=(tt)′=xy, then F=(uz)′=(xyz)′. This takes three gates. Simply connecting two NANDs omits the needed middle inversion.

Read two symbols for the same gate

DeMorgan gives (xyz)′=x′+y′+z′. A NAND can therefore be drawn as an AND with an output bubble, or an OR with an input bubble on each wire. These are called AND-invert and invert-OR. They represent the same physical gate.

Likewise, (x+y+z)′=x′y′z′. A NOR is an OR with an output bubble or an AND with bubbles on all its inputs: OR-invert or invert-AND. Changing to the alternative symbol changes the drawing, not the function.

Two inversion bubbles on the same connection cancel: (x′)′=x. This lets a first gate's output bubble meet the next gate's input bubble, exposing an underlying AND-OR path. A lone bubble needs compensation during conversion.

NAND is not an AND with complemented inputs. That expression is x′y′=(x+y)′, a NOR. The equivalent NAND symbol is an OR with complemented inputs.

Why these gates suit hardware

In standard static CMOS, a two-input NAND or NOR uses four transistors. A two-input AND or OR adds a two-transistor inverter, giving six. Direct NAND or NOR implementations therefore suit this common technology.

Key Takeaways

  • NAND and NOR can each build NOT, AND and OR, making each universal.
  • Tied inputs turn NAND or NOR into an inverter.
  • NAND and NOR are not associative.
  • DeMorgan gives each gate an equivalent symbol with input bubbles.
  • Two bubbles on one connection cancel.

3.2 Two-level gate implementations

A minimal expression suggests the gate family that implements it directly. SOP leads to NAND-NAND; POS leads to NOR-NOR. A term that is only one literal needs special attention because it bypasses the first gate level.

Convert SOP to NAND-NAND

For F=AB+CD, apply DeMorgan twice:

F=((AB)′(CD)′)′.

The first two NANDs produce the complemented products. The output NAND acts as an OR of the original products. In a bubble drawing, use AND-invert symbols first and invert-OR at the output; the bubbles meet in pairs.

To convert an SOP, use one NAND for each product of two or more literals, then feed their outputs into the final NAND. Feed a single-literal term complemented to that final gate.

For F=xy′+x′y+z, build p=(xy′)′ and q=(x′y)′. The output is F=(pqz′)′, requiring two two-input NANDs and a three-input NAND. The direct input is z′, not z: DeMorgan makes the final output include the complement of that input. If z′ is unavailable, generate it with a tied-input NAND.

Convert POS to NOR-NOR

The dual conversion is F=(A+B)(C+D)=((A+B)′+(C+D)′)′. Each first-level NOR complements one sum, and the final NOR reconstructs their AND. A single-literal factor also enters the final gate complemented.

For F=(A′+B′)(C′+D′)(B′+D), make three NORs with input pairs A′,B′; C′,D′; and B′,D. Their outputs feed a three-input NOR. The result uses four gates. Starting from SOP and simply replacing every gate with NOR would produce a different function.

Recognize inverted two-level forms

Some designs need an inverted combination. The useful two-level forms come in pairs:

Function formGate pairs
SOPAND-OR, NAND-NAND
POSOR-AND, NOR-NOR
AND-OR-INVERT (AOI)AND-NOR, NAND-AND
OR-AND-INVERT (OAI)OR-NAND, NOR-OR

AOI realizes (AB+CD)′. To design F in AOI form, minimize F′ as an SOP. For F=∑m(0,1,2,5,8,9,10), F′=AB+CD+BD′, giving F=(AB+CD+BD′)′.

OAI realizes ((A+B)(C+D))′. For the same function, F′=(B+D)(B+C)(A+C+D′), so invert that POS to obtain F.

There are 16 ordered combinations of AND, OR, NAND and NOR across two levels. The eight above are nondegenerate. The other eight collapse to one operation. For example, NAND-OR gives (AB)′+(CD)′=(ABCD)′, one larger NAND. This collapse is different from cascading NANDs: NAND-NAND remains a useful SOP structure.

Key Takeaways

  • NAND-NAND implements SOP; NOR-NOR implements POS.
  • Complement a single-literal term or factor that bypasses the first level.
  • AOI implements an inverted SOP; OAI implements an inverted POS.
  • For an inverted form, simplify the complement in the matching form.
  • Degenerate two-level forms collapse to one operation.
  • Gate replacement must preserve the signal polarity at every connection.

3.3 Multilevel conversion and signal tracing

Factored expressions often create paths through more than two gates. To convert these multilevel circuits, keep track of each signal's polarity along the whole path. Direct replacement works only when the inversions match.

Convert one connection at a time

For NAND-only logic, replace AND with AND-invert and OR with invert-OR. Both symbols are NANDs. Inspect every wire: a bubble at each end cancels, but a bubble at only one end changes the signal. Compensate with an inverter or a complemented primary input.

Consider F=A(CD+B)+BC′. Label intermediate signals so the conversion stays readable:

  1. t=(CD)′ is the NAND for the inner AND.
  2. u=(tB′)′=CD+B is the NAND drawn as invert-OR. Its input from t has matched bubbles. Its other input must be B′.
  3. v=(Au)′ complements the product A(CD+B).
  4. w=(BC′)′ complements the other product.
  5. F=(vw)′ reconstructs the OR of those products.

This uses five NANDs when complemented inputs are available. The longest path runs through four gates. If step 2 used plain B, the gate would produce CD+B′, changing the function. The need for B′ is visible at that unmatched input bubble.

Use the dual conversion for NOR

For NOR-only logic, replace OR with OR-invert and AND with invert-AND. Again, pair bubbles on each connection and compensate for any unmatched bubble.

Take F=(AB′+A′B)(C+D′). Start with p=(A′+B)′=AB′ and q=(A+B′)′=A′B, using NORs drawn as invert-AND gates. Next make G=(p+q)′ and H=(C+D′)′. The final NOR gives F=(G+H)′. Its two inverted inputs supply the AND of the original factors. Five NOR gates suffice with complemented primary inputs available.

The first NOR gates have no output inversion relative to the products they replace because their input bubbles receive complemented literals. Labeling the signals avoids guessing from the gate shape alone.

Analyze a circuit from inputs to output

Write one equation per gate before simplifying. For p=(AB)′, q=(A′C)′ and F=(pq)′, DeMorgan gives F=AB+A′C. When A=1 this reduces to B; when A=0 it reduces to C. This is a useful independent check of the circuit's behavior.

Alternative symbols can reveal the same result: draw the output NAND as invert-OR so each input bubble cancels a first-level output bubble. You can then read the two products feeding an OR.

Factor before choosing a gate family

The SOP AC+AD+BC+BD needs four two-input NANDs and a four-input NAND: 12 gate inputs. Factoring gives (A+B)(C+D), implemented with three two-input NORs: six gate inputs. This particular factoring keeps two levels. Other factoring introduces multilevel paths, and each added gate level adds propagation delay. Count the gates along the longest input-to-output path separately from the number of gates in the whole circuit.

Key Takeaways

  • Use alternative NAND or NOR symbols, then inspect every connection for unmatched bubbles.
  • Label intermediate signals and derive their equations in input-to-output order.
  • An unmatched input bubble requires a complemented signal or an added inverter.
  • Factoring can reduce circuit cost; gate count and path depth are separate measures.
4

Use XOR to generate and check parity

Alternating 1s and 0s can make a K-map look impossible to simplify, yet XOR gates often express the pattern directly. Their output tracks whether the count of high inputs is odd or even. Use that connection to build controlled inversion, parity generators and parity checkers. Following what happens when bits flip also explains both the value and the limits of a single parity bit.

4.1 XOR patterns and identities

Some maps resist SOP grouping because their 1s alternate with 0s. These patterns often have a short exclusive-OR implementation even when their minimal SOP is long.

Define XOR and XNOR

For two inputs, XOR is 1 when the inputs differ: x⊕y=xy′+x′y. XNOR, or equivalence, is 1 when they match: x⊙y=(x⊕y)′=xy+x′y′.

IdentityEffect
x⊕0=xPass the bit
x⊕1=x′Invert the bit
x⊕x=0Equal terms cancel
x⊕x′=1Complementary terms give 1

XOR is commutative and associative, so reorder and regroup its inputs freely. For example, A⊕A⊕B=B. Complementing one input complements the output: x⊕y′=x′⊕y=(x⊕y)′. Complementing both inputs preserves XOR: x′⊕y′=x⊕y.

An XOR is therefore a controlled inverter. One input is the data bit and the other is the control. Control 0 passes the data; control 1 flips it. The roles can be swapped because XOR is commutative.

Extend to several inputs

A multi-input XOR is 1 when an odd number of inputs are 1. It is called the odd function. For three inputs, x⊕y⊕z=∑m(1,2,4,7). Input 111 gives 1 because three is odd; XOR does not mean “exactly one” once there are more than two inputs.

The complement is the even function, 1 when the count of 1s is even, including zero. For three inputs its minterms are 0, 3, 5 and 6. Use an XOR followed by XNOR: (x⊕y)⊙z=(x⊕y⊕z)′. An XOR tree or chain for n inputs uses n−1 two-input XOR gates. For four inputs the odd function has minterms 1, 2, 4, 7, 8, 11, 13 and 14.

Recognize the map pattern

Odd and even functions form checkerboards on K-maps. Changing one input changes parity, so every adjacent cell has the opposite output. No 1s can be grouped. The three-input odd function has minimal SOP x′y′z+x′yz′+xy′z′+xyz: four products and 12 literals. Two XOR gates implement the same function.

A partial checkerboard can involve fewer variables. For F(x,y,z)=∑m(1,2,5,6), pairs remove x, leaving y′z+yz′=y⊕z. Likewise, ∑m(2,3,4,5)=x⊕y. Read which inputs differ instead of assuming every variable belongs in the XOR.

Build XOR from NANDs

Let t=(xy)′, p=(xt)′ and q=(yt)′, then F=(pq)′. These four two-input NAND gates implement x⊕y. For equal inputs 00 or 11, both p and q become 1, so the output is 0. For 01 or 10, one becomes 0, making the output 1. The shared intermediate signal t is used by both branches.

Key Takeaways

  • Two-input XOR detects unequal inputs; XNOR detects equal inputs.
  • XOR permits regrouping and cancellation of repeated inputs.
  • Complementing one XOR input flips the result; complementing both preserves it.
  • Multi-input XOR detects an odd count of 1s, including three 1s.
  • A parity checkerboard has no adjacent 1s to combine.
  • Four NAND gates can implement a two-input XOR.

4.2 Parity bits and error detection

A parity bit adds one bit of error-detection information to a message. The generator chooses it so the total count of 1s has the agreed parity. The checker includes that extra bit when testing the received word.

Generate the extra bit

For data xyz, an even-parity generator outputs P=x⊕y⊕z. If the data contains an odd number of 1s, the XOR is 1, so adding that parity bit makes the total even. If the data count is already even, the parity bit is 0.

DataNumber of 1sEven-parity bitOdd-parity bit
000001
001110
011201
111310

For odd parity use P=(x⊕y⊕z)′. The word “even” describes the total count, not a fixed value of the parity bit. The bit changes with the message.

For n data inputs, an even-parity generator needs n−1 two-input XOR gates. A tree or a chain gives the same Boolean result. In seven-bit ASCII, A is 1000001 with two 1s, so its even-parity bit is 0. C is 1000011 with three 1s, so its even-parity bit is 1.

Check all received bits

For even parity, compute C=x⊕y⊕z⊕P. A result of 0 means no error is detected; 1 flags an error. This checker needs three two-input XOR gates for four received bits. In general, checking n data bits plus their parity bit takes n two-input XOR gates.

For odd parity, the same XOR should be 1 for a consistent word. To make an error flag that is 1 on failure, complement the full XOR. Generator and checker must use the same parity convention.

Send data 101 with even parity. There are two 1s, so P=0 and the transmitted word is 1010, with the parity bit last. If 1110 arrives, the checker finds three 1s and outputs 1. If 1011 arrives, only the parity bit changed; the checker still outputs 1. It cannot tell whether a data bit or the parity bit was damaged.

Understand the detection limit

Each flipped bit toggles the XOR. Any odd number of flips changes the expected result and is detected. Any even number restores it, so a single parity check misses that error pattern.

For example, if 1010 becomes 0110, two data bits have flipped. The received word still contains two 1s, and the even-parity checker outputs 0. Passing the check means the word has the expected parity; it does not establish that every bit arrived correctly.

A single parity bit also cannot locate the bad bit. Many different one-bit changes produce the same error flag. It detects an odd-flip error but cannot correct it; a system can respond by requesting the data again. When tracing a checker, include the parity input itself and distinguish the raw XOR result from the error flag used for odd parity.

Key Takeaways

  • Even parity makes the total count of 1s even, including the parity bit.
  • An even-parity generator XORs the data bits; an odd-parity generator complements that result.
  • An even-parity checker XORs all received bits and flags 1 as an error.
  • A single parity bit detects odd numbers of flips and misses even numbers.
  • Parity detects errors without locating or correcting the damaged bit.

Gate-Level Minimization examples

4 Walkthroughs

1

From a truth table to a minimum cover

15 steps
Build map groups, use wraparound, and decide which prime implicants belong in a minimal SOP.
  1. 1
    IntroductionMake combinations visible

    A truth table records outputs; a K-map places inputs that differ in one bit next to one another. Combining neighboring 1s removes inputs that do not affect that part of the function.

    Work from a small map to a four-variable map, then choose a cover. A valid group is a candidate term; deciding whether it is needed requires looking at what the other groups cover.

  2. 2
    ExplanationLay out the three-input map

    For inputs x,y,z, use rows x=0,1 and columns yz=00,01,11,10. The top minterm row is 0, 1, 3, 2; the bottom row is 4, 5, 7, 6.

    The column order is Gray code, so each neighboring label changes one bit. The outer columns also differ in one bit. A pair can cross that edge just as it can cross an interior cell boundary.

  3. 3
    ExampleFill the required ones

    Take F(x,y,z)=∑m(0,2,4,5,6). Put 1s at those five minterms and 0s elsewhere. Minterm 5 is binary 101, so its position is the bottom row, column 01.

    The first and last columns contain 1s in both rows: cells 0, 2, 4 and 6. Across these cells z=0 while both x and y vary. They form one wrapped group of four.

  4. 4
    ExampleRead the two products

    The four-cell group gives z′: keep the fixed input and omit the changing inputs. Cell 5 is still uncovered, so pair it with cell 4. Their inputs 101 and 100 keep x=1,y=0, giving xy′.

    The result is F=z′+xy′. Cell 4 belongs to both groups. Overlap is allowed because a 1 already covered by one term can also be covered by another without changing the OR result.

  5. 5
    ChallengeTry another edge pair

    For F(x,y,z)=∑m(0,2,6,7), find a two-term SOP.

    ---reveal---

    Pair 0 with 2 across the outer columns to obtain x′z′. Pair 6 with 7 to obtain xy. Thus F=x′z′+xy. The possible pair 2,6 gives yz′, but adding it would cover no new 1 after the first two groups are selected.

  6. 6
    ExplanationWrap both map directions

    For four inputs, rows AB and columns CD both use 00, 01, 11, 10. The minterm rows are 0,1,3,2; 4,5,7,6; 12,13,15,14; and 8,9,11,10.

    Top touches bottom, and left touches right. Think of bringing opposite edges together: a group split across the printed page can still be one rectangle in the wrapped map. A diagonal pair still changes two inputs and is invalid.

  7. 7
    ExampleRead a group at four corners

    Suppose only cells 0, 2, 8 and 10 are 1. These four corners are one group. In binary they are 0000, 0010, 1000 and 1010.

    Only B=0 and D=0 remain fixed, so the product is B′D′. A smaller pair such as 0,2 would keep A′ unnecessarily. Using all four corners removes that extra literal without covering any required 0.

  8. 8
    TipCount changing inputs

    A valid four-variable group of 2, 4 or 8 cells removes 1, 2 or 3 inputs, leaving 3, 2 or 1 literals. The count is a useful check on a term you have read.

    For a four-cell group, finding three fixed inputs signals an error: either the group is not a valid rectangle, or one input actually changes. Group size and fixed-input count must describe the same input combinations.

  9. 9
    ChallengeExpand across rows

    A four-variable function has 1s only at cells 1, 3, 9 and 11. Find its minimal product term.

    ---reveal---

    The top and bottom rows join through wraparound. The cells keep B=0,D=1 while A,C vary, so F=B′D. Two separate row pairs would be correct but would retain an unnecessary dependence on A. The wrapped group makes one two-literal term.

  10. 10
    ExplanationFind forced choices

    A prime implicant cannot expand without including a 0. It is essential if some 1 has no other prime cover.

    To identify essentiality, inspect every prime, including overlaps. A cell appearing in just one selected group is not enough: an unselected prime might also cover it. Unique coverage must hold among all primes, not just among the groups already drawn for an answer.

  11. 11
    ExampleSelect two essential primes

    For F(A,B,C,D)=∑m(0,2,3,5,7,8,9,10,11,13,15), the primes are BD,B′D′,CD,B′C,AD,AB′.

    Cell 5 belongs only to BD; cell 0 belongs only to B′D′. Select both. They cover cells 0,2,5,7,8,10,13,15, leaving 3,9,11. Listing the remaining cells prevents selecting an attractive group that adds no necessary coverage.

  12. 12
    ExampleFinish the cover

    Cell 3 needs CD or B′C. Cell 9 needs AD or AB′. No one prime covers both cells, so at least two more terms are required. Each choice also covers cell 11.

    Choosing CD and AD gives F=BD+B′D′+CD+AD. Replacing either chosen nonessential prime with its alternative gives three other minimal answers. Each has four terms and eight literals.

  13. 13
    ChallengeDecide which prime to omit

    For F(A,B,C)=∑m(0,1,4,6,7), the prime pairs give A′B′, B′C′, AC′ and AB. Find a minimal SOP and explain your choice.

    ---reveal---

    Cell 1 forces A′B′ and cell 7 forces AB. Only cell 4 remains; cover it with either B′C′ or AC′. Both give three terms and six literals. Including both extra pairs increases cost with no new required coverage.

  14. 14
    Key InsightA large group can add nothing

    For ∑m(1,5,6,7,11,12,13,15), isolated coverage choices force four pairs: A′C′D,A′BC,ACD,ABC′. Together they cover every required 1.

    The larger prime BD covers cells 5,7,13,15, all already covered by those forced pairs. It stays prime but contributes no necessary cell. “Cannot grow” and “must be chosen” answer different questions.

  15. 15
    RecapUse coverage to justify the answer

    Set up Gray-code labels, mark the specified outputs, and find valid wrapped rectangles. Read fixed inputs from each group. Identify all primes before deciding which are essential, then cover any remaining 1s with the fewest extra terms.

    When two answers differ, compare their covered cells and their term and literal counts. The drawing need not match for the expressions to be equally minimal.

2

Choose between ones, zeros, and Xs

13 steps
Derive a POS, exploit don’t-cares, compare hardware cost, and verify all specified outputs.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionChoose another route through the map
  2. 2
    ExplanationMake a factor zero inside its group
  3. 3
    ExampleGroup the zeros of a function
  4. 4
    ExampleComplement the whole expression
  5. 5
    ChallengeFind a POS from a new zero list
  6. 6
    ExplanationGive X its proper role
  7. 7
    ExampleEnlarge a BCD group
  8. 8
    Key InsightDifferent X outputs can both work
  9. 9
    ChallengeUse only the helpful Xs
  10. 10
    ExplanationCount the actual gate inputs
  11. 11
    ExampleCompare two minimal forms
  12. 12
    ChallengeCombine Xs, polarity, and cost
  13. 13
    RecapKeep requirements and cost separate
3

Convert expressions into NAND or NOR networks

16 steps
Track inversions through universal gates, two-level forms, and factored multilevel circuits.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFollow the inversion
  2. 2
    ExplanationBuild a complete gate library
  3. 3
    ConnectionChange the symbol without changing the gate
  4. 4
    ExampleKeep the intermediate inversion
  5. 5
    ChallengeIdentify the alternative symbol
  6. 6
    ExplanationTurn products into NAND inputs
  7. 7
    ExampleHandle a bypassed literal
  8. 8
    ExplanationUse the dual structure for POS
  9. 9
    Key InsightRecognize the inverted forms
  10. 10
    ChallengeChoose signals for the output gate
  11. 11
    ExampleStart a factored NAND conversion
  12. 12
    ExampleComplete the outer products
  13. 13
    ExampleTrace a NOR network
  14. 14
    TipWrite one equation per gate
  15. 15
    ChallengeRepair an unmatched input
  16. 16
    RecapMatch structure and polarity
4

From XOR patterns to parity checking

12 steps
Use XOR identities, recognize odd and even functions, and follow transmitted words through a parity checker.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionCount high inputs with XOR
  2. 2
    ExplanationConnect different inputs to the formula
  3. 3
    ExampleSimplify by cancellation
  4. 4
    ConnectionRecognize a checkerboard
  5. 5
    ExampleUse four NANDs for XOR
  6. 6
    ChallengeRemove an unused input from the pattern
  7. 7
    ExplanationMake the total even
  8. 8
    ExampleGenerate and send a word
  9. 9
    ExampleCompare one flip with two
  10. 10
    Key InsightSeparate the XOR result from the error flag
  11. 11
    ChallengeBuild and test a new parity word
  12. 12
    RecapTrack parity across the whole word

Gate-Level Minimization practice questions

50 Practice Questions in 5 sets

Set 1: From input combinations to minimum covers10 Practice Questions

Question 1 of 10

On a four-variable map, how many literals remain in a product read from a valid group of eight cells?
  1. Two literals
  2. One literal
  3. Three literals
  4. Four literals
Show answerHide answer
Answer: B
Eight cells allow three independent inputs to vary while one stays fixed. Removing those three changing inputs leaves one literal. A two-literal product describes only four input combinations in a four-variable map, so it corresponds to a group of four, not eight.

Question 2 of 10

What is the minimal SOP for F(P,Q,R,S)=∑m(1,3,9,11)?
  1. P′S
  2. Q′R
  3. QS
  4. Q′S
Show answerHide answer
Answer: D
The four cells use the top and bottom rows and the two columns with S=1. Across them P and R vary, while Q=0 and S=1 stay fixed, giving Q′S. Keeping P′ would discard cells 9 and 11 and miss the vertical wraparound.

Question 3 of 10

Find a minimal SOP for F(P,Q,R,S)=∑m(0,1,2,3,4,5,12,13).
  1. P′Q′+QR′
  2. P′R′+Q′R′
  3. P′Q′+PR′
  4. Q′R′+QR′
Show answerHide answer
Answer: A
Cells 0 through 3 form P′Q′, and cells 4, 5, 12 and 13 form QR′. Cell 2 forces the first prime, and cell 12 forces the second, so two terms suffice and both are needed. Replacing QR′ with PR′ loses cells 4 and 5 and adds unwanted cells 8 and 9.

Question 4 of 10

A function has prime implicants P′R′ covering {0,2}, PQ′ covering {4,5}, and Q′R′ covering {0,4}. Which primes are essential?
  1. P′R′ and Q′R′
  2. PQ′ and Q′R′
  3. P′R′ and PQ′
  4. All three prime implicants
Show answerHide answer
Answer: C
Only P′R′ covers cell 2, and only PQ′ covers cell 5, so those primes are essential. Every cell covered by Q′R′ also has another prime cover. Its inability to grow makes it prime, but does not make it essential or require it in the final SOP.

Question 5 of 10

For F(P,Q,R)=∑m(0,2,3,4,5,7), what are all the minimal SOP forms?
  1. P′R′+QR+PQ′ only
  2. Q′R′+P′Q+PR only
  3. P′R′+Q′R′+QR+PR only
  4. P′R′+QR+PQ′ and Q′R′+P′Q+PR
Show answerHide answer
Answer: D
The six 1s form a cycle of six prime pairs, with each cell in two pairs and no essential prime. The two alternating selections each cover the map with three pairs, so each has three terms and six literals. Selecting four pairs can preserve the function, but costs an extra term and is not minimal.

Question 6 of 10

A cover is F=PQ+P′R+QR. Which term can be removed without changing the function?
  1. QR
  2. PQ
  3. P′R
  4. No term can be removed
Show answerHide answer
Answer: A
The term QR is the consensus of PQ and P′R. Whenever QR=1, either P=1 makes PQ=1 or P=0 makes P′R=1. Removing PQ instead loses input 110, where P′R and QR are both 0.

Question 7 of 10

In a three-variable map, what product is read from the pair of 1s at minterms 1 and 5?
  1. Q′R
  2. P′R
  3. PQ′
  4. QR
Show answerHide answer
Answer: A
The input combinations are 001 and 101, so only P changes. Keeping Q=0 and R=1 gives Q′R. Keeping P′ would describe only the upper row and would fail to include minterm 5, where P=1.

Question 8 of 10

What is the minimal SOP for F(P,Q,R)=∑m(0,2,5,7)?
  1. P′Q′+PQ
  2. P′R+PR′
  3. Q′R′+QR
  4. P′R′+PR
Show answerHide answer
Answer: D
Cells 0 and 2 pair across the outer columns, giving P′R′. Cells 5 and 7 pair to give PR, so Q disappears from both products. Reversing the polarity of R gives the complementary equality pattern and incorrectly excludes minterm 0.

Question 9 of 10

A map for F(P,Q,R)=∑m(0,1,4,6) is simplified. What minimal SOP covers all its 1s?
  1. Q′R′+P′Q′
  2. P′Q′+PR′
  3. P′R′+PQ′
  4. P′Q′+PQ
Show answerHide answer
Answer: B
Minterms 0 and 1 form P′Q′, and 4 and 6 form the wrapped pair PR′. These two products cover exactly the four required cells. Pairing 0 with 4 to get Q′R′ is valid, but combining only that pair with P′Q′ leaves minterm 6 uncovered.

Question 10 of 10

In F(P,Q,R), what product represents minterm 6?
  1. P′QR
  2. PQ′R
  3. PQR′
  4. P′Q′R
Show answerHide answer
Answer: C
Minterm 6 is binary 110 in the stated input order. The first two inputs are 1 and the last is 0, so the product is PQR′. The term PQ′R represents 101, which is minterm 5; decimal numbering must be converted before choosing complements.
Set 2: Zero-groups, don’t-cares, and circuit cost10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A zero-group holds P=0 and R=1 while the other inputs vary. What POS factor does it give?
  1. (P′+R)
  2. (P+R′)
  3. (P+R)
  4. (P′+R′)
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

What is a minimal POS for F(P,Q,R)=∏M(0,1,6,7)?
  1. (P+R)(P′+R′)
  2. (P+Q′)(P′+Q)
  3. (Q+R)(Q′+R′)
  4. (P+Q)(P′+Q′)
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Find a minimal POS for F(P,Q,R,S)=∑m(0,1,2,3,5,7,8,9,10,11).
  1. (P′+Q′)(Q′+S)
  2. (P+Q′)(Q′+S)
  3. (P′+Q′)(Q′+S′)
  4. (P′+Q)(Q′+S)
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What does X mean in an incompletely specified logic function?
  1. The output must alternate between 0 and 1.
  2. The output must equal the last valid output.
  3. Either output value meets the specification.
  4. The output must be supplied by another gate.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What minimal SOP meets F(P,Q,R)=∑m(1,3)+d(5,7)?
  1. R
  2. P′R
  3. Q′R
  4. P+R
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

For F(P,Q,R)=∑m(0,2)+d(1,3), what minimal POS meets the specification?
  1. Q′
  2. (P′+R)
  3. P′
  4. (P′+Q)
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

For F(P,Q,R)=∑m(0,3)+d(1,2,4), find every minimal SOP under the fewest-terms-then-literals rule.
  1. P′ and Q′R′
  2. P′ only
  3. P′Q′+P′Q only
  4. P′Q′+P′R only
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

How many gate inputs are needed for the direct AND-OR implementation of F=P+Q′R+ST′? Assume both polarities of every input are available.
  1. 5
  2. 8
  3. 9
  4. 7
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

For F(P,Q,R)=∑m(0,1,2,3,4,6), what are the minimal direct two-level gate-input costs of SOP and POS? Input complements are available.
  1. SOP: 4; POS: 6
  2. SOP: 6; POS: 4
  3. SOP: 2; POS: 2
  4. SOP: 6; POS: 6
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A candidate SOP matches all five required 1-inputs and differs from the specification only at X-inputs. Required 0-inputs have not been checked. What remains to establish correctness?
  1. Check that every required 0 stays 0.
  2. Check that every X has become a 1.
  3. Check that each 1 is covered just once.
  4. Check that no product overlaps another.
Show answerHide answer

Save this lesson to see this answer.

Set 3: NAND and NOR implementation choices10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What does a NOR gate produce when both its inputs are connected to T?
  1. T
  2. 0
  3. 1
  4. T′
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

At P=1,Q=1,R=0, what are the respective outputs of ((P+Q)′+R)′ and (P+Q+R)′?
  1. 1 and 1
  2. 1 and 0
  3. 0 and 0
  4. 0 and 1
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

For F=PQ+R′, what signals must feed the final NAND in a NAND-NAND implementation?
  1. (PQ)′ and R′
  2. PQ and R
  3. (PQ)′ and R
  4. PQ and R′
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What Boolean expression is realized by NOR gates for (P+Q)′ and (R+S)′ feeding a final NOR?
  1. (P+Q)(R+S)
  2. PQ+RS
  3. ((P+Q)(R+S))′
  4. (P+Q)+(R+S)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A function is F(P,Q,R)=∑m(2,3,4,5,6,7). Both input polarities are available. What is its smallest NAND-only realization by gate count?
  1. One NAND with inputs P and Q
  2. One NAND with inputs P′ and Q′
  3. Two NANDs, for (PR)′ and its inverse
  4. Two NANDs, for (P′Q′)′ and its inverse
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

AND gates producing PQ and RS feed a NOR. What function results?
  1. (PQ)′(RS)
  2. PQ+RS
  3. (P+Q)(R+S)
  4. (PQ+RS)′
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A NAND network has u=(PQ)′, v=(R′S)′ and F=(uv)′. What SOP describes it?
  1. PQ+R′S
  2. (P+Q)(R′+S)
  3. PQ′+RS′
  4. (PQ+R′S)′
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A NAND circuit is intended to realize F=P(QR+S). It uses t=(QR)′, u=(tS)′, v=(Pu)′ and F=(vv)′. Which single input-polarity change repairs it?
  1. Feed P′ instead of P into v.
  2. Feed Q′ instead of Q into t.
  3. Feed S′ instead of S into u.
  4. Feed R′ instead of R into t.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

For F=PQ+PR+SQ+SR, what realization uses the fewest gate inputs among direct SOP NAND-NAND and factored POS NOR-NOR? Complements are available.
  1. Five NANDs; 12 gate inputs
  2. Three two-input NORs; 6 gate inputs
  3. Three two-input NANDs; 6 gate inputs
  4. Five NORs; 12 gate inputs
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A network contains t=(P+Q)′, u=(t+R)′ and F=(u+u)′. What is its function?
  1. (P+Q+R)′
  2. (P+Q)R
  3. P+Q+R
  4. (P+Q)′+R
Show answerHide answer

Save this lesson to see this answer.

Set 4: XOR patterns and parity checks10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Data 10110 is given an even-parity bit, appended last. What word is sent?
  1. 101100
  2. 010110
  3. 101010
  4. 101101
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A six-bit message 110101 uses odd parity, with its parity bit appended last. What complete word is sent?
  1. 1101011
  2. 1101010
  3. 0110101
  4. 1101001
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

An odd-parity receiver gets 100101, including the parity bit. What are the raw XOR and an active-high error flag?
  1. XOR 0; error flag 1
  2. XOR 1; error flag 0
  3. XOR 1; error flag 1
  4. XOR 0; error flag 0
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A three-input XOR and a three-input XNOR each receive 111. What are their outputs?
  1. XOR 1; XNOR 0
  2. XOR 0; XNOR 1
  3. XOR 1; XNOR 1
  4. XOR 0; XNOR 0
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What does P⊕Q⊕P⊕1 simplify to?
  1. Q
  2. P′
  3. Q′
  4. P⊕Q
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

What XOR or XNOR expression describes F(P,Q,R)=∑m(0,1,6,7)?
  1. P⊕Q
  2. Q⊙R
  3. P⊙R
  4. P⊙Q
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A four-input circuit outputs 1 at minterms 0,3,5,6,9,10,12,15. It must use three two-input XOR/XNOR gates in a binary tree. What gate arrangement works?
  1. XNOR P with Q, XNOR R with S, then XOR the results.
  2. XOR P with Q, XOR R with S, then XNOR the results.
  3. XOR P with Q, XNOR R with S, then XNOR the results.
  4. XOR P with Q, XOR R with S, then XOR the results.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Four NANDs use t=(PQ)′, u=(Pt)′, v=(Qt)′ and Y=(uv)′. The second primary input is changed from Q to Q′ at both its connections. What function does the modified network realize?
  1. P⊕Q
  2. PQ
  3. P⊙Q
  4. P′Q
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

An even-parity sender transmits 1100101, with the parity bit last. The receiver gets 0100110. What can its single parity checker report?
  1. No error detected, because two positions changed.
  2. No error detected, although three positions changed.
  3. Error detected, because two positions changed.
  4. Error detected, because three positions changed.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A receiver uses even parity. Exactly two distinct bit positions flip, and one is the parity bit. What happens to the checker and the data?
  1. The check fails, but all data bits are correct.
  2. The check passes, but two data bits are wrong.
  3. The check passes, but one data bit is wrong.
  4. The check fails, but one data bit is wrong.
Show answerHide answer

Save this lesson to see this answer.

Set 5: Combine minimization, implementation, and checking10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What product represents the four-cell group {4,6,12,14} in a map for F(P,Q,R,S)?
  1. P′S′
  2. QR′
  3. QS′
  4. Q′S′
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

An OR symbol has a bubble on each input and none on its output. What operation does it represent?
  1. NOR
  2. NAND
  3. AND
  4. XNOR
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Find a minimal SOP for F(P,Q,R,S)=∑m(0,1,2,3,8,9,12,13).
  1. P′Q′+PR′
  2. Q′R′+P′Q′
  3. Q′R′+PR′
  4. P′Q′+PQ
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

For F(P,Q,R,S)=∑m(4,6,12)+d(0,2,8,10,14), what is the least gate-input cost of a direct NAND realization? Input complements are available.
  1. 2 gate inputs; NAND Q and S′.
  2. 2 gate inputs; NAND S and S.
  3. 4 gate inputs; invert a NAND of Q and S′.
  4. 0 gate inputs; connect S′ directly.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

For F(P,Q,R)=∑m(0,1,2,3,4,5), what minimal POS and NOR-only realization follow? Complements are available.
  1. (P′+Q′); one NOR with inputs P,Q
  2. (P+Q); NOR P,Q, then invert
  3. (P+Q′); one NOR with inputs P′,Q
  4. (P′+Q′); NOR P′,Q′, then invert
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A design for F=P(Q+R)+S is implemented directly as AND/OR gates, or expanded as PQ+PR+S. Which has fewer gate inputs, and what is the longest path in each?
  1. Factored: 5 inputs, 2 levels; expanded: 7 inputs, 2 levels.
  2. Factored: 6 inputs, 3 levels; expanded: 7 inputs, 2 levels.
  3. Factored: 6 inputs, 2 levels; expanded: 7 inputs, 3 levels.
  4. Factored: 7 inputs, 3 levels; expanded: 6 inputs, 2 levels.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

For F=(P+Q)R′, which signals feed the final NOR of a NOR-NOR realization?
  1. (P+Q)′ and R
  2. (P+Q)′ and R′
  3. P+Q and R
  4. P+Q and R′
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A NOR network uses u=(P′+Q)′, v=(R+S)′ and F=(u+v)′. What factored expression does it realize?
  1. PQ′(R+S)
  2. (P+Q′)(R+S)
  3. (P′+Q)(R+S)
  4. (P′+Q)+(R+S)
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A circuit outputs Y=(P⊕Q)⊙(R⊕1). What simpler function and parity behavior does it have?
  1. (P⊕Q⊕R)′; high for even parity
  2. P⊕Q⊕R; high for odd parity
  3. P⊕Q; high when P,Q differ
  4. (P⊕Q)′; high when P,Q agree
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

An even-parity checker reports no error after a seven-bit transmitted word changes. The first and last positions are confirmed to have changed; the middle five have not been compared. What is the largest number of those middle positions that could have changed?
  1. Four positions
  2. Five positions
  3. Three positions
  4. Two positions
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

50 Key Terms, each with its definition

A

Alternative gate symbol
An alternative gate symbol uses DeMorgan to show the same physical gate with a different shape and different bubble positions.
NAND may be drawn as AND-invert or invert-OR; changing the drawing leaves its truth table unchanged.
AND-OR-INVERT
An AND-OR-INVERT form, abbreviated AOI, is the complement of a sum of products and can use AND gates feeding NOR.
Minimize the complement as an SOP before implementing F=(AB+CD)′ in an AOI structure.

B

Binary-coded decimal
Binary-coded decimal, or BCD, represents each decimal digit using its four-bit binary code from 0000 through 1001.
A circuit restricted to valid BCD digits can use the six unused codes 1010 through 1111 as X-inputs.

C

Circuit depth
The circuit depth is the largest number of gate levels on any path from a primary input to the circuit output.
A network with five total gates can have depth four when some gates operate on parallel branches.
Consensus term
A consensus term is the redundant product YZ in XY+X′Z+YZ, already covered by the first two terms.
When Y=Z=1, either value of X activates one of the other products, so YZ adds no new 1.
Controlled inverter
A controlled inverter passes a data bit for control 0 and complements it for control 1, as an XOR gate does.
Connecting the control to 1 makes D⊕1=D′; connecting it to 0 leaves the data unchanged.
Cover
A cover is a selection of implicants whose combined groups include every required 1 without including a required 0.
After essential primes are selected, compare the extra primes needed to cover the remaining 1s.

D

Degenerate gate form
A degenerate gate form is a two-level combination whose Boolean operation collapses to one gate operation.
NAND outputs feeding OR give (AB)′+(CD)′=(ABCD)′, a single larger NAND operation.
DeMorgan’s theorem
DeMorgan’s theorem complements a product by ORing complemented factors, and complements a sum by ANDing complemented terms.
Complementing AB+CD gives (A′+B′)(C′+D′), not a sum of the two complemented products.
Don’t-care condition
A don’t-care condition is an input whose output is unrestricted because the input never occurs or the output is ignored.
An X-cell can help enlarge a useful group without creating another cell that must be covered.

E

Error flag
An error flag is a circuit output that signals a detected inconsistency; a parity error flag cannot identify the changed bit.
For odd parity, complement the full received-word XOR to make a high error flag mean a failed check.
Essential prime implicant
An essential prime implicant uniquely covers at least one required 1 among all the function’s prime implicants.
A cell found in only one prime forces that prime into every minimal SOP, even if it is a small group.
Even function
An even function in parity logic is 1 when an even number of its inputs are 1, including when all inputs are 0.
An XOR chain with its final gate changed to XNOR complements the odd function and gives the even function.
Exclusive-NOR
An exclusive-NOR of two inputs is 1 when those inputs agree and 0 when they differ; it complements XOR.
Both 00 and 11 make a two-input XNOR high, which is why the gate is also called equivalence.
Exclusive-OR
An exclusive-OR of two inputs is 1 when those inputs differ and 0 when they agree; it is abbreviated XOR.
The two products in A′B+AB′ express the unequal-input cases of A⊕B.

F

Factoring
Factoring rewrites a Boolean expression by collecting shared parts, often reducing repeated operations and gate inputs.
The expansion AC+AD+BC+BD factors to (A+B)(C+D) and can favor NOR-NOR hardware.
Four-corner group
A four-corner group is a valid wrapped rectangle containing all four corner cells of a four-variable Karnaugh map.
The corners 0, 2, 8 and 10 keep B=D=0, producing the two-literal product B′D′.

G

Gate-input count
The gate-input count is the sum of the input pins on every gate counted under the chosen implementation convention.
Two two-input ANDs feeding a three-input OR contribute seven inputs; a direct literal supplies the third OR input.
Gray code
A Gray code orders binary labels so consecutive labels differ in exactly one bit, preserving useful map adjacency.
K-map columns follow 00, 01, 11, 10; the first and last labels also differ in one bit.

I

Implicant
An implicant is a product term that can be 1 only where the function is 1, so its map group contains no 0s.
A smaller pair inside a four-cell group is an implicant, although it may still be enlarged.
Incompletely specified function
An incompletely specified function leaves the outputs for some input combinations free while requiring 0 or 1 for others.
Two circuits may disagree at X-inputs and still satisfy exactly the same required truth-table rows.
Intermediate signal
An intermediate signal is the output of an internal gate that feeds another gate before the final circuit output.
Writing t=(CD)′ first makes the later expression (tB′)′ easier to analyze.
Inversion bubble
An inversion bubble is a small circle on a logic-gate terminal that marks a complement at that input or output.
An output bubble meeting an input bubble on one wire gives two inversions that cancel each other.

K

Karnaugh map
A Karnaugh map rearranges truth-table rows so input combinations differing in one bit sit in neighboring cells.
An eight-cell map makes three-input product terms easier to combine without repeatedly applying Boolean algebra.

L

Literal
A literal is one occurrence of a Boolean variable or its complement in an expression, such as A or A′.
The product AB′C contains three literals even though a complemented variable uses two printed symbols.
Literal count
The literal count is the total number of variable occurrences in an expression, counting each repeated occurrence separately.
The expression A+BC+BD has five literals because B is counted in each of its two products.

M

Majority function
A majority function of three inputs outputs 1 when at least two of the inputs are 1, including when all three are 1.
Its minterms are 3, 5, 6 and 7, and the overlapping pairs give AB+AC+BC as a minimal SOP.
Maxterm
A maxterm is a sum containing every input variable once that equals 0 at exactly one input combination.
For three inputs, M0=A+B+C is zero at 000; its index belongs in the function’s list of zeros.
Minimal SOP
A minimal SOP has the fewest product terms and then the fewest literals among expressions with that term count.
Two equivalent three-term answers tie only after comparing how many literal occurrences each contains.
Minterm
A minterm is a product containing every input variable once that equals 1 at exactly one input combination.
For inputs ordered A,B,C, binary 101 gives minterm 5 and the product AB′C.
Multilevel circuit
A multilevel circuit has an input-to-output path through more than two logic-gate levels, often due to factoring.
In a circuit that ORs A(CD+B) with another term, the path from C through CD, CD+B, the AND with A and the OR has four levels.

N

NAND
A NAND gate complements the AND of its inputs, giving 0 only when every input is 1 and giving 1 otherwise.
With both inputs high a two-input NAND outputs 0; with even one input low it outputs 1.
NAND-NAND implementation
A NAND-NAND implementation complements product terms at the first level and combines them with a final NAND to realize SOP.
For AB+C, the final NAND takes (AB)′ and C′; the lone literal bypasses the first level.
NOR
A NOR gate complements the OR of its inputs, giving 1 only when every input is 0 and giving 0 otherwise.
A tied-input NOR gives (A+A)′=A′, so it can supply an inverted input to another NOR.
NOR-NOR implementation
A NOR-NOR implementation complements sum factors at the first level and combines them with a final NOR to realize POS.
For (A+B)C, the final NOR receives (A+B)′ and C′, restoring the desired product.

O

Odd function
An odd function in parity logic is 1 when an odd number of its inputs are 1 and is implemented by their XOR.
The input 111 activates the three-input odd function because its three high inputs form an odd count.
OR-AND-INVERT
An OR-AND-INVERT form, abbreviated OAI, is the complement of a product of sums and can use OR gates feeding NAND.
The expression ((A+B)(C+D))′ needs the final inversion to distinguish it from an ordinary POS.
Overlapping groups
Overlapping groups share one or more cells while each remains a valid rectangle used to simplify the same function.
Reusing a covered 1 can let another group expand from a pair to four cells, removing an extra literal.

P

Parity bit
A parity bit is an extra bit selected to make the total number of 1s in a message and that bit even or odd.
A message with three 1s receives even-parity bit 1, making the transmitted word contain four 1s.
Parity checker
A parity checker tests all received bits, including the parity bit, to see whether the expected total parity holds.
An even-parity checker reports an error when the XOR of the full received word is 1.
Parity generator
A parity generator computes the added bit from the data bits; their XOR supplies the even-parity bit.
For data 110, the generator gives 0 for even parity because the data already contains two 1s.
Power-of-two group
A power-of-two group contains 1, 2, 4, 8 or 16 cells in a valid rectangle on a map of up to four variables.
A six-cell region must be covered by separate valid groups even when all six cells contain 1s.
Prime implicant
A prime implicant is an implicant that cannot be enlarged without including a required 0 in its map group.
Removing any literal from a prime would make it cover an input where the output must remain 0.
Product of sums
A product of sums is an AND of OR factors; it equals 0 whenever at least one of those sum factors equals 0.
In (A+B)(C+D), a low first factor is enough to force the whole output low, regardless of the second.

S

Specified input
A specified input is an input combination whose output is required to be 0 or 1 and must be preserved during simplification.
A group containing an X is allowed, but including a specified 0 in an SOP group changes the required function.
Sum of products
A sum of products is an OR of product terms, each formed by ANDing literals; it is commonly abbreviated SOP.
The expression A′B+BC maps to two AND gates feeding an OR before universal-gate conversion.

T

Truth-table verification
Truth-table verification checks a proposed expression against the required output at every specified input combination.
Checking several 1-inputs is incomplete if an oversized group has accidentally made a required 0 high.

U

Universal gate
A universal gate is a gate type that can be used by itself to build circuits for any Boolean function.
NAND is universal because NAND networks can construct NOT, AND and OR; NOR has the same capability.

W

Wraparound adjacency
Wraparound adjacency makes opposite K-map edges neighbors because their corresponding input labels differ in one bit.
A group may join top and bottom rows while also joining the outer columns of a four-variable map.

Z

Zero-group
A zero-group is a valid map rectangle of 0s used to find a product term of the complement or a POS factor of the function.
A zero-group fixed at A=1,B=0 gives the POS factor (A′+B), which is zero throughout it.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started