Skip to content
SPM Tuition
Computer Science chapter guide

Boolean logic and representation in depth

You can fill a simple truth table, but nested expressions and wordy requirements trip you up.

This section deepens four skills from computing systems and logic: building nested truth tables, checking equivalence, turning words into conditions, and separating how many bits a value uses from the value itself.

All four rely on one habit: check every input combination, and never trust a result you tested on only one case.

What are the four skills?

Order Skill The mark it protects
1 Building a truth table from a nested expression Correct columns and order of evaluation
2 Checking a claimed equivalence Proving or disproving with all rows
3 Converting a written requirement into a condition Choosing AND or OR and the right brackets
4 Distinguishing size from value Bits needed versus number stored

Test them together in the integrated practice set.

One sentence, two tables

An original requirement: “A member gets a discount if they are under 12 or over 60 and they have a card.”

Read as (under 12 OR over 60) AND card, a child without a card gets nothing. Read as under 12 OR (over 60 AND card), a child without a card gets the discount.

The words are the same but the truth tables differ. Skills 1 and 3 show how to build the table and how to remove the ambiguity with brackets.

Who should start where?

If your tables have wrong columns, begin with skill 1. If you are asked whether two expressions are equal and guess, begin with skill 2. If a word problem gives you an expression you cannot defend, begin with skill 3.

Skill 4 stands on its own. Begin there if questions about bytes or bits give you a different answer each time. Use the Boolean expression and truth-table explorer to check any table.

What next?

Go through the four lessons in order. To go through your own tables with a teacher, see online one-to-one Computer Science tuition.

Common questions

How is this different from the main computing systems and logic page?

The main page introduces each skill once. This section goes deeper on the skills that cost marks, such as nested expressions, equivalence and ambiguous wording, with more worked rows.

Do I need to memorise Boolean laws?

A few laws help, such as De Morgan's, but every claim here is checked with a complete truth table. A table never relies on memory, so it is the safer method under exam pressure.

Why does representation size appear in a Boolean logic section?

Both come down to bits. Logic works on single bits, and representation asks how many bits a value needs. Keeping size and value apart avoids a common mix-up.

If your tables are right only when the expression is simple, one-to-one Computer Science lessons let a teacher watch your row-by-row working and correct the evaluation order that slips.

  • Online one-to-one lessons for your child with an experienced teacher.
  • Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
  • Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.