Professional Documents
Culture Documents
DATE : 18/10/2022 2
Definition of Binary Logic
• Binary logic consists of binary variables and a set of logical
operations
• Variables:
• Are designated by letters of the alphabet, such as 𝐴, 𝐵, 𝐶, 𝑥, 𝑦, 𝑧, …
• Have two and only two distinct values: 1 and 0
• Logical Operations:
• There are three basic logical operations
• AND, OR, and NOT
3
AND
• AND operation is represented by a dot (⋅) or by the absence of an
operator
• Example: 𝑋 ⋅ 𝑌 = 𝑍 or 𝑋𝑌 = 𝑍
• 𝑋, 𝑌, and 𝑍 are binary variables and can be equal to either 1 or 0, nothing
else
• “𝑋 AND 𝑌 is equal to 𝑍”
• 𝑍 = 1 if and only if 𝑋 = 1 and 𝑌 = 1; otherwise 𝑍 = 0
4
OR
• OR operation is represented by a plus (+)
• Example: 𝑋 + 𝑌 = 𝑍
• “𝑋 OR 𝑌 is equal to 𝑍”
• 𝑍 = 1 if 𝑋 = 1 or 𝑌 = 1 or if both 𝑋 = 1 and 𝑌 = 1
• If both 𝑋 = 0 and 𝑌 = 0, then 𝑍 = 0
5
NOT
• NOT operation is represented by a prime ′ or an overbar ഥ
• Example: 𝑋 ′ = 𝑍 or 𝑋ത = 𝑍
• “NOT 𝑋 is equal to 𝑍”
• If 𝑋 = 1, then 𝑍 = 0, but if 𝑋 = 0, then 𝑍 = 1
• The NOT operation is also referred to as the complement operation,
since it changes a 1 to a 0 and a 0 to a 1
6
Truth Table
• Definition of logical operations may be listed in a compact form
called truth tables
• A truth table is a table of all possible combinations of the variables,
showing the relation between values the variables can take and the
result of the operation
7
Logic Gates
• Logic gates are electronic circuits that operate on one or more input
signals to produce an output signal
• Logic circuits respond to two separate voltage levels that represent
binary variable equal to logic 0 or logic 1
8
Logic Gates
9
Logic Gates
10
Basic Theorems
11
Basic Theorems
• Operations with 0 and 1:
𝑋 + 0 = 𝑋, 𝑋⋅1=𝑋
𝑋 + 1 = 1, 𝑋⋅0=0
• Idempotent laws:
𝑋 + 𝑋 = 𝑋, 𝑋⋅𝑋 =𝑋
• Involution law:
𝑋′ ′
=𝑋
• Laws of complementarity:
𝑋 + 𝑋 ′ = 1, 𝑋 ⋅ 𝑋′ = 0
12
Basic Theorems
• Commutative laws:
𝑋𝑌 = 𝑌𝑋, 𝑋+𝑌 =𝑌+𝑋
• Associative laws:
𝑋𝑌 𝑍 = 𝑋 𝑌𝑍 = 𝑋𝑌𝑍, 𝑋+𝑌 +𝑍 =𝑋+ 𝑌+𝑍 =𝑋+𝑌+𝑍
13
Basic Theorems
• Distributive laws:
𝑋 𝑌 + 𝑍 = 𝑋𝑌 + 𝑋𝑍, 𝑋 + 𝑌𝑍 = (𝑋 + 𝑌)(𝑋 + 𝑍)
• Absorption law:
𝑋 + 𝑋𝑌 = 𝑋, X 𝑋+𝑌 =𝑋
• Combining law:
𝑋𝑌 + 𝑋𝑌 ′ = 𝑋, 𝑋 + 𝑌 𝑋 + 𝑌′ = 𝑋
14
Basic Theorems
• Consensus law:
𝑋𝑌 + 𝑋 ′ 𝑍 + 𝑌𝑍 = 𝑋𝑌 + 𝑋 ′ 𝑍
𝑋 + 𝑌 𝑋′ + 𝑍 𝑌 + 𝑍 = 𝑋 + 𝑌 𝑋′ + 𝑍
• DeMorgan’s laws:
𝑋+𝑌 ′ = 𝑋 ′ 𝑌′, 𝑋𝑌 ′ = 𝑋 ′ + 𝑌′
Examples:
• Simplify the following Boolean functions to a minimum number of
literals
1. 𝑥 𝑥′ + 𝑦
2. 𝑥 + 𝑥′𝑦
3. 𝑥 + 𝑦 𝑥 + 𝑦′
4. 𝑥𝑦 + 𝑥 ′ 𝑧 + 𝑦𝑧
5. (𝑥 + 𝑦)(𝑥 ′ + 𝑧)(𝑦 + 𝑧)
16
Examples:
1. 𝑥 𝑥 ′ + 𝑦
= 𝑥𝑥 ′ + 𝑥𝑦
= 0 + 𝑥𝑦
= 𝑥𝑦
2. 𝑥 + 𝑥 ′ 𝑦
= 𝑥 + 𝑥′ 𝑥 + 𝑦
=1 𝑥+𝑦
=𝑥+𝑦
17
Examples:
3. 𝑥 + 𝑦 (𝑥 + 𝑦′)
= 𝑥 + 𝑥𝑦 + 𝑥𝑦 ′ + 𝑦𝑦 ′
= 𝑥(1 + 𝑦 + 𝑦′)
=𝑥
4. 𝑥𝑦 + 𝑥 ′ 𝑧 + 𝑦𝑧
= 𝑥𝑦 + 𝑥 ′ 𝑧 + 𝑦𝑧 𝑥 + 𝑥 ′
= 𝑥𝑦 + 𝑥 ′ 𝑧 + 𝑥𝑦𝑧 + 𝑥 ′ 𝑦𝑧
= 𝑥𝑦 1 + 𝑧 + 𝑥 ′ 𝑧 1 + 𝑦
= 𝑥𝑦 + 𝑥 ′ 𝑧
18
Examples:
5. (𝑥 + 𝑦)(𝑥 ′ + 𝑧)(𝑦 + 𝑧)
= (𝑥 + 𝑦)(𝑥 ′ + 𝑧)(𝑦 + 𝑧 + 𝑥𝑥 ′ )
= (𝑥 + 𝑦)(𝑥 ′ + 𝑧)(𝑥 + 𝑦 + 𝑧)(𝑥 ′ + 𝑦 + 𝑧)
= 𝑥 + 𝑦 𝑥′ + 𝑧
19
Examples
• Find the complement of the functions
𝐹1 = 𝑥 ′ 𝑦𝑧 ′ + 𝑥 ′ 𝑦 ′ 𝑧
𝐹1′ = 𝑥 ′ 𝑦𝑧 ′ + 𝑥 ′ 𝑦 ′ 𝑧 ′
= 𝑥 ′ 𝑦𝑧 ′ ′ 𝑥 ′ 𝑦 ′ 𝑧 ′
= 𝑥 + 𝑦′ + 𝑧 𝑥 + 𝑦 + 𝑧′
𝐹2 = 𝑥 𝑦 ′ 𝑧 ′ + 𝑦𝑧
𝐹2′ = 𝑥 𝑦 ′ 𝑧 ′ + 𝑦𝑧 ′
= 𝑥 ′ + 𝑦 ′ 𝑧 ′ + 𝑦𝑧 ′
= 𝑥 ′ + 𝑦 ′ 𝑧 ′ ′ 𝑦𝑧 ′
= 𝑥′ + 𝑦 + 𝑧 𝑦′ + 𝑧′
= 𝑥 ′ + 𝑦𝑧 ′ + 𝑦 ′ 𝑧
20
NAND Gate
X Y Z
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate
X Y Z
0 0 1
0 1 0
1 0 0
1 1 0
Standard Representations of Logic Functions
23
Truth Tables
• A truth table lists the output of the circuit for every possible
combination of the input
Truth Tables
• Two expressions are equal if they have the same value for every possible
combination of the variables
• Using the truth table (number of entries in the truth table is equal to 2𝑛 , where
𝑛 is the number of variables in the expression), we can show that
𝐴𝐵′ + 𝐶 = 𝐴 + 𝐶 𝐵′ + 𝐶
25
Definitions
• Literal: A variable or the complement of a variable.
Ex: 𝑋, 𝑌, 𝑋 ′ , 𝑌′
• Each minterm is the complement of its maxterm and vice versa 𝑚𝑗′ = 𝑀𝑗
Minterms and Maxterms
30
Canonical Forms: Sum of Minterms
• A Boolean function 𝑓1 can be expressed by
• A truth table
• Sum of the minterms corresponding to truth table rows (input combinations)
for which the 𝑓1 = 1
31
Canonical Forms: Sum of Minterms
• 𝑓1 = 𝑥 ′ 𝑦 ′ 𝑧 + 𝑥𝑦 ′ 𝑧 ′ + 𝑥𝑦𝑧 = 𝑚1 + 𝑚4 + 𝑚7 = σ 𝑚 1,4,7
• 𝑓2 = 𝑥 ′ 𝑦𝑧 + 𝑥𝑦 ′ 𝑧 + 𝑥𝑦𝑧 ′ + 𝑥𝑦𝑧 = 𝑚3 + 𝑚5 + 𝑚6 + 𝑚7 = σ 𝑚 3,5,6,7
32
Canonical Forms: Sum of Minterms
• A Boolean function 𝑓1 can be expressed by
• A truth table
• Product of the maxterms corresponding to truth table rows (input
combinations) for which the 𝑓1 = 0
33
Canonical Forms: Product of Maxterms
• 𝑓1 = 𝑥 + 𝑦 + 𝑧 𝑥 + 𝑦 ′ + 𝑧 𝑥 + 𝑦 ′ + 𝑧 ′ 𝑥 ′ + 𝑦 + 𝑧 ′ 𝑥 ′ + 𝑦 ′ + 𝑧 =
𝑀0 ⋅ 𝑀2 ⋅ 𝑀3 ⋅ 𝑀5 ⋅ 𝑀6 = ς 𝑀 0,2,3,5,6
34
Examples:
• Express the function 𝐹 = 𝐴 + 𝐵′ 𝐶 as a sum of
minterms
35
Examples:
Express the Boolean function 𝐹 = 𝑥𝑦 + 𝑥 ′ 𝑧 as a product of maxterms
36
Conversion between Canonical Forms
• The complement of a function expressed as the sum of minterms
equals the sum of minterms missing from the original function
𝐹(𝐴, 𝐵, 𝐶) = 𝑚 1, 4, 5, 6, 7
𝐹(𝐴, 𝐵, 𝐶) = ෑ 𝑀(0, 2, 3)
Equivalently,
𝐹 𝑥, 𝑦, 𝑧 = ෑ 𝑀 0, 2, 4, 5
38