What are Maxterms?
Opposite to a minterm, a maxterm corresponds to a specific input combination that, when fed into an OR gate, produces an output of 0. Because an OR gate only outputs a low signal when all its inputs are 0, any input that is originally 1 must be inverted to ensure the gate produces a 0 for that particular combination. For instance, consider two inputs, A and B. If both are 1, then each must be complemented—A becomes A′ and B becomes B′—before being passed to the OR gate. This guarantees a high output, and the resulting maxterm for that input combination is A′+B′.
Each Maxterm is Unique!
Maxterms are special because they produce a 0 only for the specific input combination they are built against, and 1 for all others. For example, the maxterm for input 11 is A′+B′. When A and B take on other values like 00, 01, and 10, the inputs to A′+B′ become 1+1, 1+0, and 0+1 respectively. Consequently, the OR gate receives at least one 1 in each case, resulting in an output of 1. Therefore, each maxterm acts as a precise filter, activating only for its designated input combination.
Logical Output Representations: Truth Tables, Expressions, and Circuits
So far, we’ve explored various ways to represent a logical output or function—namely, Boolean expressions, logic circuits, and truth tables. These forms are fully inter-convertible. Previously, we examined how to switch between mathematical and logical representations through examples in the section titled How to Master Solving Logic Gates Based Simple Problems. Additionally, we covered truth tables in How to Represent a Logical Output Function.
Now, we’ll focus on converting a logical output given in the form of a truth table into a Boolean (mathematical) expression and a circuit diagram using minterms. Along the way, we’ll introduce the concept of canonical form and demonstrate how to convert a circuit diagram representing it into its corresponding mathematical expression.
Although this page emphasizes the use of maxterms, we’ll also briefly introduce minterms and explain their role in the inter-conversion process. For a deeper dive into minterm-based problems, refer to the dedicated article on minterms.
What are Minterms?
A minterm corresponds to a specific input combination that, when fed into an AND gate, produces an output of 1. Because an AND gate only outputs a high signal when all its inputs are 1, any input that is originally 0 must be inverted to ensure the gate produces a 1 for that particular combination. For instance, consider two inputs, A and B. If both are 0, then each must be complemented—A becomes A′ and B becomes B′—before being passed to the AND gate. This guarantees a high output, and the resulting minterm for that input combination is A′B′.
Each Minterm is Unique!
Minterms are special because they produce a 1 only for the specific input combination they are built against, and 0 for all others. For example, the minterm for input 00 is A′B′. When A and B take on other values like 01, 10, or 11, the inputs to A′B′ become 10, 01, and 00 respectively. Consequently, the AND gate receives at least one 0 in each case, resulting in an output of 0. Therefore, each minterm acts as a precise filter, activating only for its designated input combination.
Building an Output Function Using Maxterms
To clarify the concept of maxterms, let’s consider a simple example using a truth table with two inputs, A and B, and one output, Z. Since there are two inputs, the total number of possible input combinations is \(\mathsf{2^n=2^2=4}\), which are: 00, 01, 10, and 11.
Suppose the output Z is 1 when the inputs are 00 or 01, and 0 for the remaining combinations (10 and 11). This behavior is illustrated in the figure below.
Before writing a Boolean expression for this function, it’s important to interpret what the truth table conveys. Essentially, it specifies that the output should be 0 when the inputs are either 10 or 11, and 1 otherwise. We can achieve this by using the maxterms corresponding to the input combinations that produce a low output.
- For input 10, the minterm is \(\mathsf{A’+B}\).
- For input 11, the minterm is \(\mathsf{A’+B’}\).
Therefore, the final Boolean expression for Z is: \(\mathsf{Z=\left(A’+B\right)\left(A’+B’\right)}\). This expression ensures that Z is high only for the specified input combinations, perfectly aligning with the truth table.
Notation Used for Representing Maxterms
Now that we understand each maxterm corresponds to a single input combination, we can see that a 2-input system yields four minterms, since the inputs can be arranged in four unique ways: 00, 01, 10, and 11. These combinations represent decimal values from 0 to 3. Therefore, we denote the maxterms using an uppercase \(\mathsf{M}\) followed by the decimal equivalent—\(\mathsf{M_0,M_1,M_2}\), and \(\mathsf{M_3}\). Figures illustrate the maxterms for both 2-input and 3-input systems.
Truth Table to Canonical/Standard/Product of Sums/Boolean/Mathematical Form
When a function is presented as a truth table, we can easily convert it into its Boolean form by selecting the maxterms corresponding to input combinations where the output is 0. Then, we connect these maxterms using an AND gate, ensuring the output is 0 for any of those combinations. As a result, the Boolean expression formed from maxterms always follows the Product of Sums structure. Each maxterm represents a sum, while the AND operation between them signifies the product. This format is known as the canonical or standard representation of a Boolean expression. Since the final expression is a product of selected maxterms, we can also write it using the product symbol. Lastly, if the output is consistently 1 or 0 for all input combinations, we simply represent the function as 1 or 0 without listing any maxterms.
Example 1: Truth Table to Mathematical Form and Logic Diagram
Let’s consider a 3-input truth table with inputs A, B, and C, and an output function Z. Using this table, we can convert the output into its Boolean expression by identifying all input combinations where Z = 0. For each of these combinations, we write the corresponding maxterm—each one being a sum of the input variables (either in true or complemented form). We then connect all these maxterms using AND operations, forming a Product of Sums expression.
Next, we translate this Boolean expression into a circuit diagram. Each maxterm becomes an OR gate combining the appropriate input signals, and all these OR gates feed into a single AND gate. This ensures the output Z is low whenever any of the selected input combinations occur. As you’ll notice, both the Boolean expression and the circuit diagram reflect the same logical structure: a canonical Product of Sums form.
Solution: Truth Table to Mathematical Representation
From the truth table, we identify the input combinations where the output signal Z equals 0. Each of these combinations corresponds to a unique maxterm, represented by the decimal equivalent of the input pattern. We extract these specific maxterms and connect them using AND operations, forming a Boolean expression in the standard (canonical) Product of Sums format. In this structure, every maxterm acts as a sum term, and the AND between them represents the product. This approach ensures the output is expressed clearly—whether in Boolean logic or mathematical notation—as a product of selected maxterms.
\[
\begin{aligned}
\mathsf{Z\left(A,B,C\right)\,}&\mathsf{=M_0+M_2+M_3+M_7}\\
\mathsf{Z\left(A,B,C\right)\,}&\mathsf{=\left(A+B+C\right)\left(A+B’+C\right)\left(A+B’+C’\right)\left(A’+B’+C’\right)}\\
\mathsf{Z\left(A,B,C\right)\,}&\mathsf{=\prod{\left(0,2,3,7\right)}}
\end{aligned}
\]
or simply
\[
\begin{aligned}
\mathsf{Z\,}&\mathsf{=M_0+M_2+M_3+M_7}\\
\mathsf{Z\,}&\mathsf{=\left(A+B+C\right)\left(A+B’+C\right)\left(A+B’+C’\right)\left(A’+B’+C’\right)}\\
\mathsf{Z\,}&\mathsf{=\prod{\left(0,2,3,7\right)}}
\end{aligned}
\]
\(\mathsf{Z\left(A,B,C\right)}\) simply mentions that \(\mathsf{Z}\) is a function of 3 input variables, \(\mathsf{A,B}\), and \(\mathsf{C}\). It is typically omitted as generally that information is known, or explicitly mentioned if the number/name of inputs is not mentioned elsewhere.
A Side Quest
Although it’s not directly related to this problem, consider this: if \(\mathsf{Z=M_0+M_1}\), would the output remain the same whether it’s defined as \(\mathsf{Z\left(A,B\right)=M_0+M_1}\) or \(\mathsf{Z\left(A,B,C\right)=M_0+M_1}\)? Could you produce the truth table or the logic diagram for each case? You may find a hint to the solution here.
Solution: Truth Table to Logic Diagram
Just like in the mathematical representation, the maxterms that appear in the output are implemented as inputs to individual OR gates. Each OR gate corresponds to one maxterm, combining the appropriate input variables in either true or complemented form. When multiple maxterms are involved, the outputs of these OR gates are then fed into a single AND gate. This AND gate produces the final output, forming the standard or canonical logic diagram in Product of Sums format. The structure mirrors the Boolean expression exactly, ensuring clarity and consistency between symbolic and circuit-level representations.
Example 2: Mathematical Form to Logic Diagram and Truth Table
Let’s explore another example, beginning with a Boolean expression and then translating it into its corresponding logic circuit and truth table. The mathematical form is:
\[\mathsf{Z\left(A,B\right)=\prod{\left(1,2\right)}}\]
Solution: Mathematical Form to Logic Diagram
The maxterms appear as 1 and 2. Next, the mathematical expression indicates that Z depends on two variables, A and B. Therefore, two OR gates correspond to the two maxterms, with each gate receiving two inputs since Z is a function of A and B only. Then, the outputs from these OR gates feed into a single AND gate. After that, the AND gate produces the final output Z. The two maxterms—1 and 2—convert to binary input combinations 01 and 10. Consequently, the input signals to the two OR gates are A+B′ and A′+B, respectively. Finally, the output diagram is shown here.
Solution: Mathematical Form to Truth Table
Generating a truth table from a Boolean expression is fairly straightforward. First, we identify the maxterms included in the expression. Then, in the truth table, we place a 0 in the output column for each input combination that matches those maxterms, and 1 for all others. In this case, the function has two inputs, so there are four possible input combinations. Since maxterms 1 and 2 are part of the expression, we assign a 0 to the output Z for input combinations 01 and 10, and 1 elsewhere.
Now, did you notice the familiar truth table? It is the truth table of an XNOR gate. This means that an XNOR gate function can be represented in the form of AND and OR gates.
Example 3: Circuit Diagram to Truth Table and Mathematical Form
Let’s explore another example, beginning with a logic-circuit diagram and then translating it into its corresponding truth table and Boolean expression. The schematic is:
Solution: Circuit Diagram to Truth Table
We observe that the circuit uses two OR gates, which means two maxterms contribute to the output Z. Each OR gate has two inputs, implying the system is based on two variables—yielding four possible input combinations in total. The first OR gate receives A and B as inputs, indicating both original inputs were 0, corresponding to the combination 00. The second OR gate takes A’ and B’, meaning both inputs were originally 1, corresponding to 11. Therefore, the maxterms represented by these gate configurations are \(\mathsf{M_0}\) and \(\mathsf{M_3}\).
Now, did you again notice the familiar truth table? It is the truth table of an XOR gate. This means that an XOR gate function can be represented in the form of AND and OR gates.
Solution: Circuit Diagram to Mathematical Form
Once the minterms have been identified, it is pretty simple to write the function mathematically as it only requires to sum the corresponding minterms.
\[
\begin{aligned}
\mathsf{Z\left(A,B\right)\,}&\mathsf{=M_0\cdot{}M_3}\\
\mathsf{Z\left(A,B\right)\,}&\mathsf{=\left(A+B\right)\left(A’+B’\right)}\\
\mathsf{Z\left(A,B\right)\,}&\mathsf{=\prod{\left(0,3\right)}}
\end{aligned}
\]
or simply
\[
\begin{aligned}
\mathsf{Z\,}&\mathsf{=M_0\cdot{}M_3}\\
\mathsf{Z\,}&\mathsf{=\left(A+B\right)\left(A’+B’\right)}\\
\mathsf{Z\,}&\mathsf{=\prod{\left(0,3\right)}}
\end{aligned}
\]
Representation of Complement of a Function
The complement of a function is simply its logical opposite, or the result of passing the function through a NOT gate. In a truth table, this means inverting all the output values—changing every 1 to 0 and every 0 to 1. When the function is expressed using maxterms, its complement is formed by listing all the remaining maxterms that were not part of the original function. These unused maxterms are then combined in a Product of Sums format, either as a Boolean expression or as a circuit diagram. This approach ensures the complement accurately reflects the inverse behavior of the original function.
Example: Finding the Complement of a Function in Terms of Maxterms
Let’s now try to find the complement of functions, \(\mathsf{Z_1}\) and \(\mathsf{Z_2}\), when :
\[\mathsf{Z_1\left(A,B\right)=\prod{\left(1,2\right)}}\]
and
\[\mathsf{Z_2\left(A,B,C\right)=\prod{\left(1,2\right)}}\]
Solution:
The maxterms for both functions, \(\mathsf{Z_1}\) and \(\mathsf{Z_2}\), are 1 and 2. However, \(\mathsf{Z_1}\)is just a function of two inputs \(\mathsf{A}\) and \(\mathsf{B}\), while \(\mathsf{Z_2}\) is a function of three inputs, \(\mathsf{A}\), \(\mathsf{B}\) and \(\mathsf{C}\).
\[\mathsf{\overline{Z_1}}\textsf{ or }\mathsf{\overline{Z_1\left(A,B\right)}=\prod{\left(0,3\right)}}\]
and
\[\mathsf{\overline{Z_2}}\textsf{ or }\mathsf{\overline{Z_2\left(A,B,C\right)}=\prod{\left(0,3,4,5,6,7\right)}}\]