Hey, guys, what's up?
So in the last video, we're talked about relational operators and this video, do we will talk about
logical operators?
OK.
So what happened is many times we have to check eager to then B and Eagle Agency, for example, in
case of finding the largest of T numbers.
I have to check this condition for a being the largest number so I can perform this with the help of
relational operators.
Similarly, this is also relational operators.
But this thing is used to combine two billion values.
OK, so we.
So we will use two and percent symbol.
OK, so logical operators are used to combining two boolean values.
OK.
So this whole condition will be true if this condition is true and this condition is also true.
And if I am, I'll give it one of them being true.
I will use Eger then B or eager DNC.
OK.
So this whole condition will be true.
If this is true or this is true or both of them is true.
OK.
So these are the two main operators, domain logical operators to ampersand and double bypass.
We also have a tarried operator, which is negation.
So this whole expression will be true if A is not greater than articles to be.
OK.
So we have three operators.
These two are the main logical operators.
This is also a logical operator, but it is very rarely used.
So if I want both being true, I will use and but if I am OK with one of them being true, then I can
use double bypass.
OK, so let's see an example.
Let's name it
logically, not CBP.
Hedging, glued your stream.
So I would take two numbers and A, comma, B, comma, C, and I would take value and Bertran to use
it.
Suppose I want to check.
Is a the largest number.
So Boole is a largest.
So I have to check to condition Asiad bigger good then be.
And it should be good to then see you also.
OK.
So for this and operator of all this and where to allow use to impersonate.
So if A good then B and eager, then C, then only this whole expression will be true.
We'll see you out as a largest.
OK, so let's send it.
Suppose the value of a 10 B's two and C's T.
So when is getting printed?
So heavy Kansi then is there then, too, and then as well.
Then three.
OK.
So bored ego then B and ego Danzy bored.
This condition are true.
So is the largest is containing through and through is getting printed.
So let's send it one more time.
Suppose the value of A is forward, the value of B is to and the value of these five.
So zero is getting Brender.
So in this case, is Gordon B for his good dental, for his dental, the condition is true.
But food is good.
Then five, this condition is false.
So this is true.
This is false.
Overall, my result is false.
OK, force means zero and zero is getting printed.
So if I am OK of it, either one of them being true.
And Lane and here a fine, we'll give it either one of them being.
So I will use double pipe.
OK, so let's send it.
So.
OK, so.
Now, this is good.
Suppose the value of phase for the value of B is to add the value of C is five.
So this part is the largest number is for the largest number?
Obviously, no.
And the second part is for then two.
Yes.
The condition is true.
So in this case, this condition is true.
And this condition is false.
So only so total.
And in total, my dessert will be through.
OK,
now let's see negation also.
See old.
Negation of a list, then a good, then particles.
B.
OK, so let's it.
Four, five, three.
So far, it's not the largest number, our part is zero, but four is good.
Then three to the output is one.
And the last condition eager Danica's was to be so is for less than just a second.
So this whole expression is coming out to be true.
Nettie's Eger then articles to be should be false.
So is Fortgang identify if guerdon or close to five known the condition is false and overly and in total,
this whole expression will be through.
OK.
I'm explaining one more time, so eager then our request to be
so this expression is false because Ford is not good.
Then it goes to five, but there's a negation operator.
So this whole expression will become through.
Okay, so that's why one is getting printed here.
OK, guys.
So that is all for this video.
I will see you in the next one.
And next video, we will discuss about bitwise operators.
OK.
Thank you.