0% found this document useful (0 votes)
18 views34 pages

L4 Slides - Computing Systems - Y8

Uploaded by

22pereirag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views34 pages

L4 Slides - Computing Systems - Y8

Uploaded by

22pereirag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Lesson 4:

It’s only logical


Year 8 – Computing systems
Starter activity

Gears again

Use your worksheet to


investigate the logic behind a
couple of gear mechanisms.

The activity makes use of the Turing Tumble


simulator:
jessecrossen.github.io/ttsim
Objectives

Lesson 4: It’s only logical

In this lesson, you will:


● 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
Activity 1

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.
Activity 1

Boolean logic

Arithmetic operations, such as


addition, operate on numbers.

arithmeti
7+x c
expressio
n
constant operator variable
(number (number
) )

The result, the value of an


arithmetic expression, is also a
number.
Activity 1

Boolean logic

Arithmetic operations, such as Logical operations operate on


addition, operate on numbers. statements that are true or
false.
arithmeti logical
7+x c A and B expressio
expressio n
n
constant operator variable statement operator statement
(number (number (true or (true or
) ) false) false)

The result, the value of an The result, the value of a logical


arithmetic expression, is also a expression, is either true or false.
number.
Activity 1

Boolean logic

There are three fundamental Logical operations operate on


logical operations: statements that are true or
false.
not (inversion) logical
A and B expressio
and (conjunction)
n
or (disjunction)
statement operator statement
(true or (true or
false) false)
Activity 1

Boolean logic – Examples

logical go out
go out = not raining expressio raining not raining
n
false true
statement operator statement
(true or (true or true false
false) false)

The statement not A is true


when A is false and vice
versa.
Activity 1

Boolean logic – Examples

open
open = motion and activated motion and
motion activated
activated

statement statement operator statement false false false


(true or (true or (true or
false) false) false) false true false

true false false

true true true

The statement A and B is


true when both A and B are
true.
Activity 1

Boolean logic – Examples

open
open = left or right
left right left or right
false false false
statement statement operator statement
(true or (true or (true or false true true
false) false) false)
true false true

true true true

The statement A or B is true


when at least one of A or B
is true.
Activity 1

Boolean logic – Examples

Use your worksheet to practise


applying Boolean logic.
Activity 1

Boolean logic – Solutions

light not light

false true

true false
Activity 1

Boolean logic – Solutions

fruit veg fruit or veg

false false false

false true true

true false true

false true true


Activity 1

Boolean logic – Solutions

red green blue light is on = red and green

true true true

true false false

false true false

false false false


Activity 2

Shannon makes a connection

Can you describe the


In 1940, Claude Shannon proved
behaviour of a machine
that logical expressions and
using logical
electrical circuits with switches
expressions?
are equivalent.
Then you can build
the machine with
off on
false tru switching circuits!
0 e
1

Image source:
Computer Science Field Guide
Activity 2

Shannon makes a connection

Can you describe the


motion activated
behaviour of a machine
using logical
off on
expressions?
false tru
0 e Then you can build
1
the machine with
switching circuits!

motion and activated


Image source:
Computer Science Field Guide
Activity 2

Shannon makes a connection

Can you describe the


left right
behaviour of a machine
using logical
off on
expressions?
false tru
0 e Then you can build
1
the machine with
switching circuits!

left or right
Image source:
Computer Science Field Guide
Activity 2

Logic gates and logic circuits

Logical expressions — logic A not A


circuits
can be represented using
Logical
diagramsoperations — logic gates A
can be represented using symbols A and B
B
We use this abstract representation
because we are not interested in the details A
of the circuit. A or B
B
Activity 2

Logic gates and logic circuits

Logical expressions — logic raining go out


circuits not raining
can be represented using
Logical
diagramsoperations — logic gates motion
can be represented using symbols open
activated motion and
activated
We use this abstract representation
because we are not interested in the details left
of the circuit. open
right left or right
Activity 2

Logic circuits

Use your worksheet to create


and investigate a few logic
circuits.
Activity 2

Logic circuits – Solutions

A B A and B

false false false

false true false

true false false

true true true


Activity 2

Logic circuits – Solutions

A B A xor B

false false false

false true true

true false true


The result of the XOR operator is true if
true true false exactly one of its inputs is true (but not
both).
Activity 2

Logic circuits – Solutions

motion and
motion light
not light

true false true


Activity 3

The big picture

[Hardware components] are built ❠ The Pattern on the Stone


by Daniel Hillis (1998)
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.
Activity 3

The big picture

[Hardware components] are built Logic gates can be


of Boolean logic blocks, and the combined to form logic
latter are based on simple logical circuits that perform a
functions, such as And, Or, and specific function.
Invert. Logic circuits can be
combined to form
increasingly complex
hardware components.
Activity 3

The big picture

[Hardware components] are built Logic describes the function


of Boolean logic blocks, and the of hardware components.
latter are based on simple logical Logic is binary.
functions, such as And, Or, and Propositions are either true or false.
Invert.
This is why, in hardware,
instructions and data
alike are represented as
binary digits.
Activity 3

Examples of more complex circuits

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


game: ncce.io/cv-rps
Activity 3

Examples of more complex circuits

Circuits that add single binary digits:


ncce.io/cv-adders
Activity 3

Examples of more complex circuits

A real hardware
component: you can
distinguish the individual
areas that perform
different functions, as
well as the intricate
interconnections within
them and between them.
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
Plenary

Boole Google Doodle

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


Plenary

Boole Google Doodle

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


Plenary

Boole Google Doodle

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


Summary

In this lesson, you... Next lesson, you will...

Described the NOT, AND, and OR Define artificial intelligence


logical operators, and how they and machine learning
are used to form logical
Explore examples of where they
expressions
are being applied
Used logic gates to construct Teach a machine how to
logic circuits, and associated recognise different types of
these with logical operators and images
expressions
Discuss moral issues associated
Described how hardware is built with these technologies
out of increasingly complex logic

You might also like