Truth table
a | y |
---|---|
0 | 1 |
1 | 0 |
Boolean algebra
\[y = \overline{a}\]
Truth table
a | b | y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Boolean algebra
\[y = a \cdot b\]
Truth table
a | b | y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Boolean algebra
\[y = a + b\]
Truth table
a | b | y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Boolean algebra
\[y = a \oplus b\]
Truth table
a | b | y |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Boolean algebra
\[y = \overline{a \cdot b}\]
Truth table
a | b | y |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
Boolean algebra
\[y = \overline{a + b}\]
Boolean algebra can be used to design combinational logic circuits
Simplify
\[ \begin{align*} & x \cdot y + \overline{y} \cdot z + x \cdot z + x \cdot y \cdot z \\ & x \cdot y \cdot z + x \cdot y \cdot \overline{z} + x \cdot \overline{y} \cdot z + \overline{x} \cdot \overline{y} \cdot z + x \cdot y \cdot z + x \cdot \overline{y} \cdot z + x \cdot y \cdot z \\ & x \cdot y \cdot z + x \cdot y \cdot \overline{z} + x \cdot \overline{y} \cdot z + \overline{x} \cdot \overline{y} \cdot z \\ & x \cdot y \cdot (z + \overline{z}) + \overline{y} \cdot z \cdot (x + \overline{x}) \\ & x \cdot y \cdot 1 + \overline{y} \cdot z \cdot 1\\ & x \cdot y + \overline{y} \cdot z \end{align*} \]
Proof for \(\overline{a + b} = \overline{a} \cdot \overline{b}\)
\(a\) | \(b\) | \(\overline{a + b}\) | \(\overline{a} \cdot \overline{b}\) |
---|---|---|---|
0 | 0 | 1 | 1 |
0 | 1 | 0 | 0 |
1 | 0 | 0 | 0 |
1 | 1 | 0 | 0 |
Simplify
\[ \begin{align*} & a \cdot \overline{b} + a \cdot (\overline{b + c}) + b \cdot (\overline{b + c})\\ & a \cdot \overline{b} + a \cdot \overline{b} \cdot \overline{c} + b \cdot \overline{b} \cdot \overline{c}\\ & a \cdot \overline{b} + a \cdot \overline{b} \cdot \overline{c}\\ & a \cdot \overline{b} \end{align*} \]
\(f\) is defined by the following truth table
x | y | z | f | minterms |
---|---|---|---|---|
0 | 0 | 0 | 1 | \(\overline{x} \cdot \overline{y} \cdot \overline{z}\) |
0 | 0 | 1 | 1 | \(\overline{x} \cdot \overline{y} \cdot z\) |
0 | 1 | 0 | 1 | \(\overline{x} \cdot y \cdot \overline{z}\) |
0 | 1 | 1 | 1 | \(\overline{x} \cdot y \cdot z\) |
1 | 0 | 0 | 0 | |
1 | 0 | 1 | 0 | |
1 | 1 | 0 | 0 | |
1 | 1 | 1 | 1 | \(x \cdot y \cdot z\) |
A minterm must contain all variables (in either complemented or uncomplemented form)
A Boolean function expressed as the disjunction (OR) of its minterms is said to be in the Disjunctive Normal Form (DNF)
Example:
\[f = \overline{x} \cdot \overline{y} \cdot \overline{z} + \overline{x} \cdot \overline{y} \cdot z + \overline{x} \cdot y \cdot \overline{z} + \overline{x} \cdot y \cdot z + x \cdot y \cdot z\]
A Boolean function expressed as the ORing of ANDed variables (not necessarily minterms) is in Sum of Products (SOP) form.
\[f = \overline{x} + y \cdot z\]
A maxterm of \(n\) Boolean variables is the disjunction of all the variables either in complemented or uncomplemented form.
Example (referring to the truth table for \(f\))
\[\begin{align*} \overline{f} &= x \cdot \overline{y} \cdot \overline{z} + x \cdot \overline{y} \cdot z + z \cdot y \cdot \overline{z}\\ f &= (\overline{x} + y + z) \cdot (\overline{x} + y + \overline{z}) \cdot (\overline{x} + \overline{y} + z) \end{align*}\]
A Boolean function expressed as the conjunction (AND) of its maxterms is said to be in Conjunctive Normal Form (CNF)
Example:
\[f = (\overline{x} + y + z) \cdot (\overline{x} + y + \overline{z}) \cdot (\overline{x} + \overline{y} + z)\]
A Boolean function expressed as the ANDing of ORed variables (not necessarily maxterms) is often said to be in Product of Sums (POS) form.
Karnaugh Maps (or K-maps) are a powerful visual tool for carrying out simplification and manipulation of logical expressions with less than 6 variables.
Simplify:
\[f = \overline{x} \cdot \overline{y} \cdot \overline{z} + \overline{x} \cdot \overline{y} \cdot z + \overline{x} \cdot y \cdot \overline{z} + \overline{x} \cdot y \cdot z + x \cdot y \cdot z\]
K-map:
Simplified: \(f = \overline{x} + y \cdot z\)
Plot \(f = \overline{a} \cdot b + b \cdot \overline{c} \cdot \overline{d}\)
Plot \(f = \overline{b}\)
Plot \(f = \overline{b} \cdot \overline{d}\)
Simplify \(f = \overline{a} \cdot b \overline{d} + b \cdot c \cdot d + \overline{a} \cdot b \cdot \overline{c} \cdot d + c \cdot d\)
\(f = \overline{a} \cdot b + c \cdot d\)
Simplify \(f = \overline{a} \cdot b + b \cdot \overline{c} \cdot \overline{d}\) into POS form
Simplified: \(\overline{f} = \overline{b} + a \cdot c + a \cdot d\)
Applying DeMorgan’s: \(f = b \cdot ( \overline{a} + \overline{c}) \cdot (\overline{a} + \overline{d})\)
Apply DeMorgan’s and take the complement, that is, \(\overline{f}\) is now in SOP form
Fill in zeros in table, that is, plot \(\overline{f}\)
Fill remaining cells with ones, that is, plot \(f\)
Simplify in the usual way by grouping ones to simplify \(f\)
Sometimes we do not care about the output value of a combinational logic circuit, for example, if certain input combinations can never occur.
These are called don’t care conditions
In a simplification they may be treated as 0 or 1 depending on which gives the simplest result
Simplify the function \(f = \overline{a} \cdot \overline{b} \cdot d + \overline{a} \cdot c \cdot d + a \cdot c \cdot d\) with don’t care conditions \(\overline{a} \cdot \overline{b} \cdot \overline{c} \cdot \overline{d}\), \(\overline{a} \cdot \overline{b} \cdot c \cdot \overline{d}\), \(\overline{a} \cdot b \cdot \overline{c} \cdot d\)
Simplified: \(f = \overline{a} \cdot \overline{b} + c \cdot d\) or \(f = \overline{a} \cdot d + c \cdot d\)
Cover - a term is said to cover a minterm if that minterm is part of that term
Prime implicant - a term that cannot be further combined
Essential term - a prime implicant that covers a minterm that no other prime implicant covers
Covering set - a minimum set of prime implicants which includes all essential terms plus any other prime implicants required to cover all minterms
Truth table
\(a\) | \(b\) | \(out\) |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Adds two single bit binary numbers \(a\) and \(b\) (note: no carry input)
Truth table
\(a\) | \(b\) | \(c_{out}\) | \(sum\) |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
1 | 1 | 1 | 0 |
Adds two single bit numbers \(a\) and \(b\) (note: with a carry input)
Truth table
\(c_{in}\) | \(a\) | \(b\) | \(c_{out}\) | \(sum\) |
---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 | 1 |
0 | 1 | 0 | 0 | 1 |
0 | 1 | 1 | 1 | 0 |
1 | 0 | 0 | 0 | 1 |
1 | 0 | 1 | 1 | 0 |
1 | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 1 | 1 |
The half adder and full adder implement two bit binary addition with and without carry-in
In general, we need to add two \(n\) bit binary numbers
The ripple carry adder is \(n\) full adders cascaded together.
Example: 4 bit adder
A bit-level multiplexor has data signals \(a\) and \(b\) and a control signal \(c\) outputs \(a\) or \(b\) depending on \(c\)
Truth table
\(a\) | \(b\) | \(c\) | out |
---|---|---|---|
0 | 0 | 0 | 0 (b) |
0 | 0 | 1 | 0 (a) |
0 | 1 | 0 | 1 (b) |
0 | 1 | 1 | 0 (a) |
1 | 0 | 0 | 0 (b) |
1 | 0 | 1 | 1 (a) |
1 | 1 | 0 | 1 (b) |
1 | 1 | 1 | 1 (a) |
Also computes condition codes
Example: four function ALU
An RS latch is a memory element with two inputs: reset (\(R\)) and set (\(S\)), and two outputs: \(Q\) and \(\overline{Q}\)
\(S\) | \(R\) | \(Q'\) | \(\overline{Q'}\) | comment |
---|---|---|---|---|
0 | 0 | \(Q\) | \(\overline{Q}\) | hold |
0 | 1 | 0 | 1 | reset |
1 | 0 | 1 | 0 | set |
1 | 1 | 0 | 0 | illegal |
where \(Q'\) is the next state and \(Q\) is the current state.
A state transition table is a way of viewing the operation of an RS latch.
\(Q\) | \(S\) | \(R\) | \(Q'\) | comment |
---|---|---|---|---|
0 | 0 | 0 | 0 | hold |
0 | 0 | 1 | 0 | reset |
0 | 1 | 0 | 1 | set |
0 | 1 | 1 | 0 | illegal |
1 | 0 | 0 | 1 | hold |
1 | 0 | 1 | 0 | reset |
1 | 1 | 0 | 1 | set |
1 | 1 | 1 | 0 | illegal |
The RS latch output state changes occur directly in response to changes in the inputs. This is called asynchronous operation.
The clock is typically a square wave signal at a particular frequency that imposes order on the state changes.