1
00:00:01,570 --> 00:00:03,250
Hey, guys, what's up?

2
00:00:04,000 --> 00:00:10,090
So in the last video, we're talked about relational operators and this video, do we will talk about

3
00:00:10,510 --> 00:00:11,620
logical operators?

4
00:00:12,810 --> 00:00:13,090
OK.

5
00:00:13,670 --> 00:00:24,680
So what happened is many times we have to check eager to then B and Eagle Agency, for example, in

6
00:00:24,680 --> 00:00:27,070
case of finding the largest of T numbers.

7
00:00:27,470 --> 00:00:33,950
I have to check this condition for a being the largest number so I can perform this with the help of

8
00:00:33,950 --> 00:00:34,970
relational operators.

9
00:00:35,450 --> 00:00:37,760
Similarly, this is also relational operators.

10
00:00:38,300 --> 00:00:44,120
But this thing is used to combine two billion values.

11
00:00:44,710 --> 00:00:46,690
OK, so we.

12
00:00:47,090 --> 00:00:49,460
So we will use two and percent symbol.

13
00:00:50,600 --> 00:00:54,350
OK, so logical operators are used to combining two boolean values.

14
00:00:55,430 --> 00:00:55,660
OK.

15
00:00:56,000 --> 00:01:03,080
So this whole condition will be true if this condition is true and this condition is also true.

16
00:01:03,920 --> 00:01:06,900
And if I am, I'll give it one of them being true.

17
00:01:07,400 --> 00:01:12,130
I will use Eger then B or eager DNC.

18
00:01:13,310 --> 00:01:13,560
OK.

19
00:01:13,910 --> 00:01:15,990
So this whole condition will be true.

20
00:01:16,460 --> 00:01:21,140
If this is true or this is true or both of them is true.

21
00:01:22,040 --> 00:01:22,330
OK.

22
00:01:23,450 --> 00:01:29,420
So these are the two main operators, domain logical operators to ampersand and double bypass.

23
00:01:30,320 --> 00:01:33,620
We also have a tarried operator, which is negation.

24
00:01:38,210 --> 00:01:45,920
So this whole expression will be true if A is not greater than articles to be.

25
00:01:47,610 --> 00:01:47,910
OK.

26
00:01:48,350 --> 00:01:49,850
So we have three operators.

27
00:01:50,120 --> 00:01:52,460
These two are the main logical operators.

28
00:01:53,300 --> 00:01:57,050
This is also a logical operator, but it is very rarely used.

29
00:01:57,800 --> 00:02:06,440
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

30
00:02:06,440 --> 00:02:07,510
use double bypass.

31
00:02:08,860 --> 00:02:11,470
OK, so let's see an example.

32
00:02:21,580 --> 00:02:22,510
Let's name it

33
00:02:25,060 --> 00:02:29,200
logically, not CBP.

34
00:02:39,060 --> 00:02:41,880
Hedging, glued your stream.

35
00:02:53,050 --> 00:03:01,810
So I would take two numbers and A, comma, B, comma, C, and I would take value and Bertran to use

36
00:03:01,810 --> 00:03:01,940
it.

37
00:03:04,120 --> 00:03:05,500
Suppose I want to check.

38
00:03:05,620 --> 00:03:07,150
Is a the largest number.

39
00:03:07,750 --> 00:03:12,340
So Boole is a largest.

40
00:03:14,550 --> 00:03:18,630
So I have to check to condition Asiad bigger good then be.

41
00:03:21,950 --> 00:03:25,610
And it should be good to then see you also.

42
00:03:26,360 --> 00:03:26,680
OK.

43
00:03:27,140 --> 00:03:32,120
So for this and operator of all this and where to allow use to impersonate.

44
00:03:33,410 --> 00:03:40,060
So if A good then B and eager, then C, then only this whole expression will be true.

45
00:03:40,130 --> 00:03:46,430
We'll see you out as a largest.

46
00:03:49,620 --> 00:03:50,560
OK, so let's send it.

47
00:03:53,800 --> 00:03:58,930
Suppose the value of a 10 B's two and C's T.

48
00:04:00,670 --> 00:04:01,920
So when is getting printed?

49
00:04:03,520 --> 00:04:08,850
So heavy Kansi then is there then, too, and then as well.

50
00:04:08,900 --> 00:04:09,430
Then three.

51
00:04:10,190 --> 00:04:10,440
OK.

52
00:04:10,750 --> 00:04:14,020
So bored ego then B and ego Danzy bored.

53
00:04:14,020 --> 00:04:15,130
This condition are true.

