Boolean Algebra and Logic Circuits
Boolean algebra is a branch of algebra that deals with binary variables and logic operations. The variables in Boolean algebra are typically designated by letters such as A, B, x, and y. The three fundamental logic operations in Boolean algebra are AND, OR, and complement (NOT). A Boolean function can be expressed algebraically using binary variables, logic operation symbols, parentheses, and the equal sign. For a given set of variable values, the Boolean function evaluates to either 1 (true) or 0 (false).
Truth Table Generator
Properties of Boolean Algebra
Commutative Property
P1a.
P1b.
Note that the values for both OR and AND are the same for the second and third lines of the truth table. This is known as the commutative property. It seems obvious because it holds for addition and multiplication, which use the same notation. However, it needs to be stated explicitly, because it is not true for all operators in all algebras. (For example, in ordinary algebra. There is no subtraction operation in switching algebra.)
Associative Property
P2a.
P2b.
This property, known as the associative law, states that the order in which one does the OR or AND operation doesn’t matter, and thus we can write just and (without the parentheses). It also enables us to talk of the OR or AND of several things. We can thus extend the definition of OR to:
is 1 if any of the operands () is 1 and is 0 only if all are 0.
and the definition of AND extends to:
is 1 if all of the operands are 1 and is 0 if any is 0.
Identity Property
P3a.
P3b.
Properties 3a and 3b follow directly from the first and third lines of the truth tables.
Null Property
P4a.
P4b.
Properties 4a and 4b follow from the second and fourth lines of the truth tables.
Complement Property
P5a.
P5b.
Property 5 follows from the definition of the NOT operation, which states that either or is always 1, and the other is always 0. Thus, must be either or , both of which are 0. Similarly, must be either or , both of which are 1.
Combined Properties
Combining the commutative property (P1a) with the above properties, we also have:
P3aa.
P3bb.
P4aa.
P4bb.
P5aa.
P5bb.
Often, as we manipulate expressions, we will use one of these versions, rather than first interchanging the terms using the commutative law (P1).
Idempotency Property
P6a.
P6b.
By repeated application of Property 6a, we can see that:
Involution Property
P7.
If , then . However, when that is complemented again, that is, . Similarly, if , and . Because there are no ANDs, ORs, 0’s, or 1’s, the dual is the same property.
Distributive Property
P8a.
P8b.
P8a looks very familiar; we commonly use it with addition and multiplication. In right-to-left order, it is referred to as factoring. On the other hand, P8b is not a property of regular algebra. The simplest way to prove these properties of switching algebra is to produce a truth table for both sides of the equality and show that they are equal.
Example Boolean Function
Consider the Boolean function:
Truth Table
To understand how this function behaves, we can construct a truth table. A truth table lists all possible combinations of input variables and the corresponding output of the Boolean function. For three variables (x, y, and z), there are possible combinations.
x | y | z | y' | y'z | x + y'z | F |
---|---|---|---|---|---|---|
0 | 0 | 0 | 1 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | 1 | 1 |
0 | 1 | 0 | 0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 0 | 1 | 1 |
1 | 0 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 0 | 0 | 0 | 1 | 1 |
1 | 1 | 1 | 0 | 0 | 1 | 1 |
From the truth table, we see that the function is equal to 1 if is 1 or if both and are 1. Therefore, is equal to 0 in all other cases.
Logic Diagram
A Boolean function can also be represented as a logic diagram composed of AND, OR, and NOT gates. The logic diagram for the function is shown below:
- An inverter (NOT gate) is used to generate from the input .
- An AND gate is used to generate the term .
- An OR gate combines the term and to produce the final output .
Purpose of Boolean Algebra
Boolean algebra simplifies the analysis and design of digital circuits. It provides tools to:
- Express the relationship between binary variables and outputs in algebraic form.
- Derive the input-output relationships from logic diagrams.
- Simplify Boolean expressions to create more efficient digital circuits.
Simplification Using Boolean Algebra
A Boolean function can be expressed in various algebraic forms. By applying Boolean algebra rules, we can simplify these expressions to reduce the number of gates required in a circuit.
Basic Identities of Boolean Algebra
Table 1-1 lists the fundamental identities of Boolean algebra. Each identity can be proven using truth tables.
Identity No. | Expression | Description |
---|---|---|
1 | OR with 0 leaves the variable unchanged. | |
2 | AND with 0 results in 0. | |
3 | OR with 1 results in 1. | |
4 | AND with 1 leaves the variable unchanged. | |
5 | A variable ORed with itself is unchanged. | |
6 | A variable ANDed with itself is unchanged. | |
7 | A variable ORed with its complement is 1. | |
8 | A variable ANDed with its complement is 0. | |
9 | OR operation is commutative. | |
10 | AND operation is commutative. | |
11 | OR operation is associative. | |
12 | AND operation is associative. | |
13 | Distributive property of AND over OR. | |
14 | Distributive property of OR over AND. | |
15 | DeMorgan's Theorem. | |
16 | DeMorgan's Theorem. | |
17 | Double negation results in the original variable. |
Example Simplification
Consider the following Boolean expression:
By letting , the expression becomes . Using identity 5 from Table 1-1, . Thus, the expression simplifies to:
DeMorgan's Theorems
DeMorgan's Theorems are crucial for simplifying expressions involving NOR and NAND gates. They state:
Proof of the First Theorem
-
Expression of the original theorem:
-
Apply the definition of the complement (NOT operation):
-
Using the definition of OR operation:
-
Expressing in terms of AND operation:
-
Using the complement (NOT) of each variable:
-
Combining these results:
Proof of the Second Theorem
-
Expression of the original theorem:
-
Apply the definition of the complement (NOT operation):
-
Using the definition of AND operation:
-
Expressing in terms of OR operation:
-
Using the complement (NOT) of each variable:
-
Combining these results:
Verification with Truth Tables
To verify these theorems, we can use truth tables:
First Theorem:
0 | 0 | 0 | 1 | 1 | 1 | 1 |
0 | 1 | 1 | 0 | 1 | 0 | 0 |
1 | 0 | 1 | 0 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 0 | 0 | 0 |
Second Theorem:
0 | 0 | 0 | 1 | 1 | 1 | 1 |
0 | 1 | 0 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 0 | 1 | 1 |
1 | 1 | 1 | 0 | 0 | 0 | 0 |
From the truth tables, we can see that and hold true for all possible values of and , verifying DeMorgan's Theorems.
These theorems allow the transformation of NOR and NAND gates into equivalent AND-OR gates and vice versa.
Example: Logic Diagram Simplification
Consider the logic diagram with the output expression:
Using Boolean algebra, we can simplify this expression:
The simplified logic diagram requires fewer gates, making the circuit more efficient.
Complement of a Function
The complement of a Boolean function is derived by interchanging 1s and 0s in the truth table or by applying DeMorgan's theorem to the algebraic expression. For instance, the complement of is:
This is achieved by changing ANDs to ORs, ORs to ANDs, and complementing each variable.
Boolean algebra, therefore, provides a systematic approach to design and optimize digital circuits, ensuring efficient and effective implementation.