in this video we introduce you to a set of rules and laws which can be used to simplify boolean expressions in a previous set of videos we explored the use of kanye maps to simplify boolean expressions however it's also possible to simplify expressions without them by applying rules of boolean simplification this is not only an important skill for exams but also something you may be required to do if an expression contains more than four variables although it's technically possible to use a karnaugh map to simplify expressions with five or more terms it becomes very hard to visualize and therefore increasingly prone to human error we will be going over the five rules that the exam board wants you to know about specifically shown in red we'll also cover the rule of absorption shown in orange although not in spec it will really help you to understand it we'll also touch on the eight general rules shown in yellow again these general rules are not listed in the specification technically but a solid knowledge of them will help you massively grasp many of the concepts across the topic of boolean algebra so these general rules as i'm referring to them are quite basic and can be applied easily without having to use more advanced simplification techniques these general rules fall into two categories and an or here are the four generic and rules remember with and both terms have to be one or true for the result to be one or true and these are the four general orals remember with an or only one term has to be one or true for the result to be one or true so let's work through the rules so they make logical sense to you consider the rule x and zero equals zero well this is an and rule so for the output of an and to be true or one both inputs also need to be true or one regardless of the value that's being held in x the output must be false or zero as the other input in this expression is zero so x and zero must always be zero don't forget x is just a placeholder it could be any variable and also the variables could be swapped and this rule would still work so although the rule may be presented as x and zero equals zero you can use it to match many different expressions consider the rule x and one equals x once again this is an and rule so both inputs need to be true or one for the output to be true or one the rule states that one input is already true or one so the output will have to be the same as the second input in other words if x is zero then the output will be zero and if x is one the output will be one again x is just a placeholder it could be any variable next let's go over the five rules of boolean simplification that are stated in the specification that's de morgan's law distribution association connotation and double negation we will start by going over de morgan's law and in doing so we're actually going to touch on and introduce double negation and association so de morgan's law is a way of simplifying boolean expressions by inverting all the variables and then inverting the whole expression essentially de morgan's law states either logical function and or or may be replaced by the other given certain changes to the expression and using this law allows statements to be simplified so they only use nand or nor gates and this results in simpler logic circuits which in turn makes it easier to build microprocessors as an example solid-state drives are made up of purely nand gates there were two versions of this law so de morgan's first law states that not a and b is the same as or equivalent as not a or not b if we draw the logic diagrams and associated truth tables for these boolean expressions we can prove that the same set of inputs a and b result in the same output so these two expressions are equivalent de morgan's second law says not a or b is the same as not a and not b again the logic diagrams and truth tables prove that these expressions are logically equivalent so let's look at the steps for successfully applying de morgan's law to turn not a or b into not a and not b remember you can only apply this rule to one operator at a time so step one change the or for and or vice versa step two not the terms on either side of the operator step three not everything that has changed now at first it might appear that applying these steps has made the situation worse not better however we can now apply the rule of double negation this rule states that two knots cancel each other out for example not zero equals one and not not zero equals zero finally we simply remove the brackets because they're unnecessary so by following these three steps we have an expression that logically behaves exactly the same way as the start but now we're using an and instead of an or of course we can perform this transformation in reverse by following the exact same steps so let's use what we've learned to simplify the boolean expression x equals not not a and not b or b remember we can only apply de morgan's law to one operator at a time either the and or the or now in this case we're going to convert the and operator into an or so we're applying to morgan's law to the part of the expression shown in red why this part well simply because it has more not operators surrounding it and we are hoping that de morgan's law might provide us some way to get rid of them okay so having picked our turn the and symbol and turned it into an or we went to step two and we not the terms on either side of the operator we then not everything that has been changed we're done with de morgan's law and now our expression contains ores having done so we can easily spot other errors to simplify we can start by removing the double negation we can now apply a new rule the rule of association this rule allows us to remove brackets for an expression and re-group variables the following three expressions are logically equivalent we've got a or b or c a or b or c a or b or c consider these three phrases in english craig and his friends james and tom are coming to the party james and tom and their friend craig coming to a party craig james and tom are coming to a party essentially all these phrases mean the same thing we're just using different groupings finally we can use one of our general or rules we covered in the start of the video which was x or x equals x or to put it another way x or x has to be equal to whatever the value of x is we can apply this to the rule b or b and simplify it down to just b we've simplified this boolean expression from x equals not not a and not b or b to simply x equals a or b while discussing de morgan's law we touched on two other rules you need to know about double negation association so we're going to recap those two rules in isolation quickly and then we're going to move on and explain distribution and commutation so what is double negation if you reverse something twice you end up back where you started so not not a is a double negative and just means a and there's the boolean algebra for it in real life it's like saying i don't not like you which actually means i do like you association this rule allows us to remove brackets from an expression and regroup the variables there are two versions of this rule there's the ore association rule and the and association rule and we covered the real life analogy of craig and his friends james and tom commutation so this rule states the order of application of two separate terms is not important and again there's an on and version so in other words a or b is equivalent to b or a and in the same way a and b is the same as saying bna a real life analogy would be tom and jane are going shopping it's the same as saying jane and tom are going shopping distribution this rule allows us to multiply or factor out an expression again there's an or an and version so with the or version we can say a and b or c is the same as a and b or a and c with the a with the and version we can say a or b and c is the same as saying a or b and a or c so a real life analogy would be you can choose one main course and either a starter or dessert would be the same as you can choose one main course and one starter or one main course and one dessert we have multiplied or factored out the parts of the expression we have covered the general rules as well as the five official rules listed in the spec finally we'll cover one more rule absorption although this is not mentioned in specification a good understanding this rule will really help you when simplifying boolean expressions so absorption what does it mean well where the rule applies the second term inside the brackets can be eliminated and absorbed by the term outside the brackets now to apply absorption there's a couple of conditions that need to be met the operators inside and outside the brackets must be different and the term outside the brackets must also be inside the brackets so if you look at the ore version of this rule we've got a or brackets a and b brackets well the operator outside the brackets or is different from the one inside and the term outside the bracket a must be inside the bracket well it is a both rules apply so we can simplify that whole expression down to a they mean the same thing there's a very similar situation going on with the and version of the absorption rule as you can see on the right having watched this video you should be able to answer the following key question what are the rules of simplifying boolean expressions so just before we end this video we want to make you aware of our freely available boolean algebra cheat sheet this is a double sided cheat sheet that comes in a4 or a3 version which can be used as posters and it covers all the information on boolean algebra the various logic gates truth tables definitions and a lot more material we'll be going over in future videos all in one handy double-sided sheet you can find this over at student.craigandave.org just scroll down to where it says a-level revision if you select that you will see ocr a-level revision including a whole bunch of free resources including these cheat sheets you can click download no subscription logins required and you'll get access to this cheat [Music] sheet you