video

Lesson video

In progress...

Loading...

Hello! My name is Mrs. Holborow and welcome to Computing.

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

We're going to be exploring Boolean logic in today's lesson and learning about some common logic gates.

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

This lesson is called Boolean logic and logic gates, and by the end of today's lesson, you'll be able to identify different logic gates and construct the truth table for each logic gate.

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

Boolean.

Boolean, an expression that evaluates to either true or false.

Logic gate.

Logic gate, an electronic component that carries out a logical operation.

Truth table.

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

There are three main parts to today's lesson.

We'll start by writing a Boolean expression.

We'll then compare the logic gates AND, OR, and NOT, and then we'll finish by constructing truth tables for AND, OR, and NOT gates.

Let's make a start by writing a Boolean expression.

George Boole was an English mathematician who lived in the 1800s.

In 1847, he introduced Boolean logic in which all expressions evaluate to either true or false.

Which statement can be evaluated with Boolean logic? Is it Sofia's statement, "I like playing football"? Is it Jun's statement, "What time is it?" Or is it Andeep's statement, "10 divided by 2"? Maybe pause the video here and have a think.

That's right.

Sofia's statement is either true or false.

So this statement, "I like playing football," can be evaluated using Boolean logic.

In 1940, Claude Shannon discovered that Boolean logic could be applied to electrical circuits.

High and low voltages can be used to represent true and false.

Shannon's discovery forms the basis of all electronic computers.

Time to check your understanding.

A Boolean expression, A, cannot be evaluated; B, evaluates to either true or false; or C, evaluates to true and false.

Pause the video here whilst you have a think.

That's right.

The correct answer is B.

A Boolean expression evaluates to either true or false.

Which of these is a Boolean expression? A, what is your favourite TV show; B, please open the window; or C, I have two cats and a dog.

Pause the video here whilst you have a think.

Did you put C? Great work.

The statement I have two cats and a dog can either return as true or false, so it's a Boolean expression.

We are now moving on to our first task of today's lesson, Task A, and I'd like you to write a statement that can be evaluated with Boolean logic.

Maybe think back to some of the examples we've seen so far today.

Pause the video here whilst you complete the activity.

How did you get on? Did you manage to create a statement that can be evaluated with Boolean logic? Let's have a look at some examples together.

So remember, these statements must be able to be evaluated to either true or false.

So we have the sky is blue, my friend likes cheese, birds have three wings and one beak, and all basketballs are orange.

Now, here's just some examples.

You may have done something totally different, but the main thing is can your statement be evaluated to be either true or false? We're now moving on to the second part of today's lesson where we're going to compare the logic gates AND, OR, and NOT.

All computers have a central processing unit or CPU, which processes the data and instructions for the computer.

A CPU uses billions of tiny electronic components called logic gates.

There are three fundamental logic gates and each logic gate can be represented as a symbol.

So the first one on the left-hand side is the AND gate, the one in the middle is the OR gate, and the one on the right-hand side is the NOT gate.

Logic gates take one or more inputs and they produce an output.

So you can see here I've got an AND gate with two inputs and an output.

Inputs and outputs are either true or false, and this is sometimes written as 1, which represents true, or 0, which represents false.

Ah, the class have got some questions.

Aisha says, "What is the actual input?" Andeep says, "I think it's 1s and 0s." And Lucas says, "Is it electricity?" Which of these do you think are correct? Maybe pause the video here and have a think.

Lucas is correct.

The inputs and outputs are all electrical signals with a high or low voltage.

A 1 represents a high voltage and a 0 represents a low voltage.

Time to check your understanding.

All logic gates must have two inputs and one output.

Is this true or false? Pause the video here whilst you have a think.

That's right, it's false.

But why is this statement false? The NOT gate only has one input and one output.

Let's have a look at these logic gates in a bit more detail now.

So let's start by looking at the AND gate.

In an AND gate, the output is true when both inputs are true.

So let's give an example of using AND in a sentence.

So if something AND something, then something.

Can you think of some examples? Maybe pause your video here and have a think.

How did you get on? Did you come up with examples? Remember, both of the inputs need to be true for the output to be true.

So here I've got an example that says, If it is sunny AND it's the weekend, then we can go to the beach.

In an OR gate, the output is true when one or both of the inputs are true.

So let's give an example of using this in a sentence.

If something OR something, then something.

Pause the video here whilst you think of a sentence.

Remember, in the OR gate, either or both inputs can be true to return an output of true.

So here's my example.

If the shop has cola OR lemonade, then we'll buy a drink.

The NOT gate is the gate that only has one input, and the output from a NOT gate is true when the input is false.

So it basically reverses its input.

Let's see if we can put an example of this into a sentence.

If something NOT something, then something.

Maybe pause the video here and see if you can come up with a sentence.

So remember, the NOT gate reverses its input.

So my example is if it's NOT the weekend, then I go to school.

Time to check your understanding.

Which gate uses the same logic as this statement? You can watch TV if you have eaten dinner and finished your homework.

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

