Ch 1 · 10 Boolean Logic · IGCSE Computer Science 0478

Topic 1 of 1 in Boolean Logic — IGCSE Computer Science 0478 — 57 lessons.

Introduction

Every decision a computer makes is built from tiny circuits called logic gates, which take binary inputs (0 or 1) and produce a binary output. Combining gates lets a computer check conditions such as "the door is open AND the alarm is on". (Syllabus topic 10.)

Key ideas — The six gates

The small circle (a "bubble") always means NOT (invert). NOT has one input; all the other gates here have two inputs.

🧑‍🏫 Teacher's explanation

Imagine you are controlling a security system for a high-tech vault. Boolean logic is the set of rules that determines whether the alarm sounds (output 1) or stays silent (output 0) based on various sensor inputs. Think of each logic gate as a specific type of security rule.

📖 Definitions

🔍 Worked example — Easy

Complete the truth table for a single NOT gate with input A.

🔍 Worked example — Standard

Determine the output of the expression X = (A ext AND B) ext OR C when A=1, B=0, C=1.

🔍 Worked example — Exam-style

A logic circuit consists of two inputs A and B fed into a NAND gate. Write the truth table for the output Y.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

Key ideas — Truth tables for the gates

🧑‍🏫 Teacher's explanation

Think of logic gates as tiny electronic switches that decide whether electricity flows through a circuit or not. In computer science, we represent 'electricity flowing' as 1 (True) and 'no electricity' as 0 (False).

📖 Definitions

🔍 Worked example — Easy

Complete the truth table for a single NOT gate with input A.

🔍 Worked example — Standard

Determine the output of the logic expression X = (A ext AND B) ext OR C when A=1, B=0, C=1.

🔍 Worked example — Exam-style

A logic circuit has two inputs, A and B. The output is 1 only when A and B are different. Which logic gate is this, and what is the output if A=1 and B=1?

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) Draw the logic circuit for this system. [2] (b) Construct a truth table for the output Y. [2] [4 marks]

Key ideas — Truth tables for circuits

A truth table lists every combination of inputs and the output. With 3 inputs there are 2^3 = 8 rows: count in binary from 000 to 111. Add working columns for the output of each gate, then the final output.

🧑‍🏫 Teacher's explanation

Think of a truth table as a master checklist for a machine. If you have a machine with three switches (A, B, and C), there are several ways those switches can be set. A truth table ensures you have tested every single possible setting to see what the machine does.

📖 Definitions

🔍 Worked example — Easy

Complete the truth table for the expression X = extNOT A ext OR B.

🔍 Worked example — Exam-style

A circuit has three inputs A, B, and C. The output is 1 only when A and B are both 1, OR when C is 0. Write the logic expression.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) Draw a logic circuit for this expression. [3] (b) Complete the truth table for this circuit. [3] [6 marks]

Key ideas — From a problem statement to an expression and a circuit

Problem: an alarm X sounds if the window is open (W = 1) and the system is switched on (S = 1), or if the panic button is pressed (P = 1).

🧑‍🏫 Teacher's explanation

Think of Boolean logic like a set of rules for a security system. Each logic gate acts like a specific type of switch. An AND gate is like two switches in a row (series); both must be flipped to let electricity through. An OR gate is like two switches side-by-side (parallel); if either one is flipped, the light turns on. A NOT gate is like a 'rebel' switch that always does the opposite of what you tell it.

📖 Definitions

🔍 Worked example — Easy

A light (L) turns on if a switch (A) is pressed AND a sensor (B) is triggered. Write the logic expression.

🔍 Worked example — Standard

A security system (Y) activates if (Sensor A is active AND Sensor B is active) OR (Manual Override C is active). Write the logic expression and the truth table.

🔍 Worked example — Exam-style

A system output (Q) is true if (Input A is NOT active) OR (Input B is active AND Input C is active). Complete the truth table for the output Q.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

Key ideas — From a truth table to an expression

Look at the rows where the output is 1. For each, write the inputs joined with AND (using NOT for any input that is 0), then join these terms with OR.

🧑‍🏫 Teacher's explanation

Converting a truth table into a logic expression is like writing a recipe for a specific result. If you want a specific outcome (the output is 1), you need to figure out exactly what combination of ingredients (the inputs) will produce it.

📖 Definitions

🔍 Worked example — Easy

Write the logic expression for the following truth table:

🔍 Worked example — Standard

A logic circuit has two inputs, A and B. The output is 1 only when A and B are different. Write the logic expression.

🔍 Worked example — Exam-style

Given the truth table below, write the full logic expression for Output X.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) Draw the logic circuit for this system. [3] (b) Write the logic expression for X. [1] [4 marks]

Worked example

Write the logic expression for this circuit and complete its truth table: A and B go into a NOR gate; its output and C go into an AND gate, giving X.

🔍 Worked example — Easy

Complete the truth table for a single NOT gate with input A.

🔍 Worked example — Standard

Write the logic expression for a circuit where A and B are inputs to an OR gate, and the output of that OR gate is then sent through a NOT gate.

⚠️ Common errors

Common mistakes

Practice

Answers: (1) 00 → 1, 01 → 1, 10 → 1, 11 → 0. (2) L = (A OR B) AND NOT D. (3) 8. (4) Outputs for ABC = 000…111: 0, 0, 0, 0, 0, 1, 1, 1.

Summary

All chapters in Boolean Logic

  1. 10 Boolean Logic