54
00:04:15,430 --> 00:04:19,750
So is the largest is containing through and through is getting printed.

55
00:04:21,010 --> 00:04:22,420
So let's send it one more time.

56
00:04:25,240 --> 00:04:31,990
Suppose the value of A is forward, the value of B is to and the value of these five.

57
00:04:33,200 --> 00:04:34,600
So zero is getting Brender.

58
00:04:39,730 --> 00:04:46,130
So in this case, is Gordon B for his good dental, for his dental, the condition is true.

59
00:04:46,750 --> 00:04:47,980
But food is good.

60
00:04:48,010 --> 00:04:49,900
Then five, this condition is false.

61
00:04:50,350 --> 00:04:51,230
So this is true.

62
00:04:51,580 --> 00:04:52,420
This is false.

63
00:04:52,870 --> 00:04:54,980
Overall, my result is false.

64
00:04:56,640 --> 00:05:00,480
OK, force means zero and zero is getting printed.

65
00:05:10,380 --> 00:05:13,620
So if I am OK of it, either one of them being true.

66
00:05:27,040 --> 00:05:32,260
And Lane and here a fine, we'll give it either one of them being.

67
00:05:33,040 --> 00:05:34,480
So I will use double pipe.

68
00:05:36,330 --> 00:05:37,290
OK, so let's send it.

69
00:05:39,810 --> 00:05:40,070
So.

70
00:05:40,500 --> 00:05:41,280
OK, so.

71
00:05:46,840 --> 00:05:47,450
Now, this is good.

72
00:05:50,820 --> 00:05:57,560
Suppose the value of phase for the value of B is to add the value of C is five.

73
00:06:00,560 --> 00:06:03,800
So this part is the largest number is for the largest number?

74
00:06:03,890 --> 00:06:04,670
Obviously, no.

75
00:06:05,390 --> 00:06:07,510
And the second part is for then two.

76
00:06:07,590 --> 00:06:07,800
Yes.

77
00:06:07,910 --> 00:06:08,930
The condition is true.

78
00:06:13,700 --> 00:06:17,570
So in this case, this condition is true.

79
00:06:18,350 --> 00:06:20,590
And this condition is false.

80
00:06:21,020 --> 00:06:22,830
So only so total.

81
00:06:22,970 --> 00:06:24,980
And in total, my dessert will be through.

82
00:06:26,550 --> 00:06:26,840
OK,

83
00:06:30,950 --> 00:06:32,620
now let's see negation also.

84
00:06:35,760 --> 00:06:36,590
See old.

85
00:06:41,090 --> 00:06:47,760
Negation of a list, then a good, then particles.

86
00:06:47,840 --> 00:06:48,110
B.

87
00:06:55,210 --> 00:06:56,200
OK, so let's it.

88
00:06:59,090 --> 00:07:01,730
Four, five, three.

89
00:07:04,590 --> 00:07:08,070
So far, it's not the largest number, our part is zero, but four is good.

90
00:07:08,230 --> 00:07:10,140
Then three to the output is one.

91
00:07:10,770 --> 00:07:16,140
And the last condition eager Danica's was to be so is for less than just a second.

92
00:07:21,200 --> 00:07:25,260
So this whole expression is coming out to be true.

93
00:07:25,880 --> 00:07:29,930
Nettie's Eger then articles to be should be false.

94
00:07:30,770 --> 00:07:38,570
So is Fortgang identify if guerdon or close to five known the condition is false and overly and in total,

95
00:07:38,570 --> 00:07:40,340
this whole expression will be through.

96
00:07:41,440 --> 00:07:41,670
OK.

97
00:07:45,140 --> 00:07:49,310
I'm explaining one more time, so eager then our request to be

98
00:07:52,770 --> 00:07:58,430
so this expression is false because Ford is not good.

99
00:07:58,530 --> 00:08:01,940
Then it goes to five, but there's a negation operator.

100
00:08:02,390 --> 00:08:05,140
So this whole expression will become through.

101
00:08:06,150 --> 00:08:08,270
Okay, so that's why one is getting printed here.

102
00:08:14,290 --> 00:08:14,920
OK, guys.

103
00:08:15,010 --> 00:08:16,660
So that is all for this video.

104
00:08:17,080 --> 00:08:18,220
I will see you in the next one.

105
00:08:18,640 --> 00:08:21,760
And next video, we will discuss about bitwise operators.

106
00:08:22,570 --> 00:08:22,800
OK.

107
00:08:23,440 --> 00:08:23,890
Thank you.
