Welcome to the second video on Boolean logic and in this video I would like to expose you to the laws of logic. Now we know now the different operations, but like with everything else in mathematics, there has to be some sort of rule that governs these operations. So let's go through these loads of logics. The first load that I would like to mention to you. It's called this double negative. Basically, what happens if I apply? The negation or the not? Twice to the same input. But think about it, what is not not P? But if P is true then not P is force and not force is true. So I end up with the origonal value that I started with and remember that these three. Lines together it's not just simply equal, is logically equivalent, so it doesn't matter if I write not not P or Pi. Am talking about exactly the same thing, so they are very, very closely connected. That was the first low. Let's look at the next loop, which we call the important low. Now this is important. Low gives us some information about what to do. If I applied the operation the same input. So P&P. What is that going to give me? Well, P&P always going to give me PY. If P is true, then true and true gives me true, which is what P was. And if P is force than force and force gives me force which is again what P was. How does that change if I have got the OR operation? P or P, but doesn't really change because I end up again with the same thing. True or true gives me true. Which was P1 force or force again gives me force which was P. Let's look at the identity low and this low. Now talking about what happens if I combine together and input with a true or false value. Soupy and true. What is that logically equivalent to think about it? If three is true, true and true will give me true, which was the same as P. But if P is force force and two gives me force, so it doesn't matter if P is 2 or 4. If I combined together P with an with a true using the end operation, I always going to end up with what P was. This true doesn't really make any difference in that what happens now? If I use P or the force symbol in here, Now if P was true, two or four's give me the true. But if P was forced force or force again gives me the force. So again I'm going to end up with what P was soapy or force is logically equivalent to pee. Now these loads of logic are really helpful because if you have got a long complicated logic sentence and you want to make it simpler. These are the rules. These are the laws that you can apply to break that complication down and see a little bit easier what is actually going on. The next load is the only elation. And the only elation is kind of telling you when would your input on Hill eight disappear. So if you had called P. And force. Remember. Once you have got force in the end gate, which was two types on the same pipe. It doesn't matter if P is on or off. Water won't go through, so this is always going to be force. And what happens if you have got P or true? Basically, this is when you add two branches of the water and it doesn't matter if piece turned on or off the water will always be able to flow through the other branch, so this is always going to be true. The next low is the inverse low. So what happens if I add together P and not P? Well, if P is true then not P is force. And two through an force gives me force. But what happens if P is force if P is force? Then not P is true, but. False and true are still force. So in this case I'm always going to end up with a force answer. And what happens if I have got P or not P? If P is true, not B is force, but remember one of them is true, so I'm going to end up with a true sign in here. If P is false, then not paying history. So again I have got a true sign in here, so I will be able to get through with the water, so this is always going to be true. Next, look commutative. You probably familiar with this term. You might have heard it addition and sub multiplications are being commutative and in there. Basically what you meant by is that 2 + 3 is same as 3 + 2 or 2 * 3 is the same as 3 * 2, and that's exactly what we mean by commutative in here. P&Q is the same as Q&P and I can also say that. P or Q is exactly the same as Q or P, so the operation in which I put these inputs in doesn't make difference as far as the output concerned. Another load that you probably familiar with from algebra is associative life. Remember that you could use the brackets and you can combine the brackets as long as the same operation is concerned. So what I mean by B&Q? And R is exactly the same as P&Q&R. Or if I apply to the operation. P or Q. Or are is exactly the same as P or key or R? So as far as I'm using exactly the same operations, doesn't matter where I place the bracket, the bracket can be flexibly placed an it's again sometimes quite good to know to move around and be able to manipulate these expressions to simplify them. One more low that could be familiar from algebra is the distributive law. And what the distributive law tells you that is P&Q or R can be written as. B&Q or P&R. So what's going on in here? Your end operator distributed amongst the two other inputs and your or operator now. Become in between the brackets. And what happens if I change these? Operators if I use the OR here. And the end here. This is the same again. P. Or Q. And P or R. So again, I can distribute my or operator. Into the brackets and I can keep the end operator between. The brackets this is similar to what happens in mathematics. If you remember 2 * 3 + X, you can rewrite it as 2 * 3 plus. Two times the X. OK, so you're plus now here become. The one in the middle and the multiplication distributed over the addition. Now I have introduced you to quite a few laws of logic. In a further video I will show you the rest of the lows.