Did you select A? Great work.

A is an AND gate, and here in our sentence you can see we can only watch TV if we have eaten dinner and finished our homework.

You're doing a great job so far, so well done.

Time for the next set of tasks for today's lesson.

For Task B, I'd like you to fill in the missing inputs and outputs from these logic gates.

Pause the video here whilst you complete the activity.

How did you get on? Did you manage to fill in all the missing inputs and outputs? So the first one on the top left is an AND gate, and this was missing the output.

Now, both of the inputs here are 1 or true, so the output is going to be 1.

The middle one on the top row is an OR gate.

Again, both of the inputs are 1 here or true, so the output is true.

And then on the right-hand side on the top level, we have got a NOT gate.

Okay, and remember a NOT gate reverses the input.

So the input is 1, which means the output will be 0.

On the bottom row on the left-hand side we've got another AND gate.

Now, this time one of our inputs is 1 or true and the other input was missing, but we did have the output, which was a 0.

Now remember, for an AND gate to return 1 or true, both of the inputs must be true.

So this means that that input that was missing was actually a 0.

Middle one on the bottom row is an OR gate.

Okay, so this was missing one of its inputs too.

Now, the output here is a 1 or true and the input that we were given was a 0, so we know that the missing input must have been a 1 or true because an OR gate needs at least one or both of the inputs to be true to return true.

And then the last one on the bottom row on the right-hand side is a NOT gate, and remember, this is reversing the input again.

So we were given the output of a 1, which means the input must have been 0.

If you need to, maybe pause your video here and make any corrections.

We're now moving on to the final part of today's lesson, where we're going to construct truth tables for the AND, OR, and NOT gates.

A truth table shows the outputs for all the possible combinations of inputs to a logic gate.

You start by writing all the possible inputs in a column.

So here I've got the example of a NOT gate.

And remember, a NOT gate only has one input, so I've only got one input column, and that can either be 0, or false, or 1, which is true.

I then test each input and record the output to complete the truth table.

So we know that a NOT gate reverses the input.

So for the input 0, the output will be 1, and if the input is 1, the output will be 0.

So this is the completed truth table for the NOT gate.

An OR gate has two inputs.

Each input can have a value of 1 or 0, so there are four combinations.

So you can see here this time I've got two columns for the inputs, one labelled as input A and the other labelled as input B.

And the four possible combinations are both 0, so 00, 01, so input A is 0 and input B is 1, and then the reverse, so input A is 1 and input B is 0, and then both inputs are 1.

Time to check your understanding.

How many possible combinations of inputs are there for an AND gate? Is it A, two; B, four; or C, eight? Pause the video here whilst you have a think.

That's right, it's four.

The AND gate has two inputs, so there are four possible input combinations.

What are the four possible input combinations for an AND gate? Is it A, 0, 1, 2, and 3; is it B, 00, 01, 10, 11; or is it C, 01, 02, 11, 12? Pause the video here whilst you have a think.

Did you put B? Great work.

The four possible input combinations for an AND gate are 00, 01, 10, and 11.

Remember that 0 represents false and 1 represents true in a logic gate.

You're doing a great job so far, so well done.

We're now moving on to our final set of tasks for today's lesson, and you're going to construct the truth tables for the three logic gates on the screen.

So on the left-hand side we have the NOT gate, in the middle we have an OR gate, and on the right-hand side we have an AND gate.

Pause the video here whilst you complete the activity.

How did you get on? Did you manage to complete all the truth tables? Let's have a look at the answers together.

So, the NOT gate was partially completed for you, so the only value that was missing was the 0 on the output.

Remember, the NOT gate reverses the input, so when it was 1 as an input, the output will be 0.

The middle one was the OR gate, and the output column was left blank here for you.

So, remember the rule for an OR gate.

If either one or both of the inputs are true or 1, then the output will be 1.

So, first row, both inputs 0, the output's 0.

Second row, input A is 0 and input B is 1, so the output will be 1.

Third row, input A is 1 and input B is 0, so the output will be 1.

And then the last row, if both inputs A and B are 1, then the output will also be 1.

And then the last one, on the right-hand side, the AND gate.

So this one was totally blank, so you had to fill in the combinations of the inputs and also do the output column.

So the first row, if both input A and B are 0, then the output will be zero.

Remember, the rule for the AND gate is both inputs must be 1 in order to return 1 or true.

So, second row, input A 0, input B 1, the output will be 0.

Third row, input A 1, input B 0, will also be zero.

And then the final row, if input A and B are both 1, then the output will be 1.

Did you get all of these correct? Remember, if you need to make any corrections, you can always pause your video here.

You have done a brilliant job today learning a new topic, so well done.

Let's summarise what we have learnt.

Boolean logic uses statements that evaluate to either true or false.

In a computer, logic gates are physical components.

The three fundamental logic gates are AND, OR, and NOT.

A truth table shows the output for all combinations of input to a logic gate.

I hope you join me again soon.

Bye.