Purpose of simplification

Simpler expression leads to circuit with lesser logic gates, resulting in cheaper, low-power-requirement, and sometimes faster.

Techniques

Algebraic Simplification

Aims to minimise number of literals and number of terms.

![](../../../schoolwork/cs2100/Logic/media/Pasted image 20241002141314.png)

Half-Adder

Half adder

A circuit that adds 2 single bits (X, Y) to produce a result of 2 bits (C, S).

XYSCHalf-adderXYCS0011001100111000XYSCXORAND

Gray Code

  • Unweighted (not an arithmetic code)
  • Only a single bit change

![](../../../schoolwork/cs2100/Logic/media/Pasted image 20241002144104.png)

K-Maps

Karnaugh-map

Abstract form of Venn diagram, organised as a matrix of squares, where each square represents a minterm, and two adjacent squares represent minterms that differ by exactly one literal.

Objective: Fewest possible product terms and literals. Advantage: Easy to use Disadvantage: Limited to 5 or 6 variables

ab1010abK-maps

Filling the K-map

Put a 1 to correspond to a minterm in the function, and otherwise.

XYSCHalf-adderab1000Cab1010S

Variable K-maps

3-variablesTo represent the variables in 2rows, we refer to the minterm ofb and c as the second variable.ab + c0001101101Note that: these differ byTWO literalsab + c0001101101swapnow only differs by one literal.acbGray code sequenceEach cell in a variable K-map has adjacent neighbours. The K-map allows for this with a wrap-around.

ab + c0001101101m0m1m3m2m4m5m7m6WRAPAROUND:m0 neighbours:m1, m4, m2A neighbour is a valuewith only one literalchanged.m0 = 000m4m2m1change

As the number of variables increase, it is harder to draw out. For variable K-maps, where there will be an expected amount of squares, it can be organised as two variable K-maps, where, one K-map is on top of the other.

Using K-maps

The unifying theorem (complement law) allows us to use

  • each valid grouping of adjacent cells to correspond to a simpler product term of

ab + c0001101101m0m1m3m2m4m5m7m6

Assume that the green squares are the minterms with output 1 for function .

We currently have:

Since are adjacent, we can group them together, meaning we eliminate the variable from the product term.

To use effectively:

  1. Group as many cells as possible
  • The larger the group, the fewer the number of literals in product term.
  1. Select as few groups as possible (the lesser the groups, the fewer the number of product terms)

Implicants

Implicants

A product term that could be used to cover minterms of a function

Prime implicants

A product term obtained by combining the maximum possible number of minterms from adjacent squares in the map.

111111111111BiggestgroupingPrime implicantNot prime implicant

Essential prime implicants

A prime implicant that includes at least one minterm that is not covered by any other prime implicant

11111111m3, m7, m15, m110001111000011110m13, m9, m15, m11m3, m7, m2, m6does not include one minterm that is not covered111111110001111000011110only prime implicants

Algorithm

  1. Circle all prime-implicants
  2. Identify and select all essential prime-implicants
  3. Select a minimum subset

11111111111111111Circle all prime implicants.111111111Keep only essential prime implicants12REMOVED111111111Select minimum subset of remainingprime implicants3

Simplified POS expression

The Simplified POS expression can be found using two methods:

  • the K-map of the maxterms, and grouping 0s together
  • complement of the SOP expression

Don’t Care conditions

Don't care conditions

In some cases, outputs are not specified or are invalid. These outputs can then be either 1 or 0. These conditions are denoted X or d.

ACBD0000011111101111example possibletruth table(if all inputs valid)ACBD0X0X011111101X1Xexample possibletruth tableif inputs00 & 11 invalid

This changes the eventual SOP/POS expressions.

Assuming all inputs are invalid:X11XABfor CX01XABfor D0111ABfor C0011ABfor DAssuming all inputs are valid: