The Wayback Machine - https://web.archive.org/web/20240917124519/https://www.geeksforgeeks.org/representation-of-boolean-functions/
Open In App

Representation of Boolean Functions

Last Updated : 11 Sep, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Boolean functions are expressions involving Boolean variables and operators, such as AND, OR, and NOT. These functions are fundamental in digital logic design, computer science, and engineering.

What are Boolean Functions?

Boolean functions are mathematical expressions involving Boolean variables that take on values of true or false, typically represented as 1 and 0, respectively. These functions are fundamental in digital logic design, computer science, and engineering, as they form the basis of digital circuits and various computational processes.

Definition of Boolean Functions

A Boolean function is a function that takes one or more Boolean inputs and produces a Boolean output. It can be represented using Boolean algebra, which involves operations such as AND, OR, NOT, NAND, NOR, XOR, and XNOR.

Representation of Boolean Functions

  • Truth Tables: List all possible values of the variables and the corresponding function values.
  • Boolean Expressions: Use algebraic expressions with Boolean variables and operators.
  • Karnaugh Maps (K-maps): Graphical representation to simplify Boolean functions.
  • Binary Decision Diagrams (BDDs): Graph-based representation of Boolean functions.

An algebraic equation that includes binary variables, the constants 1 and 0, and the logic operation symbols +,., and ‘, describes a Boolean function. A boolean function can have a value of 1 or 0 for any set of binary variable values involved. For example, we can use the three binary variables x, y, and z to define the boolean function F = x’y + z. In the event where x = 0 and y = 1 or z = 1, the function would equal 1.

A boolean function can be expressed in terms of the Truth Table or by an algebraic expression similar to the one that was previously discussed. A function can be expressed using a variety of algebraic expressions because they are all logically identical.

Different representations of a Boolean function

(A) Each function has Î― = 3 variables named a, b, and c. The truth table specifies the value fΞ(a, b, c) ∈ {0, 1} for each of the 2Âģ possible combinations of 3 binary inputs (columns). Combinations corresponding to fΞ = 1 are called minterms. A function is identified by its designation number X = 11101010 (last row). More readable representations are the full (top) and minimized (bottom) disjunctive normal forms.

Representation-of-Boolean-Functions---1

(A)

(B) Hypercube consists of a set of terms (nodes), minterms (gray nodes), and edges connecting the closest terms in the function.

Representation-of-Boolean-Functions---2

(B)

(C) A feed-forward Boolean network (FFBN) is a directed network made up of logic gates and wires that implement the function. The figure shows the FFBN of minimal cost.

Representation-of-Boolean-Functions---3

(C)

Canonical and Standard Forms

Constructing Boolean Functions

Now that we know what minterms and maxterms are, we can use them to construct boolean expressions. “A 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.” For example, consider two functions [Tex]f_1   [/Tex]and [Tex]f_2   [/Tex]with the following truth tables –

xyzf 1 f 2 
00000
00110
01000
01101
10010
10101
11001
11111

Applications of Boolean Functions

  1. Digital Circuit DesignBoolean functions are used to design and simplify digital circuits, including logic gates, multiplexers, adders, and more. Simplifying Boolean expressions reduces the number of gates required, optimizing circuit design.Example: Designing a digital circuit to perform arithmetic operations involves using Boolean functions to define the behavior of adders and subtractors.
  2. Computer AlgorithmsBoolean functions are integral to algorithms that involve decision-making, such as search algorithms, sorting algorithms, and error detection and correction algorithms.Example: In search algorithms, Boolean functions help determine whether a condition is met, guiding the search process.
  3. Fault DetectionBoolean functions are used in fault detection and diagnosis in digital systems. By comparing the expected and actual outputs of a digital circuit, faults can be identified and corrected.Example: Built-in self-test (BIST) techniques use Boolean functions to generate test patterns and compare the results to detect faults in integrated circuits.
  4. Control SystemsBoolean functions are used in control systems to define the logic for system operation, such as switching on or off, opening or closing valves, and more.Example: In an automated manufacturing process, Boolean functions control the operation of machinery based on sensor inputs.

Solved Examples

Example 1: Canonical Sum-of-Products (SOP) Form

Problem: Express the function F(A,B,C) = A + BC in canonical SOP form.

Solution: F(A,B,C) = A’BC + A’BC’ + ABC + ABC’

Explanation: We expand the original function to include all minterms where F is true. This includes all terms where A is true (regardless of B and C) and the term where A is false but both B and C are true.

