video

Lesson video

In progress...

Loading...

Hello, my name is Mrs. Holborow and welcome to Competing.

I'm so pleased you've decided to join me for the lesson today.

We are going to be exploring Boolean logic in today's lesson and learning about how logic gates, such as the and or and not gate can be combined to create logic circuits.

Welcome to today's lesson from the unit Boolean logic.

This lesson is called an Introduction to Logic Circuits.

And by the end of today's lesson, you'll be able to combine logic gates to build circuits.

Shall we make a start? We will be exploring these key words during today's lesson.

Logic circuit.

Logic circuit, a combination of two or more logic gates used to represent a more complex Boolean expression.

Truth table.

Truth table, a table showing the outputs for all possible combinations of inputs to a logic gate or logic circuit.

There are two main parts to today's lesson.

We'll start by combining logic gates to build a circuit and then we'll construct a truth table for a circuit.

Let's make a start by combining logic gates to build a circuit.

Some Boolean expressions cannot be represented using only one logic gate.

You can join gates together to create a circuit.

Sophia says, "If the pool is open and I have my costume and I have a towel, I can go swimming." There's quite a lot of statements there that need to be combined.

To do this, we look for the words and, or and not in the statement.

Which two logic gates will you need for Sophia's statement? Maybe pause the video here and have a think.

That's right.

You'll need two and gates.

That's because if you read the sentence carefully, we've got, if the pool is open and I have my costume and I have a towel, I can go swimming.

So there's two ands in that statement.

So to build the circuit we have to start by identifying the inputs.

So in this statement we have three inputs.

We have pool open, have a costume, and have a towel.

Then we need to identify the output.

The output here is go swimming.

Remember that all inputs and outputs can only be either true or false.

Time to check your understanding.

Which of these is not an input for this statement? If I am not tired and I have finished my homework, I will watch a film.

Is it A, tired, B, finished homework, or C, watch a film? Pause the video here and have a think.

That's right, C is not an input for this statement, because watch a film is the output of this statement.

Using the inputs and the logic gates you identified earlier, you can construct the logic circuit.

So here you can see I have my two and gates, and then I have my three inputs.

So in my first and gate I have costume as an input and towel as an input.

And that feeds into the second and gate, which has another input which is pool open.

The output of the first and gate becomes one of the inputs to the second and gate.

And the final output is go swimming.

You can then test whether or not the circuit represents the correct logic.

To be able to go swimming, all of the inputs must be true.

So my first and gate with the inputs costume and towel, if those are both true, it will return true, which becomes the input for the next and gate.

And if the pool is open, then that's again another two trues inputting into that and gate which will result as go swimming being equal to true.

So the correct logic has been represented in this circuit.

Andeep's got a question, he is asking, "Could I also draw it like this?" Do you think Andeep could? Maybe pause your video here and have a think.

That's right, it could also have been drawn like this.

This is because the same result is generated, because both gates are and gates.

However, the order of gates does matter in some other circuits.

Time for a check.

Which logic gates would you need to represent this statement? If my phone has battery left and I have data or wifi, then I can watch a video.

Is it A, B or C? Pause the video here whilst you have a think.

Did you select A? Well done.

A is the correct answer.

Let's have a look at this carefully.

If my phone has battery left and, so I need an and gate, which is the first one on the left, and I have data or wifi, so I need an OR gate, I can watch a video.

So A is correct because we've got a combination of an and and an or gate.

Okay, we are now moving on to the first activity of today's lesson, task A.

I'd like you to draw a logic circuit for the following statement.

So for part one the statement is, if I am not tired and I have finished my homework, I will watch a film.

Remember to draw the logic circuit, you need to start by identifying what logic gates you need and then you need to identify all the inputs and outputs of the statement.

Pause the video here whilst you complete the activity.

For part two, I'd like you to draw the logic circuit for the following statement.

I need a sheet of paper or paints or pastels to start an art project.

Remember, identify the logic gates you need and then identify all of the inputs and outputs.

Pause the video here whilst you complete the activity.

How did you get on? You're doing a great job, so well done.

The first statement was, if I am not tired and I have finished my homework, I will watch a film.

So we've identified here we've got two gates.

The first is a not gate and the second is an and gate.

The inputs are tired and have done or finished homework, and the output is watch a film.

So hopefully you have a circuit that looks something similar to this.

So we have a not gate which has the input of tired, which obviously becomes not tired when it comes as the output of the not gate.

And then we have an and gate, which has an input done homework, and the other input is the output from the not gate.

And then the output from the final and gate is watch film.

Remember, you can always pause your video here if you need to make any corrections.

For part two, the statement was, I need a sheet of paper and paints or pastels to start an art project.

So we've identified here the two gates that we need.

We need an and gate and an or gate.

The inputs are paper, paints and pastels, and the output is the art project.

So here I've got an OR gate with paints or pastels.

Okay, so the output from that or gate is going into the input of the and gate.

And then the other input for the and gate is paper.

The output is the art project.

Unlike the example we saw previously, the order of these gates does matter.

Remember, if you need to make any corrections, you can pause your video here.

We are now moving on to the second part of today's lesson where we're going to construct a truth table for a circuit.

A truth table is a table showing the output for all possible combinations of inputs to a logic gate or logic circuit.

You have drawn truth tables for single logic gates before.

So let's just remind ourselves of what these look like.

So here I've got an and gate with the inputs A and B and then an output.

And then I've got the truth table for the and gate.

So remember we have a column for each input and the output, and then we list all the possible combinations.

So the possible combinations for two inputs are zero, zero, zero, one, one, zero and one, one.

Now because this is an and gate, the output is only one when both inputs are one or true.

The inputs and outputs of a logic circuit can be represented by letters to make writing a truth table easier.

So here we've got the example from earlier on.

We've got tired as an input, we've got done homework as an input and we've got watch film as an output.

We can change these inputs and outputs to letters to make writing the truth table easier.

So we've replaced tired with T, we've replaced homework with H, and we've replaced film with F.

We've also labelled here Q.

Intermediate stages can be labelled and normally a less common letter such as Q, X or Z is normally used.

So here Q is the output from the not gate, which becomes the input for the and gate.

To construct a truth table for a circuit, you draw a truth table with columns for all the inputs and outputs, and then you add a row for each possible combination of inputs.

So you can see here I've got the column H for homework and T for tired, and then I've got my outputs or intermediate stages, which are Q and F.

We can then work out the values for the intermediate stage Q by calculating the value of not T.

So remember a not gate inverses its input, so any input of zero for T is going to become one for Q, and any input of one for T is going to become zero for Q.

We can now work out the output, which is F, by using the and on the inputs H and Q.

So this time we're ignoring that T column because we've already calculated the output of that gate.

So the first row, H is zero and Q is one.

So F is going to be zero because remember, the rule for the and gate is both inputs must be one or true to return the value of one or true.

Time to check your understanding.

According to the truth table for this logic circuit, when is the output F true? Is it A, when H is true and T is false? Is it B, when H and T are both true? Or C, when H and T are both false? Pause the video here whilst you have a think.

That's right, the output F is true when H is true and T is false.

Why was the intermediate stage Q calculated as part of the truth table? Is it A, it's one of the laws of Boolean algebra? Is it B, it makes it easier to calculate the final output? Or C, it's always the opposite of the input T? Pause your video here whilst you have a think.

Did you select B? Great work.

It makes it easier to calculate the final output if we have calculated the intermediate stage.

C is also true for the example given, but it's not the reason why Q was calculated.

Moving on to the next set of tasks for today's lesson, task B.

For part one, I'd like you to fill in the truth table for this logic circuit.

So we have the inputs ill and at work, we have an intermediate stage labelled Q, and then we have the output, which is dance class.

Pause the video here whilst you complete the activity.

How did you get on? You're doing a great job so far, so well done.

Here we have the completed truth table for this logic circuit.

So we've started by adding all of the possible input combinations for ill and at work, I and W.

So we've got zero, zero, zero, one, one, zero, and one, one.

We've then calculated the intermediate stage, which is Q.

Now Q is the output of the or gate.

So remember the rule for the or gate is either one or both inputs are one then the output will be one.

So Q should be zero, and then one, one, one going down in the table.

Q then becomes the input for the not gate.

So remember the rule for the not gate is that it inverses its input.

So for the column D, for dance class, it should be the inverse of Q.

So going down the table it should be one, zero, zero, zero.

Remember, if you need to make any corrections, you can always pause your video here.

For part two, I'd like you to complete the truth table for this logic circuit.

This time it's a little bit more complicated because we've got more inputs.

So we've got the inputs paints, which is labelled as A, we've got pastels, which is labelled as B, and then we've got paper labelled as C.

We've got the intermediate step Q, and then we've got the output of our project.

You'll notice that the truth table has been partially completed for you and that it contains more rows than the previous truth table.

That's because with more inputs there are more possible combinations that we need to fill out.

Pause the video here whilst you complete the activity.

How did you get on? Did you manage to complete the truth table? Great work.

Let's have a look through the truth table row by row.

So the first column we had to create was Q, which is the intermediate step, and this is the output from the or gate.

So if we have A and B as zero zero, then the output from that's going to be zero.

Again, we've got zero, zero, so that's zero.

And then we've got zero, one.

Remember, an or gate, either one or both inputs will return a one if they're one.

So we've got one, one, one, one, one, all the way down to the end of the table.

We've then got the C column which was created for you as the input for C, which is paper, and then you had to calculate the output, which is art project.

This is an and gate.

So remember we need both inputs to be one to return one.

So looking at columns Q and C together we've got zero, zero which will result in zero, zero, one, which will result in zero, one, zero which will result in zero, and then we've got one, one which will return one.

Then next row down we've got one, zero, which will be zero again.

One, one which returns a one, one, zero which will be zero, and one, one which will return one.

Remember to check through your truth table carefully and make any corrections if you need to.

You have done a brilliant job today, so well done.

Let's summarise what we have learned in this lesson.

Some logical expressions are too complex to be represented using a single logic gate.

Logic gates can be combined to form a logic circuit.

You can draw a truth table for a logic circuit in the same way as for a logic gate, taking care to consider all possible combinations of inputs.

Thanks for joining me for today's lesson and I hope to see you again soon.

Bye.