BACSE103 Computation Structures
Lecture 4: Boolean Functions
Dr. Anis Fatema
Assistant Professor Senior,
Sensors and Biomedical Department, SENSE.
24-07-2025 Lecture 2 1
Complement of a function
• The complement of a function F is F’ and is obtained from an interchange of 0’s for
1’s and 1’s for 0’s in the value of F (truth table method)
• The complement of a function may be derived algebraically through DeMorgan’s
theorems
• Example: 𝐹 = 𝑥 + 𝑦 ′ 𝑧 what is F’?
• But what if the function has more terms?
• DeMorgan’s theorems can be extended to three or more variables
• The three‐variable form of the first DeMorgan’s theorem:
𝑥 + 𝑦 + 𝑧 ′ = 𝑥 ′𝑦′𝑧′
𝑥𝑦𝑧 ′ = 𝑥 ′ + 𝑦 ′ + 𝑧′
• The generalized form of DeMorgan’s theorems states that the complement of a
function is obtained by interchanging AND and OR operators and complementing
each literal
27-07-2025 Lecture 5 2
Minterms
• A binary variable may appear either in its normal form (x) or in its complement
form (x)
• Now consider two binary variables x and y combined with an AND operation
• Since each variable may appear in either form, there are four possible
combinations: 𝑥𝑦, 𝑥 ′ 𝑦, 𝑥𝑦 ′ , 𝑥 ′ 𝑦 ′
• Each of these four AND terms is called a minterm, or a standard product
• In a similar manner, n variables can be combined to form 2n minterms
• The binary numbers from 0 to 2n - 1 are listed under the n variables. Each minterm
is obtained from an AND term of the n variables, with each variable being primed
if the corresponding bit of the binary number is a 0 and unprimed if a 1
• A symbol for each minterm is mj, where the subscript j denotes the decimal
equivalent of the binary number of the minterm designated
27-07-2025 Lecture 5 3
Maxterms
• In a similar fashion, n variables forming an OR term, with each variable
being primed or unprimed, provide 2n possible combinations, called
maxterms, or standard sums
• Each maxterm is obtained from an OR term of the n variables, with each
variable being unprimed if the corresponding bit is a 0 and primed if a 1,
and
• Maxterms are denoted by Mj
27-07-2025 Lecture 5 4
Minterms and Maxterms
It is important to note that:
1. Each maxterm is the complement of its corresponding minterm and vice versa
2. Minterms are 1 for a unique combination of the variables, ie, 𝑥 ′ 𝑦 is only one when x is 0 and y is 1, in all other cases,
it is zero
3. Maxterms are 0 for a single unique combination of variables
27-07-2025 Lecture 5 5
Boolean functions
• Any Boolean function can be
expressed algebraically from a given
truth table by forming a minterm for
each combination of the variables
that produces a 1 in the function
and then taking the OR of all those
terms
• Example: 𝑓1 = 𝑚1 + 𝑚4 + 𝑚7
𝑓1 = 𝑥 ′ 𝑦 ′ 𝑧 + 𝑥𝑦 ′ 𝑧′ + 𝑥𝑦𝑧
• Thus, any Boolean function can be
expressed as a sum of minterms
(with “sum” meaning the ORing of
terms)
27-07-2025 Lecture 5 6
Boolean functions
• Now consider the complement of a
Boolean function
• It may be read from the truth table by
forming a minterm for each combination
that produces a 0 in the function and then
ORing those terms
𝑓1′ = 𝑚0 + 𝑚2 + 𝑚3 + 𝑚5 + 𝑚6
• If we again take a complement, we get f1
back:
𝑓1 = (𝑚0 + 𝑚2 + 𝑚3 + 𝑚5 + 𝑚6 )′
𝑓1 = 𝑚0′ 𝑚2′ 𝑚3′ 𝑚5′ 𝑚6′
𝑓1 = 𝑀0 𝑀2 𝑀3 𝑀5 𝑀6
27-07-2025 Lecture 5 7
Boolean functions
• This shows a second property of
Boolean algebra: Any Boolean
function can be expressed as a
product of maxterms (with
“product” meaning the ANDing of
terms)
• The procedure for obtaining the
product of maxterms directly from
the truth table is as follows: Form a
maxterm for each combination of
the variables that produces a 0 in
the function, and then form the AND
of all those maxterms
27-07-2025 Lecture 5 8
Boolean functions
• Are there infinitely many Boolean functions for two independent variables, x
and y?
• What are the total number of functions possible for two variables?
• For n variables?
2𝑛
• We can have 2 functions for n binary variables!
• Thus, for two variables, n = 2, and the number of possible Boolean functions
is 16
• Therefore, the AND and OR functions are only 2 of a total of 16 possible
functions formed with two binary variables
• Let us find the other 14 functions and investigate their properties
27-07-2025 Lecture 6 9
Boolean functions
• Constant functions: 0 and 1
• AND and OR –the well-known logic functions
• Transfer functions: x and y
• Complement functions: x’ and y’
27-07-2025 Lecture 6 10
Boolean functions
• NAND and NOR –these are complementary functions to the usual AND and
OR functions
• Take the AND/OR and then take the complement
• NAND is represented by ↑and NOR is represented by ↓
• 𝑥 ↑ 𝑦 = (𝑥. 𝑦)′ and 𝑥 ↓ 𝑦 = (𝑥 + 𝑦)′
27-07-2025 Lecture 6 11
Boolean functions
• Exclusive OR (XOR) returns 1 only if one of x or y is 1, it is 0 if both are one
• This is represented by the symbol ⊕
• 𝑥 ⊕ 𝑦 = 𝑥′𝑦 + 𝑦′𝑥
• The complement of this is XNOR or Equivalence (is x=y?)
27-07-2025 Lecture 6 12
Boolean functions
• Inhibition function: x but not y (F2), and y but not x (F4)
• x but not y: If y is LOW then what is x?
• It is represented by a /
• 𝑥/𝑦=𝑥𝑦′
27-07-2025 Lecture 6 13
Boolean functions
• Implications: x implies y (F13), or y implies x (F11)
• This tells us whether the variables x and y are following the given
implication rule
• It is not for determining whether the two variables form an implication rule
between them
27-07-2025 Lecture 6 14
Boolean functions
27-07-2025 Lecture 6 15