Skip to content

Unit 7 · Lesson 3

Logic circuits

5 steps. Each one is a short story and a question to answer.

A computer does not understand words or pictures. It understands one thing: on or off.

We write those two states as 0 and 1, and logic circuits deal with them.

A logic circuit takes inputs, applies a logical operation and gives an output.

Everything a computer does, from adding to games, is built from circuits like these.

Inputs0 or 1
Logical operation
Output0 or 1
Logic circuit = inputs (0 or 1) + a logical operation = output

Logic circuits work with which values?

Pick an answer

Logic circuits

Logic circuit = inputs (0 or 1) + a logical operation = output. We write those two states as 0 and 1, and logic circuits deal with them. A logic circuit takes inputs, applies a logical operation and gives an output.

The AND gate

AND: output is 1 only if both are 1. The output is 1 only if both inputs are 1 together. If any input is zero, the output is zero.

The OR and NOT gates

OR: 1 if any input is 1. NOT: flips the value. It is zero only when both are zero. NOT takes one input and flips it: 0 becomes 1 and 1 becomes 0.

The half adder

Half adder: S = A XOR B and C = A AND B. It takes two binary digits A and B and gives two things: S, the sum, and C, the carry. When A=1 and B=1: the sum S=0 and the carry C=1, because 1+1=10.

The full adder

Full adder = A + B + Carry In, giving S and Carry Out. The full adder takes three inputs: A, B and Carry In. It gives S and Carry Out, so we can chain many adders and add long numbers.

Done, see the summary
✕

Logic circuits

Scroll down ↓ to continue

The lesson on one page

Every idea in the lesson with its rule, ready to screenshot and revise from.

  1. Logic circuits

    Logic circuit = inputs (0 or 1) + a logical operation = output

  2. 2

    The AND gate

    AND: output is 1 only if both are 1

  3. 3

    The OR and NOT gates

    OR: 1 if any input is 1. NOT: flips the value

  4. 4

    The half adder

    Half adder: S = A XOR B and C = A AND B

  5. 5

    The full adder

    Full adder = A + B + Carry In, giving S and Carry Out

Test yourself

One question from every step. Answer and see your score.

Question 1 of 5

Logic circuits work with which values?

Watch and listen

Quick reel

Unit 7

Learn how a computer thinks with 0s and 1s: AND, OR and NOT gates, truth tables, and the half adder and full adder, in an animated explainer.

Share this lessonWhatsApp

The lesson in writing

The same explanation as the 3D scene, written out for quick review.

Logic circuits

Logic circuit = inputs (0 or 1) + a logical operation = output. We write those two states as 0 and 1, and logic circuits deal with them. A logic circuit takes inputs, applies a logical operation and gives an output.

Page 165

The AND gate

AND: output is 1 only if both are 1. The output is 1 only if both inputs are 1 together. If any input is zero, the output is zero.

Page 166

The OR and NOT gates

OR: 1 if any input is 1. NOT: flips the value. It is zero only when both are zero. NOT takes one input and flips it: 0 becomes 1 and 1 becomes 0.

Page 168

The half adder

Half adder: S = A XOR B and C = A AND B. It takes two binary digits A and B and gives two things: S, the sum, and C, the carry. When A=1 and B=1: the sum S=0 and the carry C=1, because 1+1=10.

Page 170

The full adder

Full adder = A + B + Carry In, giving S and Carry Out. The full adder takes three inputs: A, B and Carry In. It gives S and Carry Out, so we can chain many adders and add long numbers.

Page 172

Questions about this lesson

What are logic circuits?
Electronic circuits that work with only two values, 0 and 1, and apply logical operations on inputs to produce an output.
What are AND, OR and NOT gates?
AND outputs 1 only if both inputs are 1. OR outputs 1 if any input is 1. NOT flips the value.
What is a truth table?
A table showing a gate's output for every possible input.
What does a half adder do?
It adds two binary digits A and B and gives the sum S and the carry C.