4 – It’s only logical

🎯 Learning Objectives

Develop the Hardware & Processing learning strand:

  • Describe three logical operators, and how they are used to form logical expressions
  • Use logic gates to construct logic circuits, and associate these with logical operators and expressions
  • Describe how hardware is built out of increasingly complex logic circuits
💬 Key Vocabulary

  • Logical operators (NOT, AND, OR),
  • logical expressions
  • truth values (true, false)
  • truth tables
  • logic gates
  • logic circuits
  • hardware components

📝 Starter Activity – Gears, again!

Download the worksheet below to investigate the logic behind a couple of gear mechanisms.

📖 Boolean logic

In 1854, George Boole published The Laws of Thought.

The book didn’t really capture how we think.

It was an effort to represent logic and reasoning as mathematical operations.

George Boole – Born and brought up in Lincoln, not that far away!

Arithmetic operations, such as addition, operate on numbers.

The result, the value of an arithmetic expression, is also a number.

Logical operations operate on statements that are true or false.

The result, the value of a logical expression, is either true or false.

There are three fundamental logical operations:

not  (inversion)

and  (conjunction)

or  (disjunction)

NOT

rainingnot raining
falsetrue
truefalse
Truth table for not

The statement not A is true when A is false and vice versa.

AND

Imagine an automatic door for this example
motionactivatedmotion and activated
falsefalsefalse
falsetruefalse
truefalsefalse
truetruetrue
Truth table for and

The statement A and B is true when both A and B are true.

OR

Imagine a left and right motion sensor
leftrightleft or right
falsefalsefalse
falsetruetrue
truefalsetrue
truetruetrue
Truth table for or

The statement A or B is true when at least one of A or B is true.

📝 Activity 1 – Boolean logic

Use the worksheet below to practise applying Boolean logic.

📖 Shannon makes a connection

In 1940, Claude Shannon proved that logical expressions and electrical circuits with switches are equivalent.

Shannon was well known for riding a unicycle and juggling around Bell Labs, his employer.
An and electrical circuit
An or electrical circuit

Logical expressions — logic circuits can be represented using diagrams.

Logical operations — logic gates can be represented using symbols.

We use this abstract symbols because we are not interested in the details of the circuit.

not, and, or gates

📝 Activity 2 – Logic Circuits

Use the worksheet below to create and investigate a few logic circuits.

📖 The Big Picture

[Hardware components] are built of Boolean logic blocks, and the latter are based on simple logical functions, such as And, Or, and Invert. These logical functions are implemented by switches […] and these switches control a physical substance, such as water or electricity, which is used to send one of two possible signals from one switch to another: 1 or 0.

The Pattern on the Stone
by Daniel Hillis (1998)

Logic gates can be combined to form logic circuits that perform a specific function.

Logic circuits can be combined to form increasingly complex hardware components.

CPU, RAM and SSD

Logic describes the function of hardware components.

Logic is binary.

Propositions are either true or false.

This is why, in hardware, instructions and data alike are represented as binary digits.

📖 Examples of more complex circuits

A circuit that determines the winner in a rock-paper-scissors game

Circuits that add single binary digits

📝 Plenary – Boole Google Doodle

This Google Doodle was created to celebrate the bicentennial of Boole’s birth.

These are the letters that ‘light up’ (are true) when x is true and y is false.

Which letters will light up when x is false and y is true?

Which letters will light up when both x and y are false?

Which letters will light up when both x and y are true?

In this lesson, you…

  • Described the NOT, AND, and OR logical operators, and how they are used to form logical expressions
  • Used logic gates to construct logic circuits, and associated these with logical operators and expressions
  • Described how hardware is built out of increasingly complex logic circuits

Next lesson, you will…

  • Define artificial intelligence and machine learning
  • Explore examples of where they are being applied
  • Teach a machine how to recognise different types of images
  • Discuss moral issues associated with these technologies

🏅 Badge it

🥈 Silver Badge

🥇 Gold Badge

🥉 Platinum Badge