Example 2: Canonical Product-of-Sums (POS) Form

Problem: Express the function F(x,y,z) = x + y’z in canonical POS form.

Solution: F(x,y,z) = (x + y + z)(x + y + z’)(x + y’ + z)(x + y’ + z’)

Explanation: We find all the maxterms where the function is false and AND them together. The function is false only when x is false, y is true, and z is false.

Example 3: Algebraic Representation

Problem: Simplify the Boolean function F = AB + A’B + AB’.

Solution: F = A + B

Explanation:

F = AB + A’B + AB’

= AB + A’B + AB’ + AB (adding AB doesn’t change the function)

= B(A + A’) + A(B + B’)

= B(1) + A(1)

= B + A

= A + B

Example 4 : Express the function F(A,B,C) = A’B + BC’ in canonical SOP form.

Solution: F(A,B,C) = A’BC’ + A’BC + ABC’

Explanation: We expand the original function to include all minterms where F is true. This includes terms where A is false and B is true (regardless of C), and where B is true and C is false (regardless of A).

Example 5: Convert the function F(x,y,z) = x’y’z + xy’z’ + xyz to canonical POS form.

Solution: F(x,y,z) = (x + y + z)(x + y’ + z)(x’ + y + z)

Explanation: We find all the maxterms where the function is false and AND them together. The function is false only when (x,y,z) is (0,1,0), (1,0,1), or (0,0,1).

Example 6 : Simplify the Boolean expression: G(a,b,c) = ab + a’c + bc

Solution: G(a,b,c) = ab + c

Explanation:

G = ab + a’c + bc

= ab + c(a’ + b)

= ab + c(a’ + b + ab) (adding ab doesn’t change the result)

= ab + c(a’ + b)

= ab + c

Example 7 : Express the function H(p,q,r) = p’q’ + qr’ in algebraic form using only NAND operations.

Solution: H(p,q,r) = ((p NAND p) NAND (q NAND q)) NAND ((q NAND (r NAND r)) NAND (q NAND (r NAND r)))

Explanation: We first convert OR to NAND using De Morgan’s law, then replace AND with NAND, and finally replace NOT with a NAND of the variable with itself.

Example 8 : Express the function K(a,b,c) = (a + b’)(a’ + c) in canonical SOP form.

Solution: K(a,b,c) = a’bc + ab’c + abc

Explanation: We expand the expression and find all combinations that make it true. This includes when a is false, b and c are true; when a and c are true, b is false; and when all variables are true.

Problem 9 : Convert the function F(w,x,y,z) = wx + y’z + xyz’ to Reed-Muller canonical form.

Solution: F(w,x,y,z) = 1 ⊕ y ⊕ z ⊕ wx ⊕ yz

Explanation:

Start with F = wx + y’z + xyz’

Replace y’ with (1 ⊕ y)

F = wx + (1 ⊕ y)z + xyz’

Expand: F = wx + z ⊕ yz + xyz’

Combine xyz’ and xyz: F = wx + z ⊕ yz + xy(z’ ⊕ z)

Since (z’ ⊕ z) = 1, we get: F = wx + z ⊕ yz + xy

Rearranging: F = 1 ⊕ y ⊕ z ⊕ wx ⊕ yz

The Reed-Muller canonical form uses XOR (⊕) and AND operations, with each variable appearing at most once in each term.

Example 10 : Represent the function G(a,b,c) = a’b + bc’ + ac using a Binary Decision Diagram (BDD).

Solution: The BDD for this function would look like this (described textually):

Root node: a

If a = 0: go to node b

If b = 0: output 0

If b = 1: output

If a = 1: go to node c

If c = 0: go to node b

If b = 0: output 0

If b = 1: output 1

If c = 1: output 1

Explanation:

We start with variable a at the root.

If a is false (0), the function reduces to b, so we output 1 if b is true, 0 otherwise.

If a is true (1), we need to check c.

If c is true, the function is true regardless of b.

If c is false, we need to check b (because of the bc’ term).

Practice Problems – Representation of Boolean Functions

1. Express the function F(x,y,z) = x’y + yz + xz’ in canonical Sum-of-Products (SOP) form.

2. Convert the function G(a,b,c) = (a + b’)(a’ + c)(b + c’) to canonical Product-of-Sums (POS) form.

3. Simplify the Boolean expression H(p,q,r) = pq + p’r + qr using algebraic methods.

4. Represent the function J(w,x,y,z) = ÎĢm(0,1,3,4,5,7,8,9,11,15) using a Karnaugh map and find its minimal SOP form.

5. Express the function K(a,b,c) = a’b + bc’ + ab’c in Reed-Muller canonical form.

6. Convert the function L(x,y,z) = x’y’z + xy’z’ + xyz to a form using only NOR operations.

7. Draw a Binary Decision Diagram (BDD) for the function M(p,q,r) = pq + qr’ + pr.

8. Find the dual of the function N(a,b,c) = (a + b’)(a’ + c).

9. Express the function P(w,x,y,z) = w’x + yz + wx’y’ using Shannon’s expansion theorem.

10. Given the truth table for function Q(a,b,c) where Q is true for minterms 1, 2, 4, and 7, express Q in minimal SOP and minimal POS forms.

Conclusion – Representation of Boolean Functions

Boolean functions are a cornerstone of digital logic design and computer science. They provide a systematic way to represent and manipulate logical relationships between variables, enabling the design and optimization of digital circuits and computational processes. Understanding Boolean functions is essential for anyone working in fields related to digital electronics and computer engineering.

FAQs on Representation of Boolean Functions

What is a Boolean function?

A Boolean function is a mathematical expression involving Boolean variables and logical operations such as AND, OR, and NOT. It produces a Boolean output (true or false).

How can Boolean functions be represented?

Boolean functions can be represented using truth tables, Boolean expressions, Karnaugh maps (K-maps), and binary decision diagrams (BDDs).

What is the purpose of using Karnaugh maps (K-maps)?

Karnaugh maps are used to simplify Boolean expressions by visually representing the function and identifying opportunities to minimize the number of logical operations required.

How do truth tables represent Boolean functions?

Truth tables list all possible combinations of input values and the corresponding output values of the Boolean function, providing a complete representation of the function’s behavior.

What are binary decision diagrams (BDDs) used for?

Binary decision diagrams are used for efficiently representing and manipulating Boolean functions, especially for large and complex functions, by using a graph-based approach.



Previous Article
Next Article

Similar Reads

