Boolean functions and Logic gates#
Boolean operation#
Binary logic consists of binary variables and a set of logical operations.
The variables are designated by letters of the alphabet, such as , , , , , , etc, with each variable having two and only two distinct possible values: and .
Truth table#
A truth table of a Boolean function lists the output values for every possible input value combination in tabular form.

There are three basic logical operations: AND, OR, and NOT.
NOT#

Truth Table :
| X | Z = |
|---|---|
| T | F |
| F | T |
AND#
Truth Table :
| X | Y | Z = X•Y |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
OR#
Truth Table :
| X | Y | Z = X+Y |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
Logic gates#
Basic logic gate#
- Logic gates are basic logic elements of a circuit
- They implement Boolean logic (use voltage to represent logic value)
- NOT gate, AND gate, OR gate implement the three basic logic operations

Other logic gate#

Logic function#
We have three different ways to describe a logic function:
- English language description (specification).
- Logic equation (Boolean equation).
- Truth table.
For simplicity, we will use logic equation to describe.
Notation#
- AND - or or •
- OR - or or +
- NOT - or or ~ or or
Boolean Algebra#
Boolean algebra has applications in set theory, mathematical logic, digital system design.
Algebra over :
- two elements: and
- two binary operations: and •
- a complement operation:
Terminology#
- Variable : a symbol that may take on the value 0 or 1.
- Literal : the use of a variable or its complement in an expression.
- Term : an expression formed by literals and operation at one level.
For example:
The above boolean algebra has :
- 3 variables
- 8 literals
- 4 terms
Axiom#
-
Axiom: a set of mathematical statement asserted to be true
-
If we start with the following axioms (virtually stating the definitions of AND, OR, NOT with a set of math statements), then everything else in Boolean algebra can be derived from them. Info:
-
Identity:
-
Annihilation:
-
Negation:
Theorem#
-
Theorems are logical consequences of the axioms
-
Some useful theorems for logic simplification: Info:
-
Commutative
- Associative
-
Distributive
-
Idempotence
-
Complementation
-
Absorption
-
Combining
-
DeMorgan’s
-
Involution
-
Consensus
(X + Y) + Z = X + (Y + Z)
(X Y) Z = X (Y Z)
#### Example 02X + 1 = 1
X\bullet 0 = 0
### Proof of boolean properties 1. By using axioms or known theorems/Boolean properties. 2. By checking their validity for all possible combinations of variables. ■ Simply with truth table ■ Mathematicians call this proof technique **perfect induction** ### Example: Simplify Logic Expression using Boolean Properties\begin{align} f(a,b,c) &= (a ∧ c) ∨ (a ∧ b ∧ c) ∨ (¬ a ∧ b ∧ c) ∨ (a ∧ b ∧ ¬ c) \ &= (a ∧ c) ∨ (a ∧ b ∧ c) ∨ (a ∧ b ∧ c) ∨ (¬ a ∧ b ∧ c) ∨ (a ∧ b ∧ ¬ c) \ &= (a ∧ c) ∨ (¬ a ∧ b ∧ c) ∨ (a ∧ b ∧ c) ∨ (a ∧ b ∧ ¬ c) ∨ (a ∧ b ∧ c)\ &= (a ∧ c) ∨ ((b ∧ c)∧(¬ a ∨ a)) ∨ ((a ∧ b)∧(¬ c ∨ c)) \ &= (a ∧ c) ∨ ((b ∧ c)∧ 1) ∨ ((a ∧ b)∧1)\ &= (a ∧ c) ∨ (b ∧ c) ∨ (a ∧ b) \end{align}
### NAND Gate and NOR Gate(xy)‘=x’+y’
(x+y)‘=x’y’
 Similarly, NOR gate can be transformed into NOT gate and AND gate. ## Arbitrary fuction presentation A Boolean function can be expressed by : - a truth table - **sum of minterms** that produces output 1 (**Canonical form**) - **product of maxterms** that produces output 0 (**Canonical form**)  ### Minterms (standard products) **Info:** An AND term consisting of all literals in their normal form or in their complement form. ### Maxterms (standard sums) **Info:** An OR term consisting of all literals in their normal form or in their complement form. ### Examplef_1 = x’y’z + xy’z’ + xyz
f_1 = m_1+m_4+m_7 = \Sigma m(1, 4, 7)
Consider the compliment of $f_1$, we have :f_1’ = m_0 +m_2 +m_3 +m_5 +m_6
And we know $f_1 = (f_1')'$, thus by DeMorgan's Law :\begin{align} f_1 =& m_0’m_2’m_3’m_5’m_6’\ =& M_0M_2M_3M_5M_6 = \Pi M(0, 2, 3, 5, 6) \end{align}
Finally, we have the method to converse between two Canonical Forms : **Success:** Interchange the symbols $\Sigma$ and $\Pi$ and list those numbers missing from the original form.f_1 = \Sigma m(1, 4, 7) = \Pi M(0, 2, 3, 5, 6)
### Standard Form Two kinds of Standard forms : - Sum of products (**SOP**) form e.g. $f = xy + x’y + y’z$ - Product of sums (**POS**) form e.g. $g = x(y'+z)(x'+y+z'+w)$ - SOP/POS form of a function is **not unique**. - Sum of Minterm/Product of Maxterm form of a function is **unique**. (**Canonical form**) ### Transforming to Canonical Form Any logic expression can be transformed to Canonical form by factoring about each input variable using the identity : **Info:**f(x_1, …, x_i, …, x_n) = (x_i\land f(x_1, .., 1, .., x_n)\lor (\overline x_i\land f(x_1, …, 0, …, x_n)))
For example, $f(a,b,c) = (a ∧ c) ∨ (b ∧ c) ∨ (a ∧ b)$, say we want to substitude $a$ :\begin{align} f(a, b, c) =& (a ∧ f(1, b, c)) ∨ (a’ ∧ f(0, b, c))\ =& (a ∧ (c ∨ (b ∧ c) ∨ b)) ∨ (a’ ∧ (b ∧ c))\ =& (a ∧ c) ∨ (a ∧ b ∧ c) ∨ (a ∧ b) ∨ (a’ ∧ b ∧ c)\ \end{align}
(b ∧ c) = (a ∧ b ∧ c) ∨ (a’ ∧ b ∧ c)
\begin{align} f(a, b, c) =& (a ∧ c) ∨ (b ∧ c) ∨ (a ∧ b)\ =&(b ∧ a ∧ c) ∨ (b’ ∧ a ∧ c) ∨ (a ∧ b ∧ c) ∨ (a’ ∧ b ∧ c) ∨ (c ∧ a ∧ b) ∨ (c’ ∧ a ∧ b)\ =& m_7+m_5+m_7+m_3+m_7+m_6\ =& \Sigma m(3, 5, 6, 7) \end{align}
## Implementation with Logic Gates Cosider the following logic function :F = X\bar Y + \bar XZ
F = \bar X\bar Y Z+\bar X Y Z+X\bar Y
As we learned above, we just need to use the strategy above to shorten our equation, then we can make our schematic smaller. ###### tags: `Logic Design EECS1010`