DATA REPRESENTATION & COMPUTER LOGIC | TRUTH TABLES
A1.2.4 Construct and analyse truth tables.
• Truth tables to predict the output of simple logic circuits
• Truth tables to determine outputs from inputs for a problem description
• Truth tables and their relationship to a Boolean expression, with inputs and outputs
• Truth tables derived from logic diagrams to aid the simplification of logical expressions
• Karnaugh maps and algebraic simplification to simplify output expressions
SECTION 1 | PREDICT SIMPLE LOGIC CIRCUITS
Purpose of Truth Tables
The main purpose of a truth table is to:
- Systematically test every possible input combination
- Determine the corresponding output for each combination
- Verify the behaviour of a logic circuit
Because binary inputs can only be 0 or 1, a truth table guarantees that no possible case is missed.
Structure of a Truth Table
A truth table consists of:
- One column for each input variable
- One column for the output
- Rows representing every possible combination of inputs
- A circuit with one input has 2 possible input combinations
- A circuit with two inputs has 4 possible input combinations
- A circuit with three inputs has 8 possible input combinations
The number of rows increases exponentially as the number of inputs increases. The truth tables below are simple truth tables to show the output of each gate given each possible input combination.
To predict the output of a simple logic circuit:
- List all possible input combinations in binary order.
- Apply the rule of each logic gate to the inputs.
- Record the resulting output for each row.
- An AND gate outputs 1 only when both inputs are 1.
- An OR gate outputs 1 when at least one input is 1.
- A NOT gate outputs the inverse of its input.
By applying these rules row by row, the output of the circuit can be predicted accurately.
Important Student Note: Listing Binary Inputs Correctly
When constructing a truth table, it is essential that input values are listed in the correct binary order.
For two inputs, the correct order is:
00
01
10
11
The table below illustrated how binary should be listed, note the pattern - column D is 0101 and so on, column C is 001100 and so on, column B is 00001111 and so on. By noting this pattern, you can quickly check if you have listed your binary in the correct order and not missed any combinations. If you fail to list in the correct order, then your answer will most likely be marked as wrong.
| Row | A | B | C | D |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 |
| 2 | 0 | 0 | 1 | 0 |
| 3 | 0 | 0 | 1 | 1 |
| 4 | 0 | 1 | 0 | 0 |
| 5 | 0 | 1 | 0 | 1 |
| 6 | 0 | 1 | 1 | 0 |
| 7 | 0 | 1 | 1 | 1 |
| 8 | 1 | 0 | 0 | 0 |
| 9 | 1 | 0 | 0 | 1 |
| 10 | 1 | 0 | 1 | 0 |
| 11 | 1 | 0 | 1 | 1 |
| 12 | 1 | 1 | 0 | 0 |
| 13 | 1 | 1 | 0 | 1 |
| 14 | 1 | 1 | 1 | 0 |
| 15 | 1 | 1 | 1 | 1 |
Quick check patterns: D alternates every row; C changes every 2 rows; B changes every 4 rows; A changes every 8 rows.
Simple logic circuits often contain more than one gate.
- Intermediate outputs may be calculated for each gate.
- These intermediate results are then used to determine the final output.
- The truth table reflects the complete behaviour of the circuit.
This method ensures that even circuits with multiple gates can be analysed in a clear and systematic way.
Importance in Circuit Design and Analysis
Truth tables are important because they:
- Allow engineers and students to test circuit logic before building hardware
- Help identify errors in circuit design
- Provide a clear link between logic gates and circuit behaviour
They are a key tool for understanding how logical decisions are made in digital systems.
Summary
- Truth tables list all possible input combinations and outputs.
- They are used to predict the output of logic circuits.
- Each row represents a unique combination of binary inputs.
- Truth tables ensure complete and accurate analysis of logic circuits.
Truth tables provide a reliable method for predicting the output of simple logic circuits. By evaluating every possible input combination, they allow the behaviour of digital systems to be fully understood and verified.
SECTION 2 | TRUTH TABLES WITH PROBLEM DESCRIPTIONS
From Problem Description to Truth Table
When given a problem description, the first step is to identify the inputs and outputs.
- Inputs are conditions that can be true (1) or false (0).
- The output represents the result or action based on those conditions.
- Each input is assigned a variable name (such as A, B, C).
- Two switches controlling a light
- Conditions that trigger an alarm
- Rules for granting access
Interpreting Logical Conditions
Problem descriptions often use logical language such as:
- “and”
- “or”
- “not”
- “only if”
These words correspond directly to Boolean operators. Understanding this relationship is essential for determining outputs correctly.
For example:
- “The alarm sounds if both sensors are active” implies an AND relationship.
- “The system activates if either condition is true” implies an OR relationship.
- “The output is true when the input is not true” implies a NOT relationship.
Constructing the Truth Table
To determine outputs from a problem description:
- List all possible input combinations in correct binary order.
- Interpret the rules described in the problem.
- Apply the rules to each row of the table.
- Record the output value for each combination.
This ensures that the system’s behaviour is defined for every possible scenario.
Using Truth Tables to Avoid Ambiguity
Problem descriptions can sometimes be unclear or complex. Truth tables help by:
- Removing ambiguity in logical statements
- Making assumptions explicit
- Providing a clear, visual representation of behaviour
If the logic is correct, the truth table will always produce consistent outputs.
Applications in Computer Systems
Truth tables derived from problem descriptions are commonly used in:
- Control systems
- Security systems
- Embedded systems
- Decision-making logic in software and hardware
They allow designers to test logical rules before implementing them in circuits or programs.
Summary
- Problem descriptions can be translated into truth tables.
- Each condition becomes a binary input.
- Logical language maps directly to Boolean operators.
- Truth tables define outputs for all input combinations.
- This approach ensures accuracy and completeness.
Truth tables provide a systematic way to determine outputs from inputs based on a problem description. By translating words into logical rules and applying them consistently, complex decision-making systems can be clearly defined and analysed.
Worked Examples
Truth tables are often constructed from written problem descriptions rather than circuit diagrams. The key skill is translating logical conditions written in everyday language into binary inputs and outputs, then systematically determining the output for every possible input combination.
Example 1: Simple Problem Description (Baby Alarm)
Logic gates form the basis of how computers work and they are in most items of technology we use in our everyday lives. By combining logic gates, we can create complex logic circuits to perform an unlimited number of tasks. Here we will look at an example of how logic circuits are used in a baby monitor which uses logic gates to help alert parents when their baby is crying or needs attention.
A logic circuit can be used in a baby monitor to turn on an alarm when either an audio sensor or a motion sensor is triggered, and the monitor is currently switched on.
To create the logic circuit for this, we can use an OR gate to combine the signals from the audio sensor and motion sensor, and an AND gate to ensure the alarm only works when it is actually switched on.
The logic circuit can be expressed as:
- X = (A OR B) AND C
- A represents the signal from the audio sensor
- B represents the signal from the motion sensor
- C represents the signal from the switch
- X represents the output signal that triggers the alarm
In this circuit, the OR gate outputs a high signal when both A or B inputs are high. This means that the alarm will be triggered when either the audio sensor or motion sensor detect activity.
The AND gate then combines this result with the switch signal, which allows the user to turn the monitor on and off. This means that the alarm will not be triggered if the switch is turned off, even if both the audio sensor and motion sensor detect activity.
By using logic gates to combine the signals from multiple sensors and a switch, we can create a circuit that triggers an alarm only when specific conditions are met, making the baby monitor more reliable and effective.
The truth table for the logic expression for the baby monitor would be as follows:
By listing the binary in a logical order, such as in ascending or descending order, it makes it easier to identify all possible combinations of input values without missing any or repeating any. This ensures that the truth table is complete and accurate, which is essential for analysing the behaviour of the logic circuit.
Additionally, listing binary in a logical order helps to maintain consistency and clarity throughout the truth table, which makes it easier to read and interpret the results. It also helps to avoid errors or confusion when analysing the circuit or designing a new circuit based on the truth table.
A building security system activates an alert if:
- The system is armed, and
- A window sensor is triggered, or
- A motion sensor is triggered and it is outside office hours
A: Armed, B: Window triggered, C: Motion triggered, D: Outside office hours
| A | B | C | D | Alert |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
SECTION 3 | THE ROLE OF LOGIC GATES
Logic gate circuits can be expressed with an algebraic expression. Whilst there are various ways to represent each logic gate, this section will look at the following gate representations.
- NOT Gate (represented with Ā)
- OR Gate (represented with A + B)
- NOR Gate
- AND Gate (represented with A x B or A · B)
- NAND Gate
- XOR Gate (Represented with ⊕)
Why This Relationship Is Important
Understanding the relationship between truth tables and Boolean expressions allows students to:
- Move between verbal descriptions, algebraic logic, and tabular representations
- Verify that a logic expression behaves as intended
- Prepare for logic simplification using algebra or Karnaugh maps
This skill is essential for designing, analysing, and optimising digital systems.
- Truth tables and Boolean expressions describe the same logic in different forms.
- Truth tables show all possible input-output combinations.
- Boolean expressions provide a concise algebraic description.
- Each row of a truth table corresponds to an evaluation of the expression.
- Understanding this relationship is key to logic analysis and simplification.
Truth tables and Boolean expressions are closely linked representations of logical behaviour. Mastering the connection between them allows complex logic systems to be analysed, verified, and simplified effectively.
Problem description: A school issues an access pass. A student is granted access if
the student has a valid ID card and either the student knows the correct PIN
or a teacher provides override approval.
Inputs: A = ID card valid, B = PIN correct, C = Teacher override
Output: Access (1 = granted, 0 = denied)
| A | B | C | Access |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
How to convert a truth table into a Boolean expression
- If an input is 0 in that row, use NOT of the variable (e.g., NOT A).
Output = 1 at rows: (A,B,C) = (1,0,1), (1,1,0), (1,1,1)
Product terms:
- (1,0,1) → A AND (NOT B) AND C
- (1,1,0) → A AND B AND (NOT C)
- (1,1,1) → A AND B AND C
Unsimplified expression (sum of products):
Access = (A AND (NOT B) AND C) OR (A AND B AND (NOT C)) OR (A AND B AND C)
Simplified expression:
Access = A AND (B OR C)
When given a completed truth table, it is possible to write a Boolean expression that exactly represents the behaviour shown. This skill is essential for analysing logic circuits, checking designs, and preparing for simplification using Boolean algebra or Karnaugh maps.
Step 1: Identify the Input Variables and Output
- Each column in the truth table represents a binary variable.
- The final column represents the output of the logic system.
- Label the inputs clearly (for example, A, B, C).
Step 2: Find the Rows Where the Output Is 1
- Scan the output column.
- Identify every row where the output value is 1.
- Ignore rows where the output is 0.
Step 3: Write an AND Term for Each Output = 1 Row
For each row where the output is 1:
- If an input is 1, include the variable (e.g. A).
- If an input is 0, include the negated variable (e.g. NOT A).
Step 4: Combine All AND Terms Using OR
- Take all AND terms created in Step 3.
- Join them together using OR.
Step 5: (Optional) Simplify the Expression
- The unsimplified expression may contain repeated variables.
- Boolean algebra rules or Karnaugh maps can be used to simplify it.
- Simplification does not change behaviour, only the complexity of the expression.
Key Exam Tips
- Always list inputs in correct binary order before analysing the table.
- Do not skip rows where the output is 1.
- Each output=1 row must appear in the expression.
- Use brackets to clearly show AND groupings.
- Simplification should only be done after the correct expression is formed.
Summary
- Truth tables and Boolean expressions describe the same logic.
- Only rows with output = 1 are used to build the expression.
- Each such row becomes an AND term.
- All terms are joined using OR.
- The resulting expression can then be simplified if required.
Converting a truth table into a Boolean expression is a systematic process. By carefully translating each output=1 row into an AND term and combining them with OR, any truth table can be accurately represented as a Boolean expression.
An irrigation system turns Watering on if the soil is dry and it is not raining, or if a gardener presses a manual override button.
A = Soil is dry B = Rain detected C = Manual override
Output = Watering (1 = on, 0 = off)
| A | B | C | Watering |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
Which option is the correct unsimplified Boolean expression (sum of products) for Watering?
A Boolean expression provides an algebraic description of how a logical output depends on one or more inputs. To fully understand and verify this behaviour, the expression can be converted into a truth table that shows the output for every possible input combination.
Step 1: Identify All Input Variables
- Read the Boolean expression carefully.
- List every distinct variable used (for example, A, B, C).
- Each variable will become a column in the truth table.
- 2 variables → 4 rows
- 3 variables → 8 rows
- 4 variables → 16 rows
Step 2: Set Up the Truth Table Structure
Create a table with:
- One column for each input variable
- One column for the output
- Space for intermediate columns (working space between inputs and output)
List all possible input combinations in correct binary order, starting from all zeros and ending with all ones. Ensuring correct binary ordering is essential for accuracy and exam success.
Step 3: Break Down the Boolean Expression
Before filling in the output column:
- Identify brackets and operator precedence.
- Break complex expressions into smaller parts if necessary.
- Create intermediate columns for sub-expressions.
- A AND (B OR C)
Step 4: Evaluate the Expression Row by Row
For each row of the truth table:
- Substitute the input values into the Boolean expression.
- Apply the Boolean operators in the correct order.
- Record the final output as 0 or 1.
- AND is true only if all inputs are true.
- OR is true if at least one input is true.
- NOT inverts the value.
Step 5: Check for Consistency
Once the table is complete:
- Verify that every row has been evaluated.
- Check that the output values follow logically from the expression.
- Look for patterns that match your expectations.
This step helps catch errors in logic or evaluation.
Why This Process Is Important
Creating truth tables from Boolean expressions allows you to:
- Confirm that an expression behaves as intende
- Compare different expressions for equivalence
- Prepare expressions for simplification
- Analyse logic circuits before implementation
It forms a key link between algebraic logic and practical digital systems.
Exam Tips
- Always list inputs before calculating outputs.
- Use intermediate columns for complex expressions.
- Follow operator precedence carefully.
- Do not simplify unless explicitly instructed.
- Show working clearly if intermediate steps are required.
Summary
- Boolean expressions can be converted into truth tables.
- All input combinations must be included.
- Outputs are calculated by evaluating the expression row by row.
- Intermediate steps improve clarity and accuracy.
- Truth tables provide a complete view of logical behaviour.
Producing a truth table from a Boolean expression is a systematic and reliable method for analysing logic. By carefully listing inputs, evaluating expressions correctly, and checking results, students can accurately predict the behaviour of digital systems
Scenario (environmental monitoring):
A conservation system triggers an alert if the protected area is not in maintenance mode
and either (the temperature is too high and the humidity is too low) or the
smoke sensor is triggered.
A = Temperature too high B = Humidity too low C = Smoke detected D = Maintenance mode
Alert = (NOT D) AND ( (A AND B) OR C )
Required intermediate columns:
1) A AND B 2) (A AND B) OR C 3) NOT D
| A | B | C | D | A AND B | (A AND B) OR C | NOT D | Alert |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |
Inputs are listed in correct binary order from 0000 to 1111 (A is the slowest-changing input, D alternates every row).
SECTION 4 | LOGIC DIAGRAMS
From Logic Diagram to Truth Table
When given a logic diagram, the goal is to determine the output produced for all possible inputs.
To do this:
- Identify each input in the diagram.
- Identify each logic gate and its operation.
- Trace how signals move through the circuit.
Rather than evaluating the entire diagram at once, the circuit should be broken into smaller sections.
Using Intermediate Columns
When deriving a truth table from a logic diagram, intermediate columns are essential.
- Each logic gate in the diagram corresponds to an intermediate result.
- An intermediate column is created for the output of each gate.
- These values are then used to calculate the final output.
This method ensures accuracy and makes complex diagrams manageable.
Constructing the Truth Table
To derive a truth table from a logic diagram:
- List all input variables in correct binary order.
- Create intermediate columns for each gate in the diagram.
- Evaluate each gate row by row.
- Use the final gate output as the output column.
This systematic approach mirrors how signals propagate through the circuit.
Using the Truth Table to Simplify Logic
Once the truth table is complete:
- Rows where the output is 1 can be identified.
- Patterns in the input combinations can be observed.
- These patterns often indicate opportunities for simplification.
- If the output depends only on one input, others may be redundant.
- If multiple rows differ by only one variable, terms may be combined.
This insight allows the original logic to be rewritten in a simpler form.
Benefits of This Approach
- Deriving truth tables from logic diagrams helps students to:
- Understand the behaviour of a circuit without guessing
- Verify that a diagram performs the intended function
- Prepare expressions for algebraic or Karnaugh map simplification
It creates a clear bridge between visual logic diagrams and algebraic logic expressions.
Exam Technique
- Always convert logic diagrams into truth tables before simplifying.
- Include intermediate columns for every gate.
- Look for repeating patterns in the output column.
- Simplify only after confirming the truth table is correct.
Summary
- Logic diagrams show structure; truth tables show behaviour.
- Intermediate columns represent gate outputs.
- Truth tables derived from diagrams reveal simplification opportunities.
- This process improves accuracy and clarity in logic analysis.
Deriving a truth table from a logic diagram is a powerful technique for simplifying logical expressions. By translating visual circuits into systematic tables, complex logic can be analysed, verified, and reduced with confidence.
A flood-warning system triggers an alert if:
- The river level is high OR heavy rain is detected, and
- The system is armed.
Inputs: A = River level high, B = Heavy rain detected, C = System armed
Output: X = Alert
Y is the intermediate output from the OR gate. X is the final output (alert) from the AND gate.
Required method (using intermediate columns)
| A | B | C | Y = A OR B | X = Y AND C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 1 |
The truth table is derived directly from the diagram: calculate Y first, then use Y and C to find X.
SECTION 4 | KARNAUGH MAPS AND SIMPLIFICATION
Recap of the Example Logic
From the logic diagram and truth table, the system behaviour was:
- Y = A OR B (Y is the intermediate)
- X = Y AND C
Where:
- A = River level high
- B = Heavy rain detected
- C = System armed
- X = Alert
From the truth table, the output X is 1 for the following input combinations:
| A | B | C | X |
|---|---|---|---|
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 |
A Karnaugh map:
- Uses the same information as a truth table
- Groups input combinations that differ by only one variable
- Helps remove redundant variables
- Produces a simplified Boolean expression
The goal is to find the simplest expression that still gives the same outputs.
Structure of a 3-Variable Karnaugh Map
For three inputs (A, B, C):
- One variable is placed on one axis
- The other two variables are combined on the other axis
- Values are arranged in Gray code order so only one variable changes between adjacent cells
Typical layout:
| C \ AB | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | ||||
| 1 |
Gray code order is a way of arranging binary values so that only one bit changes between adjacent values.
This property is essential in Karnaugh maps because it ensures that neighbouring cells differ by just one variable, allowing valid grouping and simplification.
Why Gray Code Order Is Used in Karnaugh Maps
In a Karnaugh map:
- Adjacent cells must differ by only one input variable.
- This allows cells to be grouped and simplified correctly.
- Standard binary counting does not always satisfy this condition.
Gray code solves this problem by minimizing bit changes between adjacent values.
Example: Two-Bit Gray Code Order
Standard binary order:
- 00, 01, 10, 11
- 00, 01, 11, 10
- 00 → 01 (one bit changes)
- 01 → 11 (one bit changes)
- 11 → 10 (one bit changes)
This is why Karnaugh map column headings are arranged as 00, 01, 11, 10 instead of standard binary order
Filling the Karnaugh Map
Using the truth table:
- Place a 1 in each cell where X = 1
- Leave other cells as 0
For this example, all 1s occur when C = 1 and at least one of A or B is 1.
Grouping the 1s
Rules for grouping:
- Groups must contain 1, 2, 4, or 8 cells
- Groups must be rectangular
- Groups should be as large as possible
- Groups may wrap around the edges
- The three 1s can be grouped to show that C is always 1
- Within that group, A or B must be 1
Deriving the Simplified Expression
From the grouping:
- C remains in the expression
- A and B appear as an OR condition
This gives the simplified expression:
- X = C AND (A OR B)
This matches the logic originally shown in the diagram, confirming correctness.
Why Karnaugh Maps Are Useful
Karnaugh maps:
- Reduce complex expressions efficiently
- Make simplification visual and systematic
- Help verify logic derived from diagrams and truth tables
- Reduce the number of logic gates needed in hardware
They are an essential next step after truth tables when optimising logic.
Exam Technique (IB Focus)
- Always derive the truth table first
- Transfer values carefully into the K-map
- Group the largest possible sets of 1s
- Write the simplified expression from the groups
- Check the simplified result matches the original output
Summary
- Karnaugh maps simplify Boolean expressions visually
- They are built directly from truth tables
- Grouping reveals redundant variables
- The simplified expression preserves the original logic
- Karnaugh maps bridge truth tables and efficient circuit design
Scenario (Flood warning): An alert output X becomes 1 when the system is armed and
either the river is high or heavy rain is detected.
Inputs: A (river high), B (heavy rain), C (armed)
Task: Use the information below to place 1s in the correct Karnaugh map cells.
Click a cell to toggle between 0 and 1. Then press Check.
Given information (where X = 1)
From the truth table, X = 1 for these input combinations:
| A | B | C | X |
|---|---|---|---|
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 |
Columns use Gray code order for AB:
00, 01, 11, 10.Rows are C:
0 (top), 1 (bottom).
Interactive Karnaugh Map (Click Cells)
Set the correct cells to 1. All other cells should remain 0.
| C \ AB | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 |
Input Variable | A binary value (0 or 1) that represents a condition or signal entering a logic circuit.
Output | The result produced by a logic circuit or Boolean expression for a given set of input values.
Logic Circuit | A system of interconnected logic gates that processes binary inputs to produce a binary output.
Logic Diagram | A graphical representation of a logic circuit showing inputs, logic gates, intermediate connections, and outputs.
Intermediate Output (Intermediate Column) | A value produced by a logic gate within a circuit that is not the final output. Intermediate outputs are used as inputs to later gates and must be included when constructing truth tables.
Boolean Expression | An algebraic expression that represents logical relationships using variables and Boolean operators such as AND, OR, and NOT.
Boolean Operator | A logical operation applied to binary values. Common operators include AND, OR, and NOT.
AND | A Boolean operator that produces an output of 1 only when all inputs are 1.
OR | A Boolean operator that produces an output of 1 when at least one input is 1.
NOT | A Boolean operator that inverts the input value (0 becomes 1, and 1 becomes 0).
Sum of Products | A Boolean expression formed by OR-ing together multiple AND terms, each corresponding to a row in a truth table where the output is 1.
Binary Order | The standard sequence used to list input combinations in a truth table (for example: 000, 001, 010, 011, 100, 101, 110, 111).
Gray Code Order | A method of ordering binary values so that only one bit changes between adjacent values. Gray code order is used in Karnaugh maps.
Karnaugh Map (K-map) | A visual tool used to simplify Boolean expressions by grouping adjacent cells that represent input combinations producing an output of 1.
Cell (Karnaugh Map) | An individual square in a Karnaugh map that represents a specific combination of input values.
Grouping | The process of combining adjacent 1s in a Karnaugh map to eliminate redundant variables and simplify a Boolean expression.
Simplification | The process of reducing a Boolean expression to its simplest form without changing its logical behaviour.
Redundant Variable | A variable that can be removed from a Boolean expression without affecting the output.
Truth Table Derivation | The process of creating a truth table from a Boolean expression or a logic diagram.
Expression Derivation | The process of creating a Boolean expression from a truth table by identifying rows where the output is 1.
Gray Code Adjacency | The property that allows Karnaugh map cells to be considered adjacent when they differ by only one input variable, including across map edges.
Circuit rule: First compute
NOT A, then compute (NOT A) OR B.
Which truth table output column for X is correct (rows ordered as A,B = 00, 01, 10, 11)?
A city displays an Air Warning (output X = 1) if:
- Pollution is high (A = 1) and it is not windy (B = 0), or
- An emergency override is activated (C = 1).
Inputs: A = Pollution high, B = Windy, C = Emergency override
Output: X = Air Warning
Choose the correct output column for X
| Row | A | B | C |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 5 | 1 | 0 | 1 |
| 6 | 1 | 1 | 0 |
| 7 | 1 | 1 | 1 |
Click the output column cells to toggle between 0 and 1. Use the expression and intermediate columns to determine the correct outputs.
X = (A AND B) OR (NOT C)
| Row | A | B | C | AND | NOT | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 | 1 | 0 |
| 3 | 0 | 1 | 1 | 0 | 0 | 0 |
| 4 | 1 | 0 | 0 | 0 | 1 | 0 |
| 5 | 1 | 0 | 1 | 0 | 0 | 0 |
| 6 | 1 | 1 | 0 | 1 | 1 | 0 |
| 7 | 1 | 1 | 1 | 1 | 0 | 0 |
Task: Use the logic diagram to decide which rows should have output X = 1.
Click the output cells to toggle between 0 and 1. Then press Check.
The intermediate for NOT output labelled Z and the AND output labelled Y.
| Row | A | B | C | NOT | AND) | X |
|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 1 | 0 | 0 |
| 2 | 0 | 0 | 1 | 1 | 0 | 0 |
| 3 | 0 | 1 | 0 | 0 | 0 | 0 |
| 4 | 0 | 1 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 0 | 1 | 1 | 0 |
| 6 | 1 | 0 | 1 | 1 | 1 | 0 |
| 7 | 1 | 1 | 0 | 0 | 0 | 0 |
| 8 | 1 | 1 | 1 | 0 | 0 | 0 |
Task: Complete the Karnaugh map for output X using the given truth-table information,
then identify the main group of 1s by selecting cells, and finally choose the simplified expression.
Gray code column order: AB = 00, 01, 11, 10 Row: C = 0 (top), C = 1 (bottom)
Given (from truth table)
X = 1 for these (A,B,C) combinations:
(0,1,1), (1,0,1), (1,1,1)
Step 1: Place 1s in the K-map cells that match these combinations. Leave all others as 0.
Step 2: Click K-map cells containing 1s to select a group (try to make the group as large as possible).
Interactive Karnaugh Map (Click to Toggle 0/1, then Select Group)
First toggle cells to set the correct 1s. Then click again on 1-cells to mark them as a group (dashed highlight).
| C \ AB | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 |
Choose the simplified expression
After grouping, choose the simplest expression that matches the K-map.
☐ 1.1.1 FUNCTIONS OF THE CPU
☐ 1.1.2 ROLE OF THE GPU
☐ 1.1.3 CPU VS GPU
☐ 1.1.4 PURPOSE AND TYPES OF PRIMARY MEMORY
☐ 1.1.5 FETCH, DECODE AND EXECUTE CYCLE
☐ 1.1.6 PIPELINING IN MULTICORE ARCHITECTURES
☐ 1.1.7 SECONDARY MEMORY STORAGE
☐ 1.1.8 CONCEPTS OF DATA COMPRESSION
☐ 1.1.9 CLOUD COMPUTING
A1.2 DATA REPRESENTATION AND COMPUTER LOGIC
☐ 1.2.1 REPRESENTING DATA
☐ 1.2.2 HOW BINARY IS USED TO STORE DATA
☐ 1.2.3 LOGIC GATES
➩ 1.2.4 TRUTH TABLES, CIRCUITS, EXPRESSIONS AND K MAPS
☐ 1.2.5 LOGIC CIRCUIT DIAGRAMS - COMING SOON
A1.3 OPERATING SYSTEMS AND CONTROL SYSTEMS
☐ 1.3.1 ROLE OF OPERATING SYSTEMS
☐ 1.3.2 FUNCTIONS OF OPERATING SYSTEMS
☐ 1.3.3 APPROACHES TO SCHEDULING
☐ 1.3.4 INTERUPT HANDLING
☐ 1.3.5 MULTITASKING
☐ 1.3.6 CONTROL SYSTEM COMPONENTS
☐ 1.3.7 CONTROL SYSTEM APPLICATIONS