Boolean Algebra and Logic Circuits

Computer Science A2 · Hardware and Virtual Machines. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science A2 topics

The idea

Logic circuits can add and can store. A half adder adds two bits and gives a sum and a carry. A full adder adds two bits and a carry-in, so full adders can be joined to add whole binary numbers.

A flip-flop is a circuit with feedback that holds its output until it is changed, so it stores one bit. The SR and JK types are the ones to know.

A Boolean expression can be made simpler, which means fewer gates. This is done with the laws of Boolean algebra, including De Morgan's laws, or with a Karnaugh map, where 1s in adjacent cells are grouped and the variable that changes inside a group is removed.

Rules to remember

Common mistake

With De Morgan's laws students put NOT on each term but forget to change the operator. Breaking the bar always swaps AND with OR: NOT (A AND B) becomes (NOT A) OR (NOT B), never (NOT A) AND (NOT B).

Worked example

Simplify X = NOT (A OR B) OR ((NOT A) AND B).

  1. De Morgan: NOT (A OR B) = (NOT A) AND (NOT B).
  2. So X = ((NOT A) AND (NOT B)) OR ((NOT A) AND B).
  3. Take out the common term: X = (NOT A) AND ((NOT B) OR B).
  4. (NOT B) OR B = 1, and (NOT A) AND 1 = NOT A.

Answer: X = NOT A (check: X is 1 for A = 0 with B = 0 or 1, and 0 for A = 1).

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Processors, Parallel Processing and Virtual MachinesPurposes of an Operating System (OS) →Take a Computer Science A2 test