Boolean Expressions and Logic Circuits
Boolean expressions provide a mathematical way to represent logical operations using the binary values 0 and 1. They use logical operators such as AND, OR, and NOT to describe how inputs are combined to produce an output.
A Boolean expression can be represented as a logic circuit using logic gates. It can also be represented using a truth table, which shows the output for every possible combination of input values.
This topic is useful for understanding how digital systems represent and process logical decisions.
Key Idea: Boolean expressions, logic circuits, and truth tables can represent the same logical operation in different forms.
What Is a Boolean Expression?
A Boolean expression is an expression that uses logical operators and binary values to represent a logical operation.
The main Boolean operations shown in this note are:
- AND
- OR
- NOT
Boolean expressions use variables such as A, B, and C to represent binary inputs. The output is commonly represented by Q.
For example:
Q = A · B + CThis expression contains an AND operation followed by an OR operation.
The · symbol represents AND, while + represents OR.
Basic Boolean Operations
AND Operation
The AND operation gives an output of 1 only when both inputs are 1.
Q = A · B| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
A two-input AND operation can therefore be remembered as:
AND → both inputs must be 1.
OR Operation
The OR operation gives an output of 1 when at least one input is 1.
Q = A + B| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
A two-input OR operation can therefore be remembered as:
OR → at least one input must be 1.
NOT Operation
The NOT operation gives the opposite or complement of its input.
Q = A̅Therefore:
A = 0 → Q = 1
A = 1 → Q = 0| A | Q |
|---|---|
| 0 | 1 |
| 1 | 0 |
The NOT operation can therefore be remembered as:
NOT → opposite value.
Boolean Expression → Logic Circuit
A Boolean expression can be converted into a logic circuit by identifying each operation and connecting the corresponding gates in the correct order.
Steps
- Read the Boolean expression.
- Identify the operations used in the expression.
- Select the corresponding logic gates.
- Connect the gates according to the order of the operations.
- Label intermediate outputs where necessary.
- Identify the final output.
Consider:
Q = A · B + CThe expression contains:
A · B→ AND operation(A · B) + C→ OR operation
Therefore:
A, B
↓
AND
↓
A · B
↘
OR → Q
↗
CThe AND gate first produces A · B. That result and C are then given to the OR gate.
The required circuit uses:
- An AND gate for
A · B. - An OR gate to combine
A · BwithC.
So the final output is:
Q = (A · B) + CKey Idea: When converting a Boolean expression into a circuit, identify each Boolean operation and replace it with the corresponding logic gate.
Logic Circuit → Boolean Expression
A logic circuit can also be converted back into a Boolean expression.
The safest method is to work through the circuit step by step, starting from the input side and identifying intermediate outputs.
Steps
- Look at the circuit.
- Identify the first gate connected to the inputs.
- Write the expression produced by that gate.
- Give the intermediate result a temporary name if necessary.
- Continue through the next gate.
- Write the final Boolean expression.
Suppose inputs A and B first enter an OR gate. Its output is labelled X.
X = A + BThe output X is then combined with input C using an AND gate.
Therefore:
Q = X · CSubstitute X = A + B:
Q = (A + B) · CSo the complete Boolean expression is:
Q = (A + B) · CThe brackets show that A + B is calculated first.
Boolean Expression → Truth Table
A Boolean expression can be used to create a truth table.
A truth table lists all possible input combinations and calculates the output for each combination.
Number of Possible Combinations
If there are n binary inputs, the number of possible input combinations is:
2ⁿFor example, with three inputs:
2³ = 8Therefore, a Boolean expression containing three inputs has 8 possible input combinations.
Steps
- Identify the number of inputs.
- Calculate the number of possible combinations using
2ⁿ. - Write all possible input combinations.
- Calculate any intermediate operations.
- Calculate the final output for every row.
There are three inputs: A, B, and C.
Therefore:
2³ = 8possible combinations exist.
The truth table is:
| A | B | C | A · B | Q = A · B + C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
The A · B column is an intermediate result. It is calculated before the OR operation with C.
For example:
A = 1, B = 1, C = 0
A · B = 1 · 1 = 1
Q = 1 + 0
Q = 1Truth Table → Logic Circuit
A truth table can be used to determine what type of logic operation is required and then design a corresponding logic circuit.
The important step is to examine the conditions under which the output becomes 1.
Steps
- Study the truth table.
- Identify the input combinations that produce the required output.
- Determine the logical condition represented by those combinations.
- Select the required logic gate or combination of gates.
- Draw the circuit.
Consider this truth table:
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The output is 1 whenever at least one input is 1.
That is the behaviour of an OR gate.
Therefore:
Q = A + Band the required circuit is an OR gate with A and B as its inputs.
Key Idea: When converting a truth table into a circuit, focus on the input conditions that produce the required output.
Relationship Between the Three Representations
The same logical operation can be represented in three different forms:
Boolean Expression
↕
Logic Circuit
↕
Truth TableFor example:
Boolean expression
Q = A + BLogic circuit
An OR gate with inputs A and B.
Truth table
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
All three representations describe the same logical behaviour.
Why Intermediate Outputs Are Useful
When a circuit contains several gates, it can become difficult to write the complete Boolean expression immediately.
A temporary variable such as X can make the process easier.
For example:
A, B
↓
OR
↓
X
X, C
↓
AND
↓
QFirst:
X = A + BThen:
Q = X · CFinally, substitute X:
Q = (A + B) · CThis step-by-step method reduces mistakes when analysing larger circuits.
Common Exam Mistakes
Confusing AND and OR
Remember:
- AND → output
1only when all inputs are1. - OR → output
1when at least one input is1.
Forgetting the NOT operation
A NOT operation reverses the binary value:
0 → 1
1 → 0Missing the order of operations
For:
Q = A · B + Cfirst calculate:
A · Band then perform the OR operation with C.
Forgetting all input combinations
For n binary inputs, always remember:
Number of combinations = 2ⁿFor three inputs:
2³ = 8so the truth table must contain eight input combinations.
Exam-Focused Points
Key Idea: AND, OR, and NOT are the basic Boolean operations used to represent logic.
Key Idea: A Boolean expression can be converted into a logic circuit by replacing operations with their corresponding gates.
Key Idea: For n binary inputs, a truth table contains 2ⁿ possible input combinations.
Quick Revision
- AND:
Q = A · B - OR:
Q = A + B - NOT:
Q = A̅ - Boolean expressions use binary values 0 and 1.
- A logic circuit represents a Boolean expression using logic gates.
- A truth table shows all possible input combinations and their outputs.
- Use intermediate outputs when analysing circuits with multiple gates.
- For
ninputs, the number of possible combinations is 2ⁿ. - When converting a truth table to a circuit, identify the input conditions that produce the required output.
Summary
Boolean expressions, logic circuits, and truth tables are three ways of representing logical operations in digital systems.
Boolean expressions describe the logic mathematically using operations such as AND, OR, and NOT. Logic circuits represent those operations using gates, while truth tables show the output for every possible combination of binary inputs.
Students should be able to move between these representations:
Boolean Expression → Logic Circuit
Logic Circuit → Boolean Expression
Boolean Expression → Truth Table
Truth Table → Logic CircuitUnderstanding these conversions makes it easier to analyse and design digital logic circuits and answer examination questions involving Boolean expressions, logic gates, and truth tables.