You are stranded on an Island when you bump in to 3 people. Of the three people (Alice, Bill, Charlie):
One is a knight
One is a knave
One is a spy
On this island:
Knights always tell the truth
Knaves always lie
Spies can do either
Alice says: “Charlie is a knave.”
Bill says: “Alice is a knight.”
Charlie says: “I am the spy.”
Who is the knight, who the knave, and who the spy?
All data stored in computer systems is stored in binary format, which means that any calculations that are made must be done using only True and False values, this is known as Boolean logic.
When we are working out what possibilities exist for a particular Boolean logic structure, we can use a truth table to represent that data.
AND Gates
A Boolean AND gate works by the following rules:
If both inputs are true, then the output will be True.
Otherwise the output will be false
OCR Notation for an AND Gate is also:
Challenge 1 – AND Gate truth table (using pen and paper)
Can you fill out the truth table for an AND gate?
OR Gates
A Boolean OR gate works by the following logic:
If either input is True, the output is True.
If both inputs are True, the output is True.
Otherwise, the output is false.
OCR Notation for an OR Gate is also:
Challenge 2 – OR Gate truth table (using pen and paper)
Can you fill out the truth table for an OR gate?
XOR Gates
A Boolean XOR gate works by the following logic:
If only one input is True, the output is True.
If both inputs are True, the output is False
If both inputs are False, the output is False
OCR Notation for an XOR Gate is also:
Challenge 3 – OR Gate truth table (using pen and paper)
Can you fill out the truth table for an XOR gate?
A Boolean NOT gate simply reverses whatever input is given.
If the input is True, the output is False
If the input is False, the output is True
OCR Notation for an NOT Gate is also:
Challenge 4 – Can you write a truth table for a NOT gate? (using pen and paper)
Activity 1 (5mins)
Have a go at connecting up multiple logic gates to see what happens, using the simulator below. Can you work out the inputs and outputs for the following examples.
AND
Example 1
NOT AND (NAND)
Example 2
Activity 2 –
Using the link below, see if you can make the following systems:
Activity 3 – Create the following Logic circuits
P= A
B
P= (A
B )
C
P= A
B