hello everyone I am pradnya in this video we are going to study chapter 3 Boolean logic in this chapter we are going to study different types of gates different types of logical operators different types of theorems on the Boolean logic so let's get started let's try to understand some of the terms related to Boolean Logic the first one is binary decisions every day we have to take some decisions for example should I get up at six o'clock should I study computer today should I watch web series for all these type of questions we have answer in the form of yes or no or we can say true or false so the decisions which contains answer in the form of yes or no or true or false are called as binary decisions and the values yes or no or true or false are called truth values for true we can write even yes or one also and for false we can write n that is no and 0. the next term we have to understand is truth table here we have the different combinations for the different variables and we will get certain result so it is a table which represent all the combinations and the possible result for that combinations when we are working out on any logical expressions and the result is always true that it is called as tautology and the reverse of it it is fallacy when we are evaluating any logical expression and always the result is 0 or false then it is called as fallacy in match we have studied some arithmetic operators plus minus multiplication and division to calculate Boolean Expressions we have certain logical operators so let's study it logical operators are used to combine logical variables and logical constants what are logical variables we can take any name like x y z and what are The Logical constants we have to work only on 0 and 1 in Boolean logic and logical operator operates on variables and these constants so there are three types of logical operator first is not second is r and the third one is and let's study these operators in detail the first logical operator is not operator it operates on single variable maximum operators are binary operator which works on two variables but some are unary operator so not is also an unary operator it means it works on only one variable and the operation of not operator is called as complementation it complements the variable or constant it means it negates the value or reverses the value and the symbol of not operator is bar so let's try to work out with the truth table you know true table means all the possible combinations for that variable we are working in Boolean algebra so any variable in the Boolean algebra will have only two possible values 0 and 1 and not operator Works only on single variables so let's take one variable X and the possible values of X are 0 and 1 and we are writing here bar means we are applying not operator on X so what it does it negates the value means 0 will be 1 1 will be 0 so it negates the value it complements the value or we can say it reverses the value the next logical operator is or operator it is a binary operator so it works on two variables and it is also called as logical addition we can say it is just like a plus operator that's why you can see here the symbol is also plus like a arithmetic operator as it works on two variables we have to consider two variables here so we have considered X and Y so let's see how the two table for two variable works if we are taking two variables for 2 to the power 2 equals to 4 so we will get four combinations if we are working on three variables means eight combinations we will get so now we are working on two variables so four possible combinations we should write here in the truth table so how we will get the combination you can see here x has value 0 and 1 and y will have the value again 0 and 1 because we are working in Boolean algebra and every variable will have only two values so how you want to write the combination it is up to you so 0 with 0 0 with 1 1 with 0 and 1 with 1 you can write in whichever way we want but to keep in mind we always write this combination in this form this is 0 this is 1 this is 2 and this is three if you will check this this is the binary equivalent of 0 binary equivalent of one binary equivalent of 2 and the binary equivalent of 3. now we have to apply the or operator on these possible combinations so keep in mind how the or operator works if any of the input is 1 then the result will be 1 otherwise 0. so let's check here here both the values are 0 that's why 0 here you can see one value is 1 that's why the result is one here also the one value is 1 so the result is one here both are one that's why the result is one so in case of or operator if any input is one the result will be 1 otherwise zero let's try to understand the third operator that is and it is also a binary operator it works on two variables it is just like multiplication so that's why we can call it as a logical multiplication and the symbol is dot let's try to understand the operation of and operator using true table here are two variables and the possible combinations we have taken same every time we have to take the same to avoid the confusion so it is a binary equivalent of 0 1 this is binary equivalent of three now work out for the result in case of and operator if all the inputs are 1 then only the output will be 1 otherwise 0 here the first input is 0 the second input is also 0 so 0 here 1 input is zero one input is one so it will be zero here also the one input is 1 and the one input is zero so we got the zero now for the fourth combination or the inputs are one that's why we got the result one so keep in mind in case of add operator if all the inputs are 1 then only the result will be 1 otherwise 0. hope you have understood the working of different logical operators now we have to study how to solve a Boolean expression using truth table so this is the expression we have and we have to solve this using two table so you can see here there are two variables one is X and one is y so write all the possible combination for x and y and how to write these combinations this is a binary equivalent of 0 this is one this is binary equivalent of 2 and we have to write the binary equivalent of 3. if you have checked my videos on chapter 2 I have explained there how to convert the decimal number to the binary equivalent in a very simple manner so check out that there is a one more way to keep in mind how to write the combination just write two zeros here and two ones and in the next column half of that so 1 0 1 1 1 0 1 1 now what we have to find out first take the first term this is first term and there is a one more term we have here so in this we can see here this is x dot Y and then whole bar so first we need to calculate x dot y dot means it is a and operation so you know how the and operator works if all the inputs are 1 then only the output will be 1 otherwise 0 so 0 0 will be 0 0 1 will be 0 1 0 will be 0 1 1 will be one now we have to calculate the complement of it so x dot y whole bar this is our first term so complement means the negation bar is a not operator you know not operator calculates the complement of the variable so complement means what complement means it will negate the value if it is 0 it will become 1 if it is 0 it will become 1 it is 0 here it will become 1 and 1 will become 0 Now find out the next term so in this term first we have X bar dot y so we need to calculate X bar first X bar means complement of X so first value is 0 so it will become 1 second value is 0 here so it will become 1 third value is 1 so it will become 0 fourth value is also one so it will become 0 so we calculated the X bar in the second term now we have to calculate X bar dot y so this is a and operation between X bar and Y column so check out what are the different combinations we are getting X bar is 1 here 0 here so 1 0 will be 0 you know the and operator how it works if all the inputs are 1 then only the output 1 otherwise 0 so the first input is one second is input is also so 1 so it will be 1 check out for third combination this is zero this is zero so it will be zero now for the fourth combination this is zero and this is one so it will be zero so we've found out the second term also now this whole term we have to find out so what is this term this for we have to calculate it here in this column and the second term we have calculated in this column now there is a or operation between this column one and column two plus signifies or operation so write down this term this is x dot y whole bar plus X bar dot y so check out these two columns so or operator gives the result 1 if any one of the input is one so the first combination check it here the first is one the second combination is 0 so 1 0 will be 1 because 1 input is one so here both the inputs are 1 that's why one here the one input is one one input is zero that's why we'll get one and here both the inputs are 0 so we will get 0 so we got the final answer so in this way we can solve Boolean expression using truth table okay let's solve one more example which will be consisting of three variables so you can see here there are three variables x y z so 2 raised to power 3 equals to 8 so we need eight combinations so there are two ways to write the combinations the first way just write the binary equivalent of the number from 0 to 7 in 3 bits which we have studied in the chapter 2 or there is a one more way to write the combinations for X take 4 times 0 and 4 times 1 and for the next column that is for y take half of it that is 2 times 0 2 times 1 2 times 0 and 2 times 1 for Z again take half of it that is one time zero one time one one time zero one time one now look at this expression just try to simplify it this is one term we have to solve and this is the another term there is a and operation between these three variables and to evaluate it first we need to calculate Y Bar and z bar so let's do it Y Bar and z bar you know in Y Bar there are 2 times 0 and 2 times 1 so the complement of it will be 2 times 1 and 2 times 0. now check out for Zed there is a one time zero and one time one so the complement of 0 will be 1 and the complement of 1 will be zero so in this way we will get one zero one zero one zero now let's evaluate this expression X Y Bar and z bar between these three variables there is a and operation and you know how the and operation works if all the inputs are 1 then only the output will be one otherwise 0 so let's try to find out we need to take X Y Bar and z bar so 0 1 1 will be 0 0 1 0 will be zero zero zero one will be zero zero zero zero will be ultimately 0 then in this column we have all the input combinations at one one here one here also and one in this column also so the output will be 1 and other outputs will be 0. now look at the second term to evaluate this we need to calculate X bar first so in the X column we have 4 times 0 and 4 times 1 so the complement of it will be 4 times 1 and 4 times 0. now let's try to evaluate this term this is X bar y z so let's consider this three columns carefully and apply the and operation on this three column so the First Column we have to take is X bar then we have to consider Y and we have to consider Z so be careful in choosing the columns so 1 0 0 will be 0 and it's all in this way now look at this expression we have calculated this one term and we have calculated the second term also in between these two terms there is a or operation now so let's evaluate the whole expression which is represented by R so let's write here R we need to look at the column here and one more column is here and or operation you know how it works if any of the input is 1 then the output will be 1 otherwise 0 so consider this 0 0 will be 0 again 0 0 will be zero zero zero will be 0 0 1 will be 1 1 0 will be 1 and the rest of the entries are 0 so we will get 0. in this way we have evaluated the Boolean expression using two table you can solve more example to get the practice now let's move on to the next topic that are logic gates Boolean operations are performed by logic gates in computers so what is logic gain it is actually a electronic circuits which operates on the input signals and produces output signal so the gates are divided into two types the first one is basic gate and the second one is derived gate so there are three types of basic gate first is not second one is r and the third one is and we have already studied The Logical operators not or and the and operator so using that operators we are going to design these Gates and there is one more set of gates that are called as derived Gates which we can derive from the basic Gates so there are four types of derived Gates the first one is nor the second one is nand third one is xor and the fourth one is X naught let's study these gates in detail the first one is the nor gate it is also known as inverter gate as it inverts the input we can say negation of the input also all the complementary of the input also and it is a unary operator which means it works only on single input and the result of the not get will be always opposite of the input so this is the logic symbol it looks like a triangle and it always takes a single input if I am giving the input as X I will get the output as X bar as not gate we represent using this symbol bar it resembles the triangle so you can relate this to T and note down this bubble bubble always signifies the negation operation even we can represent this gate using truth table as it is a unary operator only one variable we have to consider in the truth table in Boolean Logic for any variable there are only two values one is zero and one more is one so let's work out on the truth table if I am considering any variable X the value of x can be 0 or 1. if I am applying the not gate on that X I will get X bar so what it will do it will negate the value 0 will become 1 and 1 will become 0 so the not gate reverse is the value the next gate is or gate we have studied the or operator so this gate works on the principle of or operator it takes two or more input because it is a binary operator and in the input any of the input is 1 then it produces the output as one otherwise we get 0. this is the logic symbol of the organ it just resembles a petal if the inputs are X and Y the operation of or gate represents as X Plus y it can take more than two inputs also we can represent or get using truth table also as we are considering two variables so 2 to the power 2 is equals to 4 so we need 4 combinations this is the binary equivalent of 0 1 2 3 or keep in mind there are 2 0 in the beginning and 2 times 1 in the next column we have to take half of it so 1 times 0 and 1 Time 1 in this way we can take the combinations if any one input is 1 the output will be 1 so 0 0 will be 0 see here the one of the input is 1 that's why we got the output one here also one of the input is one that's why we got the output one here both are 1 so the output is one the last basic gate is and gate it also takes two or more input signals and produces a single output the logic symbol of the and gate does resemble D so you can relate to this D so how the and gate looks like it looks like d so if we are taking two inputs the operation we can write x dot y even to simplify it if we are not mentioning anything it is a and operation we can represent the and gate using two tables so we are taking two two variables so four combinations we have to write and if all the inputs are 1 then only we get the output 1 otherwise 0 so check out the combination 0 0 will be 0 here 0 1 also will be 0 because we need all the combinations as one then only the output will be the one here one of the combination is 0 here also same it is 1 0 means one of the combination is 0 so we will get 0 only here you can see in this combination all the inputs are 1 that's why we got the output 1. in this way we studied all the basic Gates first one is not gate the second one is or gain and the third one is and get now it's time to study the different types of derived Gates these are called as derived Gates because we can derive these from the basic gain in that category first derived gate is nor gate it is also known as inverted or see we can derive this nor from or it also takes two or more input and produces a single output so what is the logic symbol for nor no need to keep in mind all the symbols of the derived Gates as these gates are deriving from the basic Gates keep in mind only the logic symbol of the basic gate then we can derive it for the nor gain you need or gate so how the or gate looks like it looks like a petal and now it is nor inverted or means we need to add the bubble as I told you bubble signifies the inversion operation so if we are taking two variables the output will be negation of or means this is or operation and take the bar for it let's try to understand how we can represent it in the two tables so we have four combinations because we are taking two variables here the combinations are same in all the truth table now if we can't do directly the nor operation first go for or and then negate it it's very easy calculate or operation first and just reverse the values so if all the inputs are 0 then the output will be 1 otherwise 0 so we need all the input 0 then only we will get the output 1. so you can see here all the combinations are 0 we got one in other cases we are getting 0 as output the second derived gate is nand gate that is inverted and it takes two or more inputs and produces a single output this is the logic symbol of nand gate as nand gate is derived from the and gate you know the logic symbol of the and gate looks like a letter D now what is the variation here it is inverted of and means you need to add a bubble to it if I am taking the variable x y and operation is represented by x dot Y and the and is negation of and so write the bar here now look at the truth table as we are taking two variables there are four combinations the combinations we have to take same in all the truth table if you don't want to keep in mind the operation of nand gate first calculate and and then negate it if all the inputs are 1 the output will be 0. so to make it easy first calculate add operation and then negate it so we calculated and operation first he what add operation says if all the inputs are 1 then only we will get output 1 and then negate all the values so ultimately if all the inputs are 1 we got 0 according to the definition of the nand gate the third gate is xor gate the exclusive organ it also takes two or more inputs and produces the single output look at the logic symbol of the xorgan this is actually a organ so how the or gate looks like it looks like a petal so we will draw first or gain now it is exclusive to draw this exclusive feature for the or gate just we need to add one Arc in front of it if we are taking two variables X and Y the operation of or we write using plus but for exclusive we have to draw one circle around it so this is the operation of exclusive or the working days if we have odd number of ones in the input then we will get the output 1 otherwise 0 let's look at the truth table these are the four combinations as there are two variables now keep in mind we need or number of ones so here it is no matter of one or it is zero so we got the zero answer here you can see we got the odd number of one the one is once so the output is one here also we have odd number of one so the output is one here we have two ones means it is a even number so we got the output 0. now the last derived gate is X nor gate this is exclusive Norm it also takes two input signals and the logic symbol looks like this try to make it easy first look at this word nor nor means negation of R you know how the or gate looks like it is like a petal we can add bubble to it to make it nor and I told you for exclusive we have to add one Arc in front of it so now this is exclusive Norm if we have input X and Y then we can write as x dot then circle around it and Y so let's look at the truth table how it works on the values so if we have even number of ones we will get output 1 otherwise 0 it is just a positive X or gate there we were checking for odd number of ones here we are checking even number of ones even there is a one more condition if we have all zeros in the input then we will get one so look at this combination we have all zeros here so we got one and here we don't have even numbers of 1 here also we don't have even number of ones and here you can see this is one this is also one so there are total two ones so we got even number of ones so we got the answer one so we studied total three types of basic Gates and four types of derived Gates so let's move on to the next topic the next topic is basic postulates of Boolean logic what are these basic postulates these are the basic operations of the Boolean logic so there are total four postulates that we have to study what is the first one if X is not equals to 0 then it will be 1 if it is not equal to 1 then it will be 0 you know in Boolean logic every variable has only two values what are these two values either 0 or 1 if it is not equal to 0 it will be 1 if it is not equal to 1 it will be 0 simple now let's look at the second postulate this is a or relation you know the working of r these operations you have already studied when we were working out on the truth table for our gate you know in case of or if any one input is 1 then the output will be 1 so these are the combinations the next is the and relation it is also known as logical multiplication these also we studied when we were working out on the truth table for and get you know if all the inputs are one then only the output will be 1 otherwise 0 the next postulate is complement rule you know complement means what it reverses the value or it negates the value and we are working on only two values either one or zero so the complement of 0 will be 1 and the complement of 1 will be zero so these are the four postulates of the Boolean logic next topic is the principle of duality there are three rules you have to follow if you want to calculate the Dual of any expression so from one expression we can derive the another expression by following the principle of Duality what it says we have to change each or sign to and sign then if you have any and sign it should be changed to the or sign and the third rule is replace each 0 by 1 and each one by zero so if you have any or operation it should replace with and if you have any and operation it should get replaced with or if you have 0 it should get replaced by 1 and if you have 1 in expression it should get replaced with 0 so let's take one simple example let's take our combination 0 plus 0 will be always 0 so if I want to find out the Dual of it what we should do in 0 should get replaced with 1 and this or operation should get replaced with and again 0 should get replaced with 1 and we have 0 here also so it should also get replaced with one so you can see here I had one expression and using Duality theorem I got it another expression it was actually a r operation and we have evaluated to one and operation in the next topic we have to study certain law of Boolean algebra so there are total nine laws we have to study and these laws are related to maths those who have studied in maths for them it is very easy the difference is only that that we are working on the Boolean algebra means we are working on the value of 0 and ones otherwise the properties are exactly same so the first one is properties of zeros and one as we are dealing with Boolean algebra then we have indempotence law evaluation law complementary law commutative law associative law distributive absorption and third distribution law this is a main topic of this chapter so one by one we will study all this law and it's very easy so the first theorem of the Boolean algebra is properties of 0 and 1. there are four properties so I have listed here A B C D the properties of 0 and 1 are applicable to or operator also and it is applicable to and operator also so first try to understand about or operator if we add any variable to 0 we get the same variable again similarly this is the property of 1 if we add any variable to 1 we get 1 so we have to prove these property using two table so let's try to understand how we can prove it first variable e0 so this is not a variable this is a Boolean constant so 0 means 0 the next is variable so the x is the variable you know value for any variable in Boolean algebra is either 0 or 1. now what operation we have to apply on this constant and on this variable that is or operation you know or operation if there is any one in the input we get the result 1 so 0 0 will be 0 0 1 will be 1. now look at this column X and look at this column 0 plus X so this is our second column and this is our third column here also we have 0 here also we have 0 here we have 1 and here we have one so both the columns are same that's why we could prove that this left hand side is equals to right hand side now we have to check out the property of 1 so 1 plus X will be 1 so first we have to take this logical constant 1 1 means the value will be 1 next the variable so for variable we have to take 2 value 0 and 1. now we have to perform the or operation on this constant and on this variable and we should prove that it is 1 so let's perform the or operation you know or operation if any one input is 1 we get the input 1 so here also we are getting one so now look at this column 1 plus X you can see here the output is 1 that's why we can say that 1 plus X is equals to 1 hence we have proved this we worked out with the properties of 0 and 1 for our operation now we have to work out the properties of 0 and 1 for and operation what it says when I perform and operation on 0 and x we get 0 and when we perform operation of and on 1 and X we get X so we can prove in the similar way take 0 0 here the value of x will be 0 and 1 and perform the and operation if we have all the inputs 1 then only we get one otherwise we are getting 0 here also if we get all the inputs are 1 then only the one otherwise 0 look at this column this is column 3 and that only we wanted to prove that 0 into X will be zero so hence we proved it now look at this true table here we have calculated 1 into X and we have to prove it is similar to X so this is column 2 and this is column 3 so both the columns are same we can say that 1 dot x equals to X here column 2 and 3 are same so we proved this property [Music] the next law is indempotence law here there are again for or operation and for and operation we have this law so the first one is X Plus x equals to X and the second one is x dot x equals to X so we have to prove this again we have 2 times of X so take X here we have taken X here also and we have to perform the or operation you know any one is one then we get the output is one so we got this value now look at the column X take any X so I will take this column second and we have performed the logical addition on this 2x so we got this third column now look at the output of this two column both are same so we can say that this x is equals to X Plus X so now let's work out for the and operation when we perform the and operation on two same variable we get again the same variable so here x we have taken again one more time x we have taken and then we perform the and operation on this so and operation is that if we have both the input as 1 then only the output will be 1 otherwise we get the zero now look at the second column and look at the third column both the outputs are same so we can say that this x is equals to x dot X let's try to understand the Third Law of the Boolean algebra that is involution law what it says if we take bar of bar for any variable we get the same variable So This Bar Bar gets canceled and we get the same variable so let's take X first then calculate the X bar you know bar means complement or negation of the input so 0 will become 1 1 will become 0 and then again take the bar of that bar so it was 1 here it became 0 it was 0 here it became one now let's find out the result of X and let's find out the result of X bar 2 bar so here we got 0 and 1 and here also we are getting 0 and 1 so from this column 1 and 3 you can say this both the columns are same so we can write this expression and and we proved our involution law also the fourth law is complementary law so again this law is applicable for both our operation and for and operations what this law says when we perform logical addition on the variable and its complement we get one so let's prove it let's take X first let's calculate X bar and then perform The Logical addition on them so for X we have taken 0 and 1 as it has only two values calculate the bar of it 0 will become 1 1 will become 0 and let's perform The Logical addition on these two variables so if any one input is 1 we get the output here also we have 1 so we get the output one now look at the column 3 we have the answer as one in both the places means it is giving output as 1 so we have proved that X Plus X bar is equals to 1 actually it is a tautology as we studied in the beginning that if any Boolean Expressions displays the reason as 1 it is called as tautology and let's study this complementary law how it works for add operation if we perform the and operation on the variable and its complement we get 0. so let's draw the truth table for this expression first I have taken X then X bar and then perform the logical and on these two variables so the value of x is 0 and 1 then find out the complement of it it is 0 will become 1 1 will become 0 and now apply the and operation if both the inputs are 1 then only the input will be 1 otherwise 0 so we got the zero now look at this third column actually we are getting the output 0 as we needed to prove we proved that and this result is known as policy you know policy means if any expression displays the result as 0 it can be called as policy foreign of the Boolean algebra is commutative law so what it says X Plus y equals to Y plus X we have studied this in maths also when in case of addition and multiplication we can change the order of that variables to prove this law let's take a variable X first then y then perform The Logical addition on X and Y and then perform The Logical addition on Y and X so these are the combinations we are getting for x and for y and now perform The Logical addition you know in case of or operation if any one input is 1 we get the output 1 otherwise we get 0. now perform or operation on Y and X we will get the same result so from the column third and fourth we can say X Plus Y is equals to Y plus X so we proved this law now let's work out this law for and operation for and operation also we can change the order so let's write the combination for X these are the combination for y now apply add operation on X Y you know the and operation if both the inputs are 1 then only the output will be 1 otherwise in other all cases we will get 0. now let's perform the and operation on Y and X still we are getting the same result so from the column 3 and 4 we can say that x dot Y is equals to Y dot X because both the columns are same okay let's move on with the sixth law that is associative law it is also applicable to the general algebra and even as Boolean algebra associative law says when we change the order of evaluation by changing the brackets we get the same result first we are calculating y plus Z and then adding the result to X but if we calculate first X Plus Y and then add result to Z we get the same result in this expression we have total three variables or 2 raised to power 3 will be 8 so we will get 8 combinations and we studied how to take these combinations first four times zero four times one in the next column 2 times 0 2 times 1 and for Z again half of it one time zero one time one now first let's evaluate the left hand side of this expression in this we will evaluate first this bracket part there is a or operation between Y and Z so take the Y column take the Z column and apply the or operation on it so or operator gives 1 Whenever there is a 1 in the input so we got this result now let's apply our operation between X and Y plus Z so this is y plus Z this is X Now find out the combinations and write the output wherever there is o one you will get the output 1. now let's evaluate for right hand side in case of right hand side in the bracket we have X Plus y so let's apply our operation on X and Y so take X column take y column and apply or operation so you can see in these two combinations only we have all the zeros so we got 0 in other the combination there is a one in one place so we got one in other columns now we have our operation between X Plus Y and Z so already we have calculated X Plus y now let's take this Z variable and apply all operation between Z and X Plus y after applying we got this output now check out the output of left hand side and right hand side term if we will look at the column 5 and this is the column 7 we are getting same answer so in this way we can say that X Plus y plus Z is equals to X Plus y plus Z and the same law will be applicable to the Dual of it you know what is the Dual when we replace all the or operation with ADD it can be said that it is a dual of that expression so here we are replacing all the or operation with and and hence the associative law for an operation is also proved foreign let's try to understand the next law that is distributive law if anything is common outside the bracket it means it is applicable to the terms inside the bracket in this expression we have three variables so let's take the three variables x y z and the combinations for 8 4 times 0 4 times 1 then half of it 2 times 0 2 times 1 and again half of 8 in the next column 1 times 0 and 1 Time 1 so let's solve for the left hand side first in the left hand side we have first in the bracket that is y plus Z so let's apply our operation on these two column so we can notice in the input combinations there are all zeros in only these two combinations so we will get 0 for this for other combinations we are getting answer as 1 because there is a at least one in the input combination now we have to perform and operation between X and Y plus Z if we look at these two columns here only we have both the input as 1 that's why we are getting Answer 1 and for other combinations we are getting output as zero now let's evaluate the right hand side for right hand side first we have to evaluate x dot y that is and operation between X and Y so let's look at these two columns X and Y if we see only here we are getting both the inputs as one that's why we are getting output put as one for other combinations we are getting 0 because there is a zero now let's find out the and operation between x and z for x and z we have here both the input as one for these two combinations that's why we are getting answer as 1 for rest of the combinations we are getting 0. now to evaluate right hand side we have to perform or operation on these two terms so in these two columns here in the beginning all the combinations are zero so we are getting output as 0 here at least one input we are getting that's why the output we are getting as one now we have to compare left hand side and the right hand side left hand side term we have calculated here in the fifth column and right hand side term we have calculated in the eighth column so if we compare both the columns are same so we can say that this we have proved the B is the Dual of a so B is also proved now let's find out the next law that is called as absorption law absorption loss is X Plus x dot y equals to X let's prove this law using truth table so there are only two variables so 2 times 0 2 times 1 is our combination for the next column 1 times 0 1 times 1 the half of it now first we will evaluate x dot y so perform add operation on this two column we will get this result because all the inputs are 1 here so answer will be 1 for other combinations we are getting 0 now perform the or operation with x so for this column both the inputs are 0 so we got the output as 0 here at least one we have that's why the output is 1. we have evaluated the left hand side now let's try to compare with the X column so if we look at the column 1 that is X and if we look at the column 4 that is our left hand sign both the columns are same that's why we can say that X Plus x dot Y is equals to X and the Dual of it is x dot X Plus y equals to it in the same way you can prove the Dual also so let's move on to the last law the last law is called as third distribution law it says X Plus X bar dot Y is equals to X Plus y so there are two variables so you know the combinations how to take it first we will try to evaluate the left hand part in that let's try to evaluate this term first and in this term also we need to calculate first X bar so X bar means the negation of X we got this result after evaluating X bar now there is a and operation between X bar and Y so let's consider this x bar and Y when you will perform add operation you are getting this result now let's calculate or operation between this term and X so we have to take this column and X column and perform or operation after performing or operation you will get this result now let's look at the right hand term here we are performing or operation between X and Y now try to compare the left hand side and the right hand side so left hand side we are getting in the column this column is fifth column and right hand term we are getting in this column this is the sixth column when we compare fifth column and the sixth column the result you can see is same so we can say that this law is crude so in this way we study different laws on the Boolean algebra there are total nine laws maximum law what we studied now are just similar to the general algebra which is applicable to the Boolean algebra also the next law is very important law that is D Morgan's law which you may study in the graduation even in the post graduation also that too in the subject of electronics computer and maths there are 2D Morgans law first we will try to understand what is D Morgan's first law so what is the hint or tagline of the D Morgan's law break the line change the sign look at this expression X Plus y whole bar is equals to X bar dot Y Bar so we are breaking this line to the individual element and we are changing the sign from R to end to prove this law we are going to use sum of the laws out of that nine laws what we have studied to prove this theorem we are going to assume that this theorem is true and we will apply this theorem in one of the basic theorem of the Boolean algebra that we have studied just now so let's take the complementary law you know the complementary law says X Plus X bar equals to 1 so I am going to use this law X Plus X bar equals to 1. if this law is true for the variable X it should be true for other variables so I am going to assume one variable p and the value of p is equals to X Plus y this complementary law should be true for this variable also so I will get this statement P plus P bar equals to 1. now let's substitute the value of P so what is the value of P X Plus y then plus and here we have P bar means X Plus y whole bar is equals to 1 now we have to prove this left hand side is equals to right hand side so let's start with left hand side so our left hand side is X Plus y plus X Plus y whole bar as we assumed that these D Morgan's first theorem is true we will apply the D Morgan's theorem on this term so what the D Morgans theorem says break the line change the sign so we are breaking the line and changing the sign so we got the new term now to solve further I am going to use the distributive law here so the distributive law means if anything is common outside the bracket it is applicable to the both the terms inside the bracket so let's apply the distributive law we will get X Plus y plus X bar this is our one term in between we have ADD operation now let's multiply again X Plus y to the next term so X Plus y plus y bar now I am rearranging this term I am writing X Plus X bar next to each other and then y here already these terms are together now if you will look at this X Plus X bar we can apply complementary law here X Plus X bar is equals to 1 so I am going to replace here 1 plus Y and in this bracket also we are getting y plus Y Bar so X Plus 1 it will B now you know this property of 1 I am going to apply here 1 plus X will be 1 so 1 plus y will be 1 and then here in this bracket also 1 plus X will be 1 here there is a and operation between 1 and 1 if both the inputs are 1 means the output will be 1 in case of and operator ultimately we got the right hand side so we started with this left hand side and we proved this right hand side it means this law is applicable to complementary law so we proved actually the first part hope you have understood this first part now we have to prove the second part also in the beginning we have taken the complementary law for this or operation now we have to take the complementary law for the and operation so this is our second part that we have to pronounce it will be x dot X bar equals to zero in the same way I am going to assume that it is true for other variables also so we have assumed variable P so it should be applicable to the variable P also so we will get P dot P bar equals to 0 now we have to substitute the value of p in this complementary law and prove it so let's do it now replace the value of P here and you know p is X Plus y so we will get X Plus Y into X Plus y whole bar is equals to 0. so so we will start with the left hand side of this equation and we will prove the right hand side so let's start with left hand side in the next step I am going to apply the D Morgan's law and you know D Marble's law says break the line and change the sign so we got here x bar dot y bar now I am going to use one law here that is associative law in associative law we can change the order of the operation so I am going to shift this term this side and this term to right side so we will get X bar dot Y Bar and then dot X Plus y now I am going to apply distributive law if anything is common outside the bracket is it is applicable to the both the terms inside the bracket so let's solve it I will get X bar dot Y Bar dot X then hold down will be applicable to this y also so X bar dot Y Bar dot y now rearrange the term we will get x dot X bar dot Y Bar rearrange these terms also X bar dot y dot Y Bar according to the complementary law x dot X bar equals to 0 so I am going to place here 0 so we will get 0 into Y Bar and for the next term we have y dot y bar again it will be 0 so X bar Dot 0. now according to the property of 0 0 dot X will be 0 so any variable dot 0 will be 0 so 0 into Y Bar will be 0 plus X bar into 0 will be 0 so 0 plus 0 will be 0 you know if both the inputs are 0 we will get the answer 0. so in this way we got right hand side we proved the second part also and hence we proved the D Morgan's first theorem which was X Plus y whole bar equals to X bar dot Y Bar the proof of the D Morgan's law is very easy you need to keep in mind only two to three properties of the boole in algebra let's understand the D Morgan's second theorem it is a dual of first theorem we proved the first term X Plus y whole bar is equals to X bar dot y bar now this second theorem is the Dual of first theorem to prove the second theorem also we are going to apply the same method as first theorem so we are going to use the complementary law we are going to assume the second theorem is prude and going to apply on the complementary law to prove this theorem we will assume this law is proved and we will apply it on the complementary law so there are two complementary law one for or operation and one for and operation in the D Morgan's first theorem we assume the value of p as X Plus y because we had to prove this now we will assume the value of p x dot y as we have to prove this side so the complementary law is applicable to this variable also when we apply the complementary law on variable P we get p plus P bar equals to 1 as first complementary law is X Plus X bar equals to 1. now substitute the value of p in the complementary law so x dot y equals to x dot y whole bar equals to 1 we replace the value of P here now let's start with left hand sign and we will prove it is equals to 1. in the next step we are going to apply the remorger second theorem for this term so we will get x dot Y and the D Morgans theorem says break the line and change the sign in the next term I am going to change the order of these two terms so this the second term I am going to write as the first term and the first term I am going to write as a second term by applying the associative property now let's solve it with the use of distributive law so we will get X bar plus Y Bar plus X and for the second term we will get X bar plus Y Bar and here we have plus y now I am going to rearrange this term so X Plus X bar I'm writing together and then Y Bar arrange the second term also X bar plus y plus Y Bar you know X Plus X bar is equals to 1 according to the complementary law so I am going to replace here 1 1 plus Y Bar and again we have here y plus Y Bar so according to the complementary law we will get 1. now I am going to apply the property of 1 it says 1 plus x equals to 1 so 1 plus Y Bar will be 1 x bar plus 1 will be 1. both the inputs are 1 means the output will be 1 in case of and operator so here this is actually our right hand side so we proved the first complementary law now similarly we have to prove the second complementary law second complementary law is x dot X bar is equals to zero so we assume one p here so it is applicable to P also and you know the value of P we have substituted that x dot y so it is x dot y dot x dot y whole bar equals to 0 so let's start with the left hand side so the first term is x dot Y and I am going to apply the D Morgan second theorem which says when we write the complement to the individual term we change the sign so we get this term now solid further by applying the distributive law so we will get x dot y dot X bar plus x dot y dot Y Bar so I am going to rearrange this term x dot X bar dot y Plus x dot y dot Y Bar this is in the proper order now x dot X bar is equals to 0 as you know this is a complementary law so 0 dot y in the second term also y dot Y Bar will be 0 so x dot zero according to the property of 0 if any variable get multiplied with 0 we get the 0 so here 0 dot y will be 0 plus x dot 0 will be 0 and you know if we perform or operation and both the inputs are 0 we get the zero so ultimately here we prove the right hand side in this way we proved the second part also so we proved the first complementary law we proved the second complementary law hence we can say this D Morgan second theorem is true which was x dot whole bar equals to X bar plus Y Bar both the D Morgans for is very easy just try to keep in mind some of the laws of Boolean algebra he can apply the D Morgan's law to find out the complement of the expression so let's consider this first example A plus b whole bar now we have to calculate the complement of this expression so the complement will be a plus b bar and we have to complement of it so whole bar now let's apply the D Morgans theorem which says we can break the bar and we can change the sign so according to the rule we will get this expression now let's solve further a bar dot b c because bar bar gets canceled if we take bar to bar you know the involution property a bar to bar means we get the same variable okay let's do one more example this is the second example so we want to calculate the complement of this so it will be a B plus b c Bar D Bar and we have to take the complement of it so let's solve it further so according to the D Morgans theorem we have to break the line means we have to separate the bar to the individual term and we separate it we have to change the sign so R will become and and here we will get B Bar C bar 2 bar and for D also it is bar 2 bar so in the next term we can cancel that bar and it will be B bar so bar bar gate cancel or you can say we are applying invaluation law so involution loss is X bar to bar means again the same variable so we will get C and D in this way we can apply the D Morgan's law to calculate the complement of a expression okay this is also one more interesting topic where we have to draw The Logical circuits for the Boolean expression so let's try to understand how to do it here we have one Boolean Expressions first look at the expression which is inside the bracket we have our operation between variable A and B so which logic gate we are going to use first or so there are two inputs here that is a and b and we have to draw the logic gate or you know it looks like a floor petal so draw the or gate so we got the answer a plus b now there is a and operation between a plus b and c so we need one more input that is C we can proceed this line further and then we have and operation in between this instead of drawing such a big big gate better you can do like this just narrow down that line and then draw the gate so and gate looks like a letter D so finally we got this expression a plus b dot C okay let's try to draw one more logic circuit for this Boolean expressions if it is a complicated Boolean Expressions try to break down into terms and then draw the gates for it the first term is a b so in between we have and operation so the inputs are a b and and operator looks like d letter so the input is a b we got finally a dot b now look at the second term it is a c bar so first we need to calculate that bar so the first input is a which is a simple input but the second input is C but first we have to calculate the bar of it so we have to apply the not operator not operator looks like a triangle with bubble so we got this a c bar now we can apply the and operation between them and operator looks like letter D so finally we got a c bar now look at the third expression there are total three inputs the first input is B bar so let's take first B and apply not operator so we got B bar now look at the second variable it is a bar so let's take a input and draw the not gate again to get the bar of it now the third variable is simple variable now in between them we have and operator so we need to draw the and gate in between this so just narrow down this so that we can draw the D shape for the and operation now we got all these three terms in between them we have our operation so to draw that again narrow down it so that we can draw the or operator so or operator you know it looks like a petal so draw it so finally we got this expression you can write here the whole expression a B plus a c bar plus b bar a bar C try to solve more and more examples in this way we completed this chapter we study different types of logical operators logical Gates different laws which are applicable to the Boolean algebra and one more important topic is D Morgan's law it was very interesting chapter hope you have understood all the concepts if you have any doubt write in the comments Below in the next video we are going to study the chapter number four introduction to problem solving with that chapter we are going to enter the fascinating world of programming come along with me to the journey so keep studying see you in the next video foreign