The other thing that computer do really well is logic. In this topic, you will learn about different logic operations and the ways in which they are implemented in computer systems and to interpret logical systems in different ways.
We are learning ...- About logic, logic gates, truth table and logic circuits
So that we can ...- Understand why the output of any logic circuit is Boolean
- Describe the logical operation of the seven standard logic gates
- NOT, AND, OR, NAND, NOR, XOR, XNOR - Draw and interpret truth tables for these logic gates
- Produce logic circuit diagrams to solve a given problem using logic gate notation.
- Produce logic circuit diagrams to implement a written logic circuit using logic gate notation.
- Draw and interpret truth tables for combinations of logic gates (up to three inputs) using logic gate notation.
All computer systems are built up from millions upon millions of tiny building blocks but what are they?
Task 1.1 What is this?Where we find out what the tiny switches that make computers are called and learn how to perform a reverse image search
Look carefully ...Look carefully at the following image. Have you ever seen anything like this before? If you are into electronics, or you have studied Design Technology, you might recognise this.
Right click me and save me on your computer
Reverse image searchPerform a 'reverse image search' to find out what it is a picture of (
HINT : Right click on the image and save it in your userspace. Visit Google Images and upload the image using the 'camera tool'). You should get around 25,000,000,000 search results (taking about 1 second!) Isn't Google wonderful?
In your notebooks / on paperNow answer the following questions in your notebooks or on paper
- Can you name the device in the picture?
- Look down the list of search results and find the section called 'Pages that contain this image'. Find the link to the
**VOLTAGE LAB**website. Use it to answer the rest of the questions. - What are the two main uses of these devices?
- Describe the first use.
- Describe the second use.
Task 1.2 Professor Chris Bishop is a ladWhere we learn about fundamental electronic behaviour from the legend that is Professor Chris Bishop!
Watch the video (on your own) ...
Now plug in your headphones and watch this video by clicking on the image (or alternatively, your teacher will show you it in class). It's by Professor Chris Bishop who is a legend, believe me. The video explains how computers work on a
electronic level. Watch carefully ...
On the worksheetTo make sure you have paid attention (why wouldn't you of?), I would like you to write a video review using the worksheet '
Video Review' to help you.The whole point of this is to convince you that there are only
two possible 'states' of any electrical circuit ...Can you think of any more?
Variables and constants, which have only two possible values, are known as a
Boolean variables, Booleans or flags (because they are used to signal or flag whether something has happened or not).It's a flag, see?
In the middle of the 19th Century (around 1850), an English mathematician called George Boole invented a system for representing logic and doing maths with it. We name this system after him -
Boolean Algebra.Picture of George Boole 1815-1864 'I was born in Lincoln, England and was the son of a shoemaker' Task 2.1 Stand up, Sit down!Where we learn about how combinations of logical statements can be used to make complex decisions super easy
In your notebooks / on paperWrite a paragraph which explains what you have learnt from this activity. If you can, try to come up with some interesting examples which illustrate the concept of
AND, OR and NOT.One way of representing the logical decisions is by writing a truth table. A
truth table will also tell us exactly what chance there is that the logical decision will end up being TRUE. Consider this example ...The truth table lists
all the possible combinations of the inputs (think binary). You then work out the nature of the output by using the logic of the statement you are testing - AND, OR or NOT.
Task 2.2 Truth TablesWhere we learn how to draw truth tables for one and two input decisions
In your notebook / on paperConsider the following scenarios. Using the example above to help you ...
- Identify the input(s) and the output
- Create a truth table which lists the inputs, any processing which is required and finally the output.
- I will only go to the party on Friday if Peter
**OR**Katy is going. - I will only go to University to study Computer Science if I pass my A Levels
**AND**the University accepts me. - I will only have dessert if I enjoyed the starter
**AND**the main course does**NOT**fill me up.
Logic gates model the behaviour of these logic operations using transistors. There are three basic logic gates ...**NOT****gate**which takes a single input and inverts it;**AND****gate**which takes two inputs but only gives an output if both inputs are on;**OR****gate**which takes two inputs and gives an output if either or both inputs are on;
advanced logic gates (NAND, NOR, XOR and XNOR).Notice that AND and OR both have two inputs and NOT only has one
Logic gates allow the computer to perform mathematical functions like add, subtract, divide and multiply as well as make logical decisions? Task 3.1 Practical(ish) logic gatesWhere we will learn how basic logic gates behave
On the worksheetDownload yourself a copy of the worksheet '
Basic Logic Gates' and save a copy in your user space. Read the instructions on the worksheet carefully and complete the tasks by clicking on and replacing the blue writing.
On the worksheetDownload yourself a copy of the worksheet '
Advanced Logic Gates' and save a copy in your user space. Read the instructions on the worksheet carefully and complete the tasks by clicking on and replacing the blue writing.Instead of writing / drawing the logic gate symbols, computer scientists usually use the names of the logic operation or special symbols and write them as
Logic Expressions. You can represent the logical operations using their names (AND, OR, NOT) or using special symbols (⋀, ⋁, ¬) It's important that you know how to convert from written Boolean expressions into logic circuits and vice versa.Like in maths, there are
precedence rules for Boolean operations (brackets > NOT > AND > OR), however, brackets are normally used around expressions to force precedence where it may be ambiguous.Brackets > NOT > AND > ORBrackets > ¬ > ⋀ > ⋁Add an activity comparing logic precedence to mathematical precedenceTask 4.1 Converting compound logic expressions to logic gate circuitsWhere we will learn to convert between Boolean expressions and logic circuits
In your notebooks / on paperUnder a suitable title in your notebooks / on paper, write down the
precedence rules for logic operations. Use a highlighter pen to outline this so that it stands out in your notes. Can you see the relationship with the precedence rules for mathematical operators?
Open up the Logicly DemoTo help us to complete this task, we'll use an online application called
Logicly ...Logicly Demo - show your support by buying a copy!
Practice with gates you already know!Use
Logicly to practise making the three basic logic gate circuits and make sure that you follow how they work. Each of the gates has one or more 'toggle switches' which are used to represent the INPUT values and are labelled A, B, C and so on. The output of the gate is used to light up a 'bulb' and is labelled Q - this is generally used to represent the output of a logic circuit.The following animations
might help you to visualise what's going on. Watch carefully ...Optimistic OR gate - happy most of the time! Click to engageArgumentative NOT gate - always disagreeing! Click to engage
Expression to circuit (using Logicly)Now let's try combining
multiple logic gates and see how they behave! Use Logicly Demo to construct the following logic expressions as logic gate circuits. Create a word processed document and, for each one ...- write down the logic expression;
- draw the logic circuit you have made in Logicly;
- construct a suitable Truth table using Logicly to help you.
Remember to follow the precedence rules you wrote down earlier.
OK - for a logic circuit with
two inputs (A and B), the truth table would have 4 lines in it because there are 4 valid combinations of two switches ...The input section for a 2 input logic circuit
For logic circuits with
three inputs (A, B and C), the truth table would have 8 lines in it because there are 8 valid combinations of three switches ...The input section for a 3 input logic circuit
For those who are interested, the answer is
16 ...
Circuit to expressionLet's have a go at the following examples
without using Logicly to help us. If we are given the circuit first, we should be able to write the logical expression - easy! Deriving the truth table is sometimes a little more tricky if you have got more than one gate but it's easy if you deal with one gate at a time and include extra 'processing' columns in your table - look back at what we did in Task 2.2 to refresh your memory ...Try the following exercises. For each one, sketch the circuit in your notebooks / on paper, write the logic expression underneath and derive the truth table - you need one processing column for every gate before you reach the last one (the output of the last gate is always Q). I've done the first one for you ...Circuit 1 - Click for a hint
Q = (A AND B) AND CThat looks like the same table as I got in Question 3 in Step 4
but I've derived it in a different way! Cool!
Circuit 2 - Click for a hint
Circuit 3 - Click for a hint
Quite often, computer scientists abbreviate the logic operation using symbols.
You need to learn these!
Task 4.2 Learn a new way!Where we learn an alternative (and a bit weird) alternative way of representing Boolean expressions
In your notebooks / on paperRewrite the equations from
Task 4.1 using these abbreviated symbols. For instance ...
Add this new way of writing the logical expressions onto the work you did in Task 4.1. Remember that in an examination,
you could be given Boolean expressions using either type of notation.
Expression to circuitOn paper or in your notebooks, draw
logic circuit diagrams and truth tables for the following expressions. Don't use Logicly to help you, work them out yourself!**A**⋀ (**B**⋁**C**)- (
**A**⋀**B**) ⋀**C** - ¬ (
**A**⋀**B**) - ¬ ((
**A**⋀**B**) ⋁ ¬**C**) - (
**A**⋁ ¬**B**) ⋁ (¬**A**⋀**B**)
Circuit to expressionConvert the following logic circuits into Boolean expressions using the ⋀, ⋁ and ¬ symbols. For each one, derive a truth table as well - remember, you need one processing column for the output of each gate
before you reach the last one ...Circuit 1 - No hints :(
Circuit 2 - No hints :(
BBC EducationCircuit scramble and logic circuit challengesGrab yourself a copy of Circuit Scramble and solve logic gate puzzles on your phone. If you can't (or wont), you can download a Logisim circuit '
Logic circuit challenges' which contains versions of the first 14 challenges. Ask your teacher how this works - you need to use Logism software to open it.Poster timeCreate a poster on the history of the transistor and the effect this had on the development of the modern computer. Include a potential 'future of' section as well to help encourage ideas beyond current technology.
Not LogiclyThis is a alternative logic circuit simulator - have a go!
Half and full addersOne basic real world application of logic gates is the half and full adder. In fact, all computational circuits are made from combinations of transistors / logic gates ...
What's inside a microchip ? (7:21) FAQ (Frequently Asked Questions)Q : How often are we going to use this in our computing careers?A : Logical decisions are really important in computer science and are the basis of all computer programs. However, logic gates are only really important if you are going to move towards the microelectronics / circuit design side of things.Q : What are logic gates used for?A : On a fundamental level, all computer systems are made of logic gates, so, yeah, computers.Q : How are you?A : Very well, thank you for asking. |