UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 13.3 Free with a free account
Boolean Expressions and Logical Operators
Discrete Mathematics · Chapter 13: Boolean Algebra and Logic CircuitsSection 13.3 · lesson 83 of 879 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Discrete Mathematics.
Lesson complete
Earn the 4 college credits for Discrete Mathematics
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Karnaugh Maps →← Boolean Algebra: Laws and PropertiesNext lesson: Karnaugh Maps →
In this lesson
Write down what a circuit should do, then say it with fewer parts.
- Translate a description into a Boolean expression
- Simplify one named law at a time
- Build canonical sum-of-products and product-of-sums forms
- Reduce the majority function algebraically
Transcript
Everything said in the video, section by section (1,335 words). Read along, or search it.
Boolean Algebra and Logic Circuits
Boolean Expressions and Logical Operators
This section is about writing down what a circuit should do, and then saying it with fewer parts. We'll translate descriptions into Boolean expressions, simplify them one named law at a time, and build two standard forms straight from a truth table. Every simplification here uses algebra alone. A visual shortcut comes in section thirteen point four.
The Opening Problem
Let Two Out of Three Decide
Spacecraft and other safety-critical systems often run the same computation on three independent processors. A voting circuit then decides the output. If at least two of the three agree, that agreement becomes the system's answer. So a single processor glitch can never corrupt the result. This design is called triple modular redundancy. The voting circuit at its center is a Boolean function of three inputs. Writing that function down, and writing it as compactly as possible, are two separate skills. Both matter, because every extra logic gate in the final circuit costs real silicon, power and delay.
13.3.1
From Words to an Expression
First, the notation. Writing A B side by side, or with a dot, means A AND B. A plus sign means OR. And a trailing prime, A prime, means NOT A. Translating a description means finding the connective behind each piece of it, in the order the description combines them. Here's a secure door. It unlocks when a valid keycard is presented, together with either manager approval or the correct PIN. But only when the facility isn't in lockdown. Let A be the keycard, B manager approval, C the correct PIN, and D lockdown. Either manager approval or the correct PIN is an OR: B plus C. A valid keycard together with that is an AND: A times the quantity B plus C. And only when the facility is not in lockdown brings in the complement, D prime, ANDed with everything before it. So Y equals A, times B plus C, times D prime.
A Recurring Pattern
Unless, Only When, Provided That
The phrase only when is worth flagging. It's easy to misread as needing a separate clause. But it just restricts an expression that's already built, by ANDing in a condition, possibly complemented. Here's a shorter case. A smoke alarm sounds when smoke is detected, unless the alarm is in test mode. With S for smoke detected and T for test mode, unless becomes AND with a complement. Y equals S T prime. Whether the restriction says only when, unless, or provided that, the translation is the same pattern.
13.3.2
A Full Simplification, Step by Step
Simplifying works like simplifying an algebraic fraction. Apply one named law at a time, never skipping a step, until nothing shortens the expression further. Simplify A B, plus A times B plus C, plus B times B plus C. First, the distributive law expands both products, giving A B plus A B plus A C plus B B plus B C. The idempotent law says B B is just B. And again, the two copies of A B collapse to one. Now absorption. B plus B C is just B. That leaves A B plus A C plus B. And absorption once more. A B plus B is just B. So the whole expression equals B plus A C. Three terms and five literals became two terms and three literals, with every step justified by a single law.
13.3.3
Sum-of-Products and Product-of-Sums
Two standard shapes for expressions are worth naming. A literal is a variable or its complement, like A or A prime. A sum-of-products expression is an OR of product terms, where each product term is an AND of literals. A product-of-sums expression is an AND of sum terms, where each sum term is an OR of literals. The words sum and product name the outermost operation, not what the literals are doing. So A times the quantity B plus C, plus D, is neither. A sum is nested inside what would need to be a pure product term.
Table 1
The Majority Function
A truth table pins down one specific sum-of-products for any function, called its canonical form. Take the majority function M of A, B and C, the triple redundancy vote. It's one exactly when at least two of the three inputs are one. Each row where M is one contributes a minterm. That's an AND of all three variables, each uncomplemented if it's one in that row, and complemented if it's zero. The four one-rows give A prime B C, A B prime C, A B C prime, and A B C. OR them together, and that's the canonical sum-of-products. Each minterm is one on exactly one row, so the OR is one on exactly the four rows where M is one.
Worked Example
Reducing the Canonical SOP
The canonical form is correct, but it isn't minimal. The laws of section thirteen point two reduce it directly. Here's the trick. By the idempotent law, A B C equals three copies of itself. So use one copy to pair with each of the other three terms. Then factor each pair with the distributive law. A prime B C plus A B C becomes A prime plus A, times B C. The same happens for the other two pairs. By the complement law, each factor like A prime plus A collapses to one. And by the identity law, multiplying by one changes nothing. So M equals A B plus A C plus B C. Four three-literal terms reduced to three two-literal terms. And it reads exactly as any two of the three agree, which is what a majority vote means.
Figure 1
Same Function, Smaller Tree
Here are both versions as expression trees. On the left, the canonical form. An OR gate combines four AND gates, each taking three literals. That's twelve leaves. On the right, the simplified form. An OR combines three AND gates, each taking just two literals. That's six leaves. Both trees compute the identical function. But the right one uses one fewer AND gate, and half the inputs.
13.3.4
Product-of-Sums, the Dual Way
The canonical product-of-sums is built the dual way. There's one maxterm for each row where the output is zero. In a maxterm, each variable is written uncomplemented if it's zero in that row, and complemented if it's one. The literals are ORed inside each term, and the terms are ANDed together. The majority function's four zero-rows give four maxterms. By the dual of the previous argument, pairing terms that share two variables, this simplifies to A plus B, times A plus C, times B plus C. And this isn't a separate recipe. M prime is one exactly on the rows where M is zero, so it has its own canonical sum-of-products. Complement both sides and apply De Morgan's law twice, once to the outer OR and once to each inner AND. Out comes exactly this product-of-sums.
Table 2
SOP Versus POS
Here are the two forms side by side. A sum-of-products is an OR of terms, each an AND of literals, built from one minterm per one-row. A product-of-sums is an AND of terms, each an OR of literals, built from one maxterm per zero-row. So which to start from depends on which set of rows is smaller. With only one or two one-rows, a sum-of-products is quicker. With only one or two zero-rows, a product-of-sums is. The majority function has four of each, so neither has an advantage. And once written, both simplify by exactly the same laws, with the roles of plus and times mirrored.
Takeaways
Translate, Then Shrink
To summarize. Writing an expression means matching each part of a description to AND, OR, or an unless-style complement, in the order the description combines them. Simplification applies one named law at a time, and never skips a justification. A sum-of-products is an OR of AND terms, and a product-of-sums is an AND of OR terms. The canonical forms are unique for a function, but rarely minimal. Karnaugh maps, in section thirteen point four, give a visual shortcut to the same minimal answers. Here's something to think about. A function's canonical form is unique, but you can simplify it in more than one order. Could a Boolean function then have more than one equally simplified expression? And what would have to be true of two different-looking expressions, for both to count as equally simple?
About Discrete Mathematics at UPI Study
Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take Discrete Mathematics with UPI Study
Where the credit goes
Universities that work with NCCRS
Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Boolean Expressions and Logical Operators
How do you translate "unless" or "only when" into a Boolean expression?
How do you simplify a Boolean expression one law at a time?
How do you write the canonical sum-of-products and product-of-sums from a truth table?
How do you reduce the majority function algebraically?
About the Discrete Mathematics course
How many college credits is Discrete Mathematics?
How much does Discrete Mathematics cost and what is included?
Which universities accept UPI Study credits?
How long does Discrete Mathematics take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 4 credits in Discrete Mathematics.
87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
4 credits · NCCRSEnroll →