Number of Boolean functions
In the below article, we are going to find the number of Boolean Functions possible from the given sets of binary number. Statement-1: Suppose two sets are set 'A' = {1, 2, 3, 4, ........, n} where each number will be either '0' or '1' and hence the total number of boolean variable possible will be [Tex]2^n[/Tex] and set 'B' = {0, 1}. Now the numbe
2 min read
Prime Implicant chart for minimizing Cyclic Boolean functions
Prerequisite - K-Map (Karnaugh Map), Implicants in K-Map A functions is said to be a Cyclic Boolean Function if there is no Essential prime Implicant in its respective K-Map. Properties of Cyclic functions: Every prime Implicant is of same size.Every minterm is covered by at least two prime Implicants (which means no essential prime Implicants).Hav
3 min read
Minimization of Boolean Functions
As discussed in the "Representation of Boolean Functions" every boolean function can be expressed as a sum of minterms or a product of maxterms. Since the number of literals in such an expression is usually high, and the complexity of the digital logic gates that implement a Boolean function is directly related to the complexity of the algebraic ex
3 min read
Boolean Functions
Boolean Algebra was given by George Boole. It is a set of rules used to simplify a given logical expression without changing its functionality. It is mainly used when several variables present are less. The algebraic expression used in Boolean Algebra is known as Boolean Expression and it is used to describe Boolean Function. The Boolean expression
5 min read
Mathematics | Unimodal functions and Bimodal functions
Unimodal Function : A function f(x) is said to be unimodal function if for some value m it is monotonically increasing for x≤m and monotonically decreasing for x≥m. For function f(x), maximum value is f(m) and there is no other local maximum. See figure (A) and (B): In figure (A), graph has only one maximum point and rest of the graph goes do
2 min read
Composite functions - Relations and functions
Let f : A->B and g : B->C be two functions. Then the composition of f and g, denoted by g o f, is defined as the function g o f : A->C given by g o f (x) = g{f(x)}, ∀ x ∈ A. Clearly, dom(g o f) = dom(f). Also, g o f is defined only when range(f) is a subset of dom(g). Evaluating composite functions We know composite function is written as
5 min read
Total Recursive Functions and Partial Recursive Functions in Automata
Total Recursive Functions: A recursive function is called total recursive function if it is defined for its all arguments.Let f(a1, a2, ...an) be a function defined on function g(b1, b2, ...bn).Then f is a total function if every element of f is assigned to some unique element of function g. A total function is called recursive or primitive recursi
2 min read
Inverse functions and composition of functions
Inverse Functions - In mathematics a function, a, is said to be an inverse of another, b, if given the output of b a returns the input value given to b. Additionally, this must hold true for every element in the domain co-domain(range) of b. In other words, assuming x and y are constants, if b(x) = y and a(y) = x then the function a is said to be a
3 min read
Classes of Functions | Injective, Surjective and Bijective Functions
Classes of Functions: Functions are fundamental in mathematics and have wide-ranging applications in engineering, computer science, and various other fields. Understanding the different classes of functions—injective, surjective, and bijective—is essential for analyzing mathematical models and solving complex problems. This article explores these c
6 min read
Counting Boolean function with some variables
Prerequisite - Canonical and Standard Form In the below articles, we will see some varieties of problems with three variables. Statement-1: Counting the number of Boolean functions possible with two variables such that there are exactly two min terms. Explanation: As we already know that from two variables (a and b) four [Tex](2^2)[/Tex] numbers (0
5 min read
Boolean Ring in Discrete Mathematics
Discrete mathematics is one of the subfields of mathematics that deals with discrete and separate elements using algebra and arithmetic. It is considered to be one of the fundamental branches of computer science and includes the studies of combinatorics, graphs, and logic. One of those concepts is the Boolean ring which is used in different practic
7 min read
Basics of Boolean Algebra in Digital Electronics
In the time middle of the 19th century, mathematician George Boole introduced a new form of mathematical reasoning system which is widely known as Boolean Algebra. This is a special branch of mathematics in which all logic is based on only two representations True(1) and False,(0). In modern science, Boolean algebra has become a very integral part
7 min read
Boolean Algebraic Theorems
Boolean algebra is a fundamental area of mathematics that deals with variables and logical operations. It is essential in the field of computer science and digital circuit design. Boolean algebraic theorems are the theorems that are used to change the form of a boolean expression. Sometimes these theorems are used to minimize the terms of the expre
5 min read
Proof of De-Morgan's Laws in Boolean Algebra
De Morgan's Laws are fundamental principles in Boolean algebra and set theory, providing rules for transforming logical expressions. These laws are essential for simplifying and manipulating Boolean expressions, which have significant applications in digital circuit design, computer science, and engineering. This article provides a detailed proof o
7 min read
Absorption Law in Boolean Algebra
Boolean Algebra is a fundamental area of mathematics and computer science that deals with binary variables and logic operations. It forms the basis of the digital circuit design and is important for understanding how logical expressions are simplified and optimized. Among the various laws in the Boolean Algebra, the Absorption Law plays a significa
7 min read
Boolean Algebra
Boolean algebra is a type of algebra that is created by operating the binary system. In the year 1854, George Boole, an English mathematician, proposed this algebra. This is a variant of Aristotle's propositional logic that uses the symbols 0 and 1, or True and False. Boolean algebra is concerned with binary variables and logic operations. Boolean
14 min read
Properties of Boolean Algebra
The Boolean Algebra uses sets of rules for analyzing digital gates and circuits. In this article, we will be going through the Properties or Laws of the Boolean algebra. So first we will start our article by defining what are the properties of Boolean Algebra, and then we will go through what are Boolean Addition and Multiplication. Then we will go
6 min read
Axioms of Boolean Algebra
In this article, we are going to discuss Axioms of Boolean Algebra; these axioms/Theorems are important as these will be used in many different topics of Digital Electronics like Sequential Circuit Designing and Combinational Circuit Designing as well. These Axioms are the building blocks of Digital Electronics. So understand these axioms carefully
5 min read
Class 9 RD Sharma- Chapter 22 Tabular Representation of Statistical Data - Exercise 22.1 | Set 1
Question 1. What do you understand by the word “statistics” in: (i) singular form (ii) plural form? Solution: The word statistics can be used in multiple ways, both singularly and plurally. (i) In singular form, statistics can be used collectively as the science of collection, presentation, analysis, and interpretation of numerical data. (ii) In pl
8 min read
Class 9 RD Sharma- Chapter 22 Tabular Representation of Statistical Data - Exercise 22.1 | Set 2
Question 11. The number of runs scored by a cricket player in 25 innings is as follows: 26, 35, 94, 48, 82, 105, 53, 0, 39, 42, 71, 0, 64, 15, 34, 15, 34, 6, 71, 0, 64, 15, 34, 15, 34, 67, 0, 42, 124, 84, 54, 48, 139, 64, 47 (i) Rearrange these runs in ascending order. (ii) Determine the player, is the highest score. (iii) How many times did the pl
10 min read
Class 8 RD Sharma Solutions - Chapter 24 Data Handling II (Graphical Representation of Data as Histograms) - Exercise 24.1 | Set 1
Question 1. Given below is the frequency distribution of the heights of 50 students of a class:Class Interval 140 – 145145 – 150150 – 155155 – 160160 – 165Frequency81218105Draw a histogram representing the above data. Solution: To draw a histogram first construct x-axis and y-axis, where the x-axis represents class interval and the y-axis represent
3 min read
Class 8 RD Sharma Solutions - Chapter 24 Data Handling II (Graphical Representation of Data as Histograms) - Exercise 24.1 | Set 2
Chapter 24 Data Handling II (Graphical Representation of Data as Histograms) - Exercise 24.1 | Set 1Question 7. Draw a histogram to represent the following data:Monthly Salary (in Rs) No. of Teachers5600 – 570085700 – 5800 45800 – 5900 35900 – 600056000 – 610026100 – 620036200 – 630016300 – 6400 2 Solution: To draw a histogram first construct x-axi
5 min read
Class 9 RD Sharma Solutions - Chapter 22 Tabular Representation of Statistical Data - Exercise 22.2
Question 1. Define cumulative frequency distribution. Solution: The structure showing the distribution of cumulative frequencies over various classes is known as cumulative frequency distribution. Question 2. Explain the difference between a frequency distribution and a cumulative frequency distribution. Solution: The method representing raw data w
6 min read
Class 9 RD Sharma Solutions - Chapter 23 Graphical Representation of Statistical Data - Exercise 23.2 | Set 1
Question 1. Explain the reading and interpretation of bar graphs. Solution: A bar graph comprises a sequence of vertical or horizontal bar lines, also known as rectangles which may be either horizontal or vertical in nature. It is used to simulate the collection of the information over a period of time. Also, it concludes various observations over
4 min read
Class 9 RD Sharma Solutions - Chapter 23 Graphical Representation of Statistical Data - Exercise 23.2 | Set 2
Question 11. The following data gives the amount of manure (in a thousand tonnes) manufactured by a company during some years:Year199219931994199519961997 Manure (in thousand tonnes) 153545304020 (i) Represent the above data with the help of a bar graph. (ii) Indicate with the help of the bar graph the year in which the amount of manure manufacture
3 min read
Class 9 RD Sharma Solutions - Chapter 23 Graphical Representation of Statistical Data - Exercise 23.1 | Set 2
Question 11. Read the following bar graph and answer the following questions: (i) What information is given by the bar graph?(ii) What was the production of cement in the year 1980-81?(iii) What is the minimum and maximum productions of cement and corresponding years? Solution: (i) The bar graph depicts the industrial production of cement in differ
6 min read
Class 8 RD Sharma Solutions - Chapter 25 Data Handling III (Pictorial Representation Of Data As Pie Charts Or Circle Graphs) - Exercise 25.1 | Set 1
Question 1. The number of hours, spent by a school boy on different activities in a working day, is given below:Activity Sleep School Home Play Other Total Number of Hours 8742324Present the information in the form of a pie-chart. Solution: Given that, total number of hours = 24 Therefore, Central angle = (component value / 24) × 360° Now the centr
10 min read
Introduction to Intermediate Representation(IR)
Intermediate Representation(IR), as the name suggests, is any representation of a program between the source and target languages. The intermediate form of the program that is being compiled is the central data structure in a compiler. A compiler may have a single IR or a series of IRs. The decisions that are made during the design of IR affect the
3 min read
Introduction of Floating Point Representation
1. To convert the floating point into decimal, we have 3 elements in a 32-bit floating point representation: i) Sign ii) Exponent iii) Mantissa Sign bit is the first bit of the binary representation. '1' implies negative number and '0' implies positive number. Example: 11000001110100000000000000000000 This is negative number.Exponent is decided by
4 min read
What are the different ways of Data Representation?
The process of collecting the data and analyzing that data in large quantity is known as statistics. It is a branch of mathematics trading with the collection, analysis, interpretation, and presentation of numeral facts and figures. It is a numerical statement that helps us to collect and analyze the data in large quantity the statistics are based
7 min read