Skip to main content
ScotlandEngineering ScienceSyllabus dot point

How do we describe, simplify and design logic circuits whose output depends only on the present inputs?

Combinational logic built from logic gates, described by truth tables and Boolean expressions, simplified using Boolean algebra and Karnaugh maps.

An SQA Advanced Higher Engineering Science answer on combinational logic, covering logic gates, truth tables and Boolean expressions, simplification with Boolean algebra and Karnaugh maps, and designing a logic circuit from a specification.

Generated by Claude Opus 4.816 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this key area is asking
  2. Gates, truth tables and Boolean expressions
  3. Simplifying with Boolean algebra
  4. Karnaugh maps
  5. Examples in context
  6. Try this

What this key area is asking

The SQA wants you to design and analyse combinational logic, circuits whose output depends only on the present combination of inputs, not on any past state. You must use logic gates (AND, OR, NOT, NAND, NOR, and the exclusive forms), describe a circuit with a truth table and a Boolean expression, and simplify that expression using the laws of Boolean algebra and Karnaugh maps so the circuit uses as few gates as possible.

Gates, truth tables and Boolean expressions

A truth table lists every possible input combination and the output for each, so nn inputs give 2n2^n rows. From the rows where the output is 1 you can read off a sum-of-products Boolean expression: form a product (AND) of the inputs for each such row, complementing any input that is 0, then OR those products together. This gives a working circuit, but usually not the simplest one.

Simplifying with Boolean algebra

The laws of Boolean algebra let you shrink an expression before building it:

  • Commutative / associative: order and grouping of AND or OR do not matter.
  • Distributive: A(B+C)=AB+ACA \cdot (B + C) = A \cdot B + A \cdot C.
  • Identity: A1=AA \cdot 1 = A, A+0=AA + 0 = A.
  • Complement: A+A=1A + \overline{A} = 1, AA=0A \cdot \overline{A} = 0.
  • De Morgan's laws: AB=A+B\overline{A \cdot B} = \overline{A} + \overline{B} and A+B=AB\overline{A + B} = \overline{A} \cdot \overline{B}.

Karnaugh maps

A Karnaugh map is a grid that rearranges the truth table so that adjacent cells differ in only one input. You plot a 1 in every cell where the output is 1, then group the 1s into rectangular blocks of 1, 2, 4 or 8 (powers of two), making each block as large as possible and allowing blocks to overlap and to wrap around the edges. Each block becomes one simplified product term: any input that changes within the block drops out. ORing the block terms gives the minimal sum-of-products expression, which is the fewest-gates design.

Examples in context

A two-key safety interlock on a press uses an AND gate so the ram fires only when both buttons are held, forcing the operator to keep both hands clear. A majority voter in a redundant control system outputs the value agreed by at least two of three sensors, built from AND and OR gates. A seven-segment decoder turns a 4-bit number into the seven outputs that light a display, designed by minimising seven separate truth tables with Karnaugh maps. In each case minimising the logic cuts the gate count and the cost.

Try this

Q1. State the Boolean expression for a 2-input AND gate with inputs AA and BB. [1 mark]

  • Cue. Q=ABQ = A \cdot B.

Q2. Write De Morgan's law for A+B\overline{A + B}. [1 mark]

  • Cue. A+B=AB\overline{A + B} = \overline{A} \cdot \overline{B}.

Q3. A truth table has 3 inputs. How many rows does it have? [1 mark]

  • Cue. 23=82^3 = 8 rows.

Exam-style practice questions

Practice questions written in the style of SQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

SQA AH style4 marksA safety interlock turns on an output QQ only when guard switch AA is closed AND either start button BB OR override CC is pressed. Write the Boolean expression for QQ and state how many gates of which type are needed.
Show worked answer →

Translate the words into Boolean operators: AND is a product, OR is a sum.

Expression: Q=A(B+C)Q = A \cdot (B + C).

Gates: one 2-input OR gate to form B+CB + C, then one 2-input AND gate to combine that with AA.

Markers reward the correct expression A(B+C)A \cdot (B + C) and naming one OR gate and one AND gate. A common error is writing AB+CA \cdot B + C, which wrongly lets CC alone switch the output on.

SQA AH style5 marksSimplify the Boolean expression Q=AB+ABQ = A \cdot B + A \cdot \overline{B} using Boolean algebra, and state the law used at each step.
Show worked answer →

Factor out the common term AA.

Q=AB+AB=A(B+B)Q = A \cdot B + A \cdot \overline{B} = A \cdot (B + \overline{B}) by the distributive law.

A variable OR its complement is always true: B+B=1B + \overline{B} = 1 (complement law).

So Q=A1=AQ = A \cdot 1 = A (identity law).

The whole expression simplifies to Q=AQ = A, so only a wire is needed and the BB input is irrelevant.

Markers reward factoring with the distributive law, applying B+B=1B + \overline{B} = 1, and the final result Q=AQ = A with the laws named.

Related dot points

Sources & how we know this