Write logic expressions from circuits or truth tables

Resources | Subject Notes | Computer Science

Boolean Logic - IGCSE Computer Science

Boolean Logic

Objective: Write logic expressions from circuits or truth tables

Boolean logic is the foundation of digital circuits and computer science. It deals with logical operations that can be represented by binary values (0 for false and 1 for true). Understanding Boolean logic is crucial for analyzing and designing digital systems.

Basic Boolean Operators

There are three main Boolean operators:

  • AND (≈ or ∧): The result is true (1) only if both inputs are true (1).
  • OR (≨ or ∨): The result is true (1) if at least one input is true (1).
  • NOT (∪ or ¬): Inverts the input. If the input is true (1), the output is false (0), and vice versa.

Truth Tables

A truth table shows all possible input combinations and their corresponding output values for a Boolean expression.

AND Truth Table

Input A Input B Output (A AND B)
0 0 0
0 1 0
1 0 0
1 1 1

OR Truth Table

Input A Input B Output (A OR B)
0 0 0
0 1 1
1 0 1
1 1 1

NOT Truth Table

Input Output (NOT Input)
0 1
1 0

Logic Expressions from Circuits

Logic gates are electronic circuits that implement Boolean operations. We can write logic expressions based on the output of these circuits.

Example 1: A circuit with two inputs connected to an AND gate.

If the inputs are A and B, the output is A AND B, which can be represented as: $A \land B$ or $A \cdot B$

Example 2: A circuit with two inputs connected to an OR gate.

If the inputs are A and B, the output is A OR B, which can be represented as: $A \lor B$ or $A \vee B$

Example 3: A circuit with a single input connected to a NOT gate.

If the input is A, the output is NOT A, which can be represented as: $eg A$ or $\overline{A}$

Writing Logic Expressions from Truth Tables

We can derive logic expressions directly from truth tables. Each row in the truth table represents a specific combination of inputs and outputs. We can use these to construct logical statements.

For example, consider the following truth table:

A B C Output
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

We can observe that the output is 1 only when A is 1 and B is 1. Therefore, the logic expression is: $A \land B$

Practice

Practice writing logic expressions from simple circuits and truth tables. This will solidify your understanding of Boolean logic.