Boolean Algebra and Combinational Logic Notes
Boolean Algebra and Combinational Logic
Overview
- This lectorial focuses on Boolean algebra and its application in designing and implementing digital systems.
- Emphasis on combinational logic systems, where input signals are routed through logic gates to achieve specific Boolean expressions.
- Introduction to finite state machines, which require Boolean expressions, memory, and timing, to be covered later in the semester.
Assessments and Practice Tasks
- The material covered is part of the Simulink Proficiency Test and the group project.
- Simulink test is due on Friday of week 12 (30th May 2025).
- Group project assessment: in-class demonstrations in weeks 10 and 12, and a final report due on Friday of week 13.
Truth-Tables and Boolean Expressions
- Truth tables are instrumental in designing digital systems using combinational logic.
- Inputs of the system are listed on the left side of the table, and corresponding outputs on the right side.
- Boolean expressions are derived from the truth tables based on the input states.
- Example:
- Given truth table:
| A | B | C | f |
| - | - | - | - |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 |
* Boolean expression derivation:
*
*
* Activity: Combinational Logic - Coffee Machine
- System Description: A coffee machine with three inputs: power switch, coffee dispense switch, and hot water dispense switch.
- Behavior:
- If the power switch is off, no indicators are on, and no dispensing occurs.
- If power is on, a green indicator lights up.
- If power and coffee switch are on, coffee is dispensed, and the power indicator remains on.
- If power and water switch are on, hot water is dispensed, and the power indicator remains on.
- Coffee and hot water cannot be dispensed simultaneously.
- Task: Derive Boolean expressions for:
- Green power indicator
- Coffee dispense output
- Hot water dispense output
- Minimization techniques can be applied.
- Equations to be determined:
Implementing Combinational Logic in Simulink
- Simulink's Logical Operator blocks (found under Simulink -> Logic and Bit Operations in the Library Browser) can implement logic from truth tables.
- Available logical operators: AND, OR, NAND, NOR, XOR, NXOR, and NOT.
- Example implementation of the Boolean expression from earlier truth table, .
Activity: Implement Combinational Logic in Simulink
- Task: Implement the Boolean expressions for the coffee machine outputs in Simulink.
- Green lamp for power indicator.
- Red lamp for coffee dispensing.
- Blue lamp for hot water dispensing.
Combinational Logic and K-Maps
- Karnaugh Maps (K-Maps) may be needed for more complex systems to minimize logic.
- Applicable to systems based on counts from a binary counter.
- K-Maps can help derive Boolean expressions for group projects.
- K-Map: A graphical method used to simplify a Boolean expression.
Example of K-Maps
- Truth table example for a system with counter inputs:
| A | B | C | D | f |
| - | - | - | - | - |
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | x |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | x |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | x |
* K-Map representation:
| AB CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 0 | 1 |
| 01 | 0 | 0 | x | 0 |
| 11 | 0 | 0 | x | 0 |
| 10 | 1 | 1 | x | 1 |
- Boolean expressions are derived by grouping 1s and