YTread Logo
YTread Logo

102. OCR A Level (H046-H446) SLR15 - 1.4 Logic gates & truth tables

Mar 17, 2024
In this video we review the use of

logic

gate diagrams and

truth

tables

, so here we see an example of a

logic

diagram created using a selection of

gates

and/or not, also sometimes called a circuit diagram, so let's review the different logic

gates

and

truth

tables

for boolean operators you need to know for the exam, this is the symbol for no gate and no gate just inverts the input, so if the input a is zero, we mean false or off, then the output is true or on and we can see it shown here and there is the nice simple truth table in reverse: nice simple logic gate, this is the symbol for a gate and the output of the gate is true if both inputs they are true; otherwise the output is false, so here we have zero and zero. as our input, then the output is zero zero and one for the inputs the output is still zero one and zero the output zero only in the case where a and b are one is the output one this is the symbol of a gate o and a o the The output of the gate is true if at least one of the inputs is true, otherwise it is false, so here we have zero and zero as inputs because both are zero, the output is zero, but in all other cases it will be true zero. o one is the input the output is one one or zero the output is one and one and one the output is one and finally the symbol of an xor gate now this is an exclusive gate o so the output is true if one and only one of its inputs are true, otherwise it is false, then we have zero and zero, well, if both inputs are zero, the output zero, we have one of the inputs output like one here, zero and one, so the output is one, we've inverted it, so now we have I have a one and a zero, so it's one, but this is where it differs from a gate or both inputs are one, so the output goes back to zero, so So there is a quick summary of the four doors that are mentioned in their specification along with what they are. is called and the associated truth tables below, so how to remember the different logic gates, or we can think of the curve on the left of an o gate that fits around the o of an o x, or just think of it as the same way, but we have the extra line that runs through the middle of the ore we have a door and that's nice and easy, we can think of it as fitting perfectly around the capital letter d of a door and and not if we turn the word not in its In the On the other hand, the catalytic t fits nicely into the base of a gate, so it's just a good summary of everything we've learned up to this point.
102 ocr a level h046 h446 slr15   1 4 logic gates truth tables
We have English on the left. There we have the schematic version of the logic gate, we have the symbol that OCR uses when writing this in boolean notation and alternative notation that you can see in other videos and textbooks. These would be accepted on the exam, but ocr will not use them, so a quick note from the exam board, the ocr clarification document, states that candidates should be able to construct logic gate diagrams from a boolean expression and vice versa. , and candidates should be able to construct truth tables from construction expressions and logic gates, so Boolean expressions, truth tables and circuit diagrams are all alternative ways of actually representing the same thing to make sure you are completely ready for the exams, you should be comfortable with at least one of these three and be able to produce the other two from it, so let's try to complete the truth. table for this logic diagram the first thing we need to do is create columns for each of the inputs a b and c then we need to list all the possible combinations the easiest way to do this is to count in binary from zero zero zero to one one one in other words we are counting from zero to seven, you then need a blank column for any provisional output or input and a column for the final output, so we have the output d, which is the result of a or b, which is then converted to one. of the inputs for the final gate and finally we have the output of the entire logic diagram.
102 ocr a level h046 h446 slr15   1 4 logic gates truth tables

More Interesting Facts About,

102 ocr a level h046 h446 slr15 1 4 logic gates truth tables...

We take each row in turn working through the logic gates in order, so we start with the o gate on the left if we consider the first two rows. a is zero and b is zero both rows would result in the output d being zero because it is a gate or remember a gate or at least one of the inputs must be one for the output to be one in the next two rows a is zero and b is one, both rows would result in d being one and the next two rows a is one and b is zero, so both rows would result in d being one and the next two rows a is one and b is one, so Both rows would also result in d being one.
102 ocr a level h046 h446 slr15   1 4 logic gates truth tables
We're done with the or door, so now we can move on to the and door. This gate has two inputs c and d if we consider that the first row c is zero and d is zero, this means the output e will be zero, both inputs a an and the gate must be one so that the output is one in the next row c is one and d is zero so the output e would be zero in the next row c 0 and d is 1 so the output e is 0. in the next row c is 1 and d is 1. so now we have two ones so the output e would be 1. so zero and one is zero one and one is one zero and one is a zero and one and one comes out as one, so let's try to build a boolean expression from a logic diagram, the final output of the diagram is d, so we start the expression with d is equal to there are two gates feeding into gate o, the first is an and gate with inputs a and b we use the little carrot mountain symbol above to represent and therefore , the gate y can be represented as a and b, as shown here, the output of this gate y is combined with the output of gate no a become the two inputs to gate o, therefore directly after our amb we need to use the symbol o when I have d equals a and b o all that's left is to represent the other entrance to the door o which is not c, we use that symbol there to represent, no, so the final boolean expression is d equals a and b o not c as shown, okay, so try this example yourself, pause the video and write the boolean expression for this logic diagram, then resume the video and check your answer so that We have d equals not c and a or b and notice the usage of square brackets to help apply precedence here.
102 ocr a level h046 h446 slr15   1 4 logic gates truth tables
Another acceptable answer would be no a or b and c. Both expressions are equivalent and mean the same thing. Let's try a final example. Pause the video and write the Boolean expression for this logic diagram, then resume the video and check your answer to make sure that either of the next two Boolean expressions shown are correct. It all depends on which door you started with, so in this example we're going to tie. everything we have learned together so far read the scenario on the left carefully, then pause the video and try to draw the logic diagram, build the truth table and write the boolean expression, so this is the scenario: an alarm A fire alarm sounds if the temperature inside a building rises above 60 degrees Celsius or someone manually activates a fire alarm.
A firefighter should be able to manually turn off the fire alarm regardless of how the alarm was activated, so here is the correct logic diagram, let's analyze the scenario to verify that it is correct, we must start By testing various inputs to work with the logic, let's start with all the inputs as zero or force, in other words, temperatures below 60 degrees Celsius, the alarm fire alarm has not been activated and a firefighter has not manually turned off the alarm if the temperature rises. above 6 degree centigrade the fire alarm should activate, we can see that if we set the temperature input to one or true then both inputs to the door and are one or true and the final output is one or true which means that the fire alarm is activated if the fire alarm is activated manually, it should also be activated and this results in the same situation as before, once again the final y output of the door is one or true and the alarm of fire is activated, we must also check if the fire alarm still sounds. off if temperatures above 60 degrees and the alarm is manually activated, this still works as we are using a door or at this stage and only requires at least one of the inputs to be true for the output to be true now yes I would use a xor door at this point the alarm would not activate, a quite dangerous situation in this scenario, we must also verify that regardless of the entrances to the door or, a firefighter can manually turn off the alarm, we can see.
This works if we set the input of the not gate to 1 true, its output becomes zero false and therefore the final output and the gate output zero, effectively turning off the alarm. Now let's change our logic diagram to a truth table and a Boolean expression we started with. By creating a column for each input, in this case a b and c, we then need a blank column for any provisional input and the final output, we need a column for the output of a or b, we will call it e, we also need a column. for the output of no c call that f and you can substitute any letter you want here for the various inputs and outputs and we have our final output d which is e and f, then we need to list all the possible combinations, the easiest way to do this. is counting in binary, so we go from zero zero zero to one one one from zero to seven.
Then we complete the part of the truth table that represents the o-gate. Remember that if a or b is one, then the output is one. and you can see that we have done that here below we complete the part of the truth table that represents the gate not remember if c is zero then f is one and vice versa and you can see that we have done that below we complete the part of the table of truth that represents the gate and remember both inputs to the gates y, that is, e and f must be one for d to be one and we have shown that there and here is the Boolean expression for the truth table.
The expression shown is correct, it all depends on whether you choose to start with the door or not. After you have watched this video, you should be able to answer the following key question: How do you translate a logic gate diagram to its associated truth table and boolean? expression and vice versa, so that's all you know for the exam. We're just going to cover two other logic gates that aren't technically in the spec, but you should actually know them for a

level

and you would certainly need to know about them. them, if you're doing something deeper with boolean logic, for example, in college, then there are all the different logic gates that you need to know for the exam y or no or xor, but you can see that we have another two here directly below y and the which is not the first one here on the bottom left is the nand gate which means no and it's like putting together an and gate followed by a not gate, it just inverts the output of an and gate, so if the and gate generated a gate nand would now output zero and vice versa, the other gate is a nor gate and as you've probably guessed this is just a no gate or it's like having all gates followed by no gate, whatever comes out of your gate is reversed so that if the o gate discarded at zero, the nor gate would therefore discard a one.
These look very similar to the and and or doors only with a circle at the end. The reason these gates are so important is that they are actually known as universal logic gates, so nand and nand are also not universal logic gates, meaning you can create the logic of all other gates using only combinations of a gate and or only combinations of a gate nor, so just before we end this video we want to tell you about our freely available boolean value. Algebra Cheat Sheet This is a double-sided cheat sheet that comes in A4 or A3 version that can be used as posters and covers all the information about Boolean algebra, the various logic gates, definitions of truth tables and lots more material to be reviewed in future videos, all on one handy double sided sheet, you can find it at Student.craigandave.org, just scroll down to where it says A

level

review.
If you select that option you will see the level review A for OCR, which includes a lot of free videos. Resources including these cheat sheets. You can click Download. No need to log in with subscription and you will have access to this cheat sheet.

If you have any copyright issue, please Contact