1
00:00:01,300 --> 00:00:04,960
So let's go back to this thing that we just simplified here, right?

2
00:00:05,320 --> 00:00:11,610
We're going to talk about something called a truth table now, which is going to let us map out all

3
00:00:11,630 --> 00:00:17,140
the possible combinations of true and false we can have and whether it would lead to this result.

4
00:00:17,830 --> 00:00:24,940
So our goal is to find out whether this evaluates to true based on all the things that could be either

5
00:00:24,940 --> 00:00:32,200
true or false, whether this event evaluates to true based on all the things that C, D and E could

6
00:00:32,200 --> 00:00:32,400
be.

7
00:00:32,410 --> 00:00:39,850
So we're going to look at each variable and think of all the combinations of like, true, false, true,

8
00:00:40,000 --> 00:00:46,240
true, true, true for each one of these variables and see if it would get us to a conclusion where

9
00:00:46,250 --> 00:00:50,470
this is true and this is true, then it would lead to this.

10
00:00:51,500 --> 00:00:54,620
Piece of code right here where we say B is now false.

11
00:00:55,250 --> 00:00:57,110
Bob doesn't get the bananas right.

12
00:00:57,950 --> 00:00:59,780
Bob gets bananas is false.

13
00:01:00,940 --> 00:01:01,870
Because that would be was.

14
00:01:03,050 --> 00:01:11,180
So first thing, we're going to look at the not right, so we have, if not not up here, we're going

15
00:01:11,180 --> 00:01:14,390
to look at even a similar kind of situation of this.

16
00:01:14,390 --> 00:01:16,520
So a is our variable.

17
00:01:17,710 --> 00:01:26,050
And then so we have a here, and we're going to think about what happens when air is false, what will

18
00:01:26,050 --> 00:01:27,190
not be.

19
00:01:28,360 --> 00:01:30,580
You probably can figure out this out on your own.

20
00:01:30,580 --> 00:01:37,510
It's pretty straightforward, but basically when you say not something, all you do is flip it or take

21
00:01:37,510 --> 00:01:38,920
the inverse of it.

22
00:01:38,920 --> 00:01:40,000
It's the opposite.

23
00:01:40,780 --> 00:01:41,350
So.

24
00:01:42,430 --> 00:01:47,770
You can think of all these words are actually very important in computer science, so envious and flipping

25
00:01:48,220 --> 00:01:52,590
of a bit, you know, remember the zeros and ones are bits.

26
00:01:52,600 --> 00:02:00,460
If you go back to that lecture, where we were talking about with Patricia was talking about the numbers

27
00:02:00,460 --> 00:02:07,750
in computer science, the number of systems we have zeros and ones for binary right and their bits.

28
00:02:07,960 --> 00:02:12,550
So if we flip a bit, that means that we turn it into the opposite.

29
00:02:12,550 --> 00:02:15,490
So if it's a zero goes to a one, if it's a one, it goes to a zero.

30
00:02:16,450 --> 00:02:23,290
So thinking about it in that sense, if we take the inverse or flip this for not a it's going to be

31
00:02:23,410 --> 00:02:23,920
one.

32
00:02:25,780 --> 00:02:29,770
If a is one, then not a will be zero.

33
00:02:30,220 --> 00:02:30,580
Right?

34
00:02:32,180 --> 00:02:40,280
So now let's expand it, so our sentence or our little sub statement up here, which is also a condition

35
00:02:40,280 --> 00:02:41,150
because of this if.

36
00:02:42,370 --> 00:02:43,960
Says, if not, not a.

37
00:02:44,260 --> 00:02:55,780
So let's figure out what not not as in each one of these conditions in which a is zero and a is one.

38
00:02:56,050 --> 00:02:56,320
Right.

39
00:02:56,830 --> 00:03:00,610
So we've already figured out what not a would be, but what would not, not a B.

40
00:03:00,610 --> 00:03:06,310
And even more than that, we'll go further just for the heck of it and say what is not not not a which

41
00:03:06,310 --> 00:03:11,140
seems kind of crazy, but I just want to really like beat it into the mind that.

42
00:03:12,090 --> 00:03:13,230
You just keep flipping.

43
00:03:13,260 --> 00:03:16,560
You know, it just flips, flips, flips, no matter how many knots you have.

44
00:03:16,620 --> 00:03:25,560
So with that, what do you think will be right here if a is zero, not a is one?

45
00:03:25,710 --> 00:03:26,160
What is it?

46
00:03:26,160 --> 00:03:31,860
Not, not a you can basically look right here and see what it would be if you just flipped it again.

47
00:03:32,100 --> 00:03:32,370
Right?

48
00:03:33,840 --> 00:03:35,040
So it is zero.

49
00:03:36,430 --> 00:03:38,830
A zero, not a was one.

50
00:03:40,120 --> 00:03:44,620
Now, we only have two options, zero one, so we put another notch in front of this, all it does is

51
00:03:44,620 --> 00:03:46,030
just flip it back to zero.

52
00:03:47,350 --> 00:03:49,720
Same thing for this, it's going to be a one, right?

53
00:03:49,720 --> 00:03:51,420
Because not a zero.

54
00:03:51,430 --> 00:03:52,840
So not not as one.

55
00:03:53,740 --> 00:03:58,270
With that, you should be able to figure out this as well, so what happens if we just throw another

56
00:03:58,270 --> 00:03:59,170
knot in front of this?

57
00:04:00,310 --> 00:04:02,170
It's just going to flip it back again.

58
00:04:02,170 --> 00:04:08,200
So not not not a will be one when not none is zero.

59
00:04:09,580 --> 00:04:12,760
Same thing with this flips again goes from one to zero.

60
00:04:13,300 --> 00:04:16,600
If you put another knot, it would be zero and one another.

61
00:04:16,600 --> 00:04:18,070
Not it would be one in zero.

62
00:04:18,370 --> 00:04:25,090
Another, not a zero and one just over and over again, you know, one zero zero one one zero zero one

63
00:04:25,090 --> 00:04:27,820
one zero zero one, you can just keep feeling this forever.

64
00:04:29,230 --> 00:04:34,570
So that is something I really want to point out, it is a big concept in computer science.

65
00:04:36,410 --> 00:04:43,490
You know, when you say something is not, it means that you are taking the inverse of it, you're flipping

66
00:04:43,490 --> 00:04:48,080
the bit, you're flipping it from false to true, true to false like that.

67
00:04:49,460 --> 00:04:49,760
All right.

68
00:04:49,760 --> 00:04:52,970
So let's move on to a bigger example.

69
00:04:53,090 --> 00:04:55,820
So we're really going through it now, this whole thing.

70
00:04:57,080 --> 00:05:00,110
So we have this, if not, not a now.

71
00:05:00,110 --> 00:05:03,360
We're moving on to this next portion right here.

72
00:05:03,380 --> 00:05:12,770
So if C and D or E, so this is where we get into a real truth table.

73
00:05:14,060 --> 00:05:21,320
So the truth tables are something where we want to think of every possible combination that each one

74
00:05:21,320 --> 00:05:22,850
of these variables could be.

75
00:05:23,870 --> 00:05:31,840
And then we are going to figure out what this statement is based on each one of these potential values.

76
00:05:31,850 --> 00:05:40,040
So each one of these rows, we will evaluate these D or E right here in C and D or E.

77
00:05:41,960 --> 00:05:48,230
So this specific side, we start out with this or which is an important topic in computer science,

78
00:05:48,230 --> 00:05:54,950
the OR means that if either side is true, then the result will be true.

79
00:05:55,130 --> 00:05:57,710
So an either or type of thing.

80
00:05:58,160 --> 00:06:05,570
So if this is true, then it doesn't even matter what it is because the whole thing, the Ori will be

81
00:06:05,570 --> 00:06:08,750
true because we said one or the other has to be true, right?

82
00:06:09,440 --> 00:06:12,230
So if this is true, then the story is true.

83
00:06:12,530 --> 00:06:15,680
If it is true, then the Ori is true.

84
00:06:16,790 --> 00:06:17,210
All right.

85
00:06:17,420 --> 00:06:22,720
So this truth table, just to kind of point out again, you notice a we only had one variable to consider.

86
00:06:22,730 --> 00:06:27,470
So that's why we only have two rows because a can be either zero or one.

87
00:06:28,430 --> 00:06:31,340
But for this, C can be zero or one.

88
00:06:31,700 --> 00:06:33,260
D can be zero or one.

89
00:06:33,380 --> 00:06:34,760
And E can be zero one.

90
00:06:34,760 --> 00:06:42,170
So we've got to think of all the possible combinations that we could have between these three variables

91
00:06:43,160 --> 00:06:50,690
in the way and easy way to get all of the combinations filled out in your truth table, which is this

92
00:06:50,690 --> 00:06:54,320
whole table is to count in binary.

93
00:06:54,890 --> 00:07:03,830
So if you have, you know, three binary places here for a binary number, just remember that the fact

94
00:07:03,830 --> 00:07:05,780
that you have two choices for it.

95
00:07:06,230 --> 00:07:08,390
Notice how many rows we here have here.

96
00:07:08,600 --> 00:07:13,820
One two three four five six seven eight.

97
00:07:14,360 --> 00:07:27,560
The reason that we have eight is because we're actually having two to the third power row is because

98
00:07:27,560 --> 00:07:31,640
that's how many combinations we can have of zero on one, because we have two.

99
00:07:32,180 --> 00:07:34,610
The two is for the fact that there's zero in one.

100
00:07:34,610 --> 00:07:35,870
There's two choices.

101
00:07:36,970 --> 00:07:46,510
The three is because there's three variables, so you can put either a zero or one for three different

102
00:07:46,510 --> 00:07:55,360
variables, that's why we have to go to the third power, which is eight rows, because that's how many

103
00:07:55,360 --> 00:07:56,220
combinations we have.

104
00:07:56,230 --> 00:07:57,430
So I just want to point that out.

105
00:07:57,820 --> 00:08:02,290
So that's a good way to double check, to make sure that you're filling this to truth table correctly.

106
00:08:02,590 --> 00:08:05,170
You may or may not ever be using truth tables.

107
00:08:05,530 --> 00:08:11,080
If you are a student doing a computer science major, you will definitely encounter a truth table at

108
00:08:11,080 --> 00:08:17,080
some point, most likely in discrete structures, discrete mathematics or something like that.

109
00:08:17,090 --> 00:08:18,970
Maybe just a logic class in general.

110
00:08:20,770 --> 00:08:24,550
But this is a good way to double check on your truth tables regardless if you're going to end up doing

111
00:08:24,550 --> 00:08:25,420
this or using it.

112
00:08:27,180 --> 00:08:31,350
So, you know, how many rows there are a good way to fill it out to is just to start with zero and

113
00:08:31,350 --> 00:08:34,440
you notice I just kind of am like counting up here.

114
00:08:34,980 --> 00:08:35,520
So.

115
00:08:36,870 --> 00:08:38,580
Yeah, I just, you know, I have one.

116
00:08:39,480 --> 00:08:48,720
And then, you know, this is two zero one and then I have this two one is two and then I have three.

117
00:08:48,720 --> 00:08:53,550
And you know, I'm just I'm just counting up in binary here, basically, and that's how I filled all

118
00:08:53,550 --> 00:08:54,060
the rows.

119
00:08:55,710 --> 00:09:01,620
So you should remember that from the lecture where we went over a number of systems and in particular

120
00:09:01,620 --> 00:09:02,180
went over that.

121
00:09:02,190 --> 00:09:07,170
So if you're still confused on that and this is confusing you right now, you can go back to that and

122
00:09:07,170 --> 00:09:09,990
kind of brush up on how to count up in binary.

123
00:09:11,310 --> 00:09:16,200
So with that enough of me talking kind of on a tangent about this part, let's get started with this.

124
00:09:16,200 --> 00:09:22,380
So we talked about the or meaning either or one of these has to be true for this whole sub statement

125
00:09:22,380 --> 00:09:23,010
to be true.

126
00:09:24,600 --> 00:09:30,090
So let's tell you this first row, we're looking at Dear E. So we don't really, really need to look

127
00:09:30,090 --> 00:09:31,500
at Si column, right?

128
00:09:31,500 --> 00:09:32,910
Because we don't care about that.

129
00:09:32,910 --> 00:09:33,930
We only care about you.

130
00:09:33,950 --> 00:09:39,270
So let's look at these two columns here and go row by row this first row.

131
00:09:40,460 --> 00:09:47,810
What is going to be the answer here is zero and is zero zero means false, so we have false and false.

132
00:09:48,380 --> 00:09:50,570
What did we say about the order here?

133
00:09:51,440 --> 00:09:54,740
So before I say any more, see if you're going to figure out on your own.

134
00:09:56,400 --> 00:10:05,280
OK, so false or false, we said that one of them either or has to be true for the whole thing to be

135
00:10:05,280 --> 00:10:05,580
true.

136
00:10:05,610 --> 00:10:05,910
Right?

137
00:10:07,270 --> 00:10:10,990
So if either side is true, then result would be true, except neither.

138
00:10:11,050 --> 00:10:12,700
Neither side is true.

139
00:10:13,670 --> 00:10:18,980
Neither side is true, so it's false or false, that means that we have a zero, which is false.

140
00:10:19,370 --> 00:10:19,760
OK?

141
00:10:20,270 --> 00:10:21,680
Because neither side was true.

142
00:10:22,370 --> 00:10:23,540
Let's look at the next one.

143
00:10:24,110 --> 00:10:27,290
The next one is zero four D and E is one.

144
00:10:28,220 --> 00:10:30,950
So we have a zero, which is false.

145
00:10:30,950 --> 00:10:33,410
And then we have a one, which is true over here.

146
00:10:34,410 --> 00:10:39,810
Since if either side is true, then the result is true, that means that it will be true because it

147
00:10:39,810 --> 00:10:40,340
is true.

148
00:10:40,380 --> 00:10:41,610
And that's one side, right?

149
00:10:43,310 --> 00:10:49,010
Same thing, D or E is so D is one e is zero.

150
00:10:49,930 --> 00:10:54,050
I'm just going to go ahead and fill this out, but if you want, it would be great for you to pause

151
00:10:54,050 --> 00:10:56,270
the video and just see if you can fill it this whole column.

152
00:10:56,450 --> 00:10:59,480
I'm sure that at this point, you should be able to to figure that out.

153
00:11:00,260 --> 00:11:03,440
So it's going to be true for this one.

154
00:11:04,370 --> 00:11:06,860
I look at the next row, I notice they're both true.

155
00:11:06,890 --> 00:11:09,710
So since we're either or, it's going to be true.

156
00:11:10,770 --> 00:11:14,910
The next row we have another, you know, D and E is zero.

157
00:11:15,300 --> 00:11:16,900
It's pretty much the same as up here.

158
00:11:16,920 --> 00:11:19,590
He knows this all three one zero here, but this had a one.

159
00:11:19,590 --> 00:11:20,330
That's the difference.

160
00:11:21,040 --> 00:11:22,340
So we're only looking at these two.

161
00:11:22,350 --> 00:11:27,870
So it's false because neither side is true, then we have another one.

162
00:11:28,200 --> 00:11:32,580
And pretty much wherever you see a one on either one of these columns, it's going to be a one in this

163
00:11:32,580 --> 00:11:33,390
dear column.

164
00:11:33,390 --> 00:11:34,830
So we're in for the one in a one.

165
00:11:37,120 --> 00:11:40,030
OK, so let's move on to this part here.

166
00:11:40,390 --> 00:11:44,260
We already know what the order is and we already know about.

167
00:11:45,190 --> 00:11:47,180
But now we factor see into it.

168
00:11:47,200 --> 00:11:50,230
And so we're looking at not just this part.

169
00:11:51,650 --> 00:11:55,400
But we're actually looking at the whole shebang here.

170
00:11:55,910 --> 00:12:00,260
So this whole line, so we've kind of been progressing our way up.

171
00:12:01,330 --> 00:12:09,370
To get to this column right since we did dear, we can use this column now and combine it with it and

172
00:12:09,370 --> 00:12:09,880
in this.

173
00:12:10,030 --> 00:12:17,260
So what is the and mean and means that both sides must be true for the result to be true?

174
00:12:17,860 --> 00:12:25,030
So you basically have to have a true and true for the whole thing to be true.

175
00:12:25,030 --> 00:12:35,890
If you had if you had, let's say you had a and B, both A and B would have to be true for the statement

176
00:12:35,920 --> 00:12:37,180
A and B to be true.

177
00:12:38,910 --> 00:12:40,230
So let's go ahead and look at this.

178
00:12:40,650 --> 00:12:43,440
So we're going to be looking at this column.

179
00:12:44,340 --> 00:12:44,970
Of course you have.

180
00:12:45,030 --> 00:12:50,100
You're like o d or e i need to resolve or do you even know you don't actually, because you've already

181
00:12:50,190 --> 00:12:53,490
solved for all of the degrees right here in this column.

182
00:12:54,180 --> 00:12:58,320
So this whole section circling right here is taken care of.

183
00:12:59,010 --> 00:13:06,990
So now all you have to do is pretend this degree is one thing you can almost like replace D or E with

184
00:13:06,990 --> 00:13:08,610
a new variable like F.

185
00:13:09,060 --> 00:13:13,230
You could just say C and F and F is going to be all of these things in here.

186
00:13:14,130 --> 00:13:15,360
You don't have to imagine like that.

187
00:13:15,360 --> 00:13:19,170
If it's confusing, just know that there is this whole thing that I'm circling with.

188
00:13:19,170 --> 00:13:24,500
My mouse is already taken care of here, so you'll be able to replace it with a zero.

189
00:13:24,510 --> 00:13:30,450
Like, for example, when we start on this first row here, we're going to take a zero and replace this

190
00:13:30,450 --> 00:13:31,140
whole thing.

191
00:13:31,150 --> 00:13:32,520
I'm circling with a zero.

192
00:13:33,550 --> 00:13:38,350
And then we're going to say C and zero for this first one.

193
00:13:38,530 --> 00:13:39,460
So what is that?

194
00:13:39,720 --> 00:13:44,440
C zero, if we have a zero and zero, that's false and false.

195
00:13:44,440 --> 00:13:47,200
We said that and means both sides must be true.

196
00:13:47,640 --> 00:13:48,610
The result to be true.

197
00:13:48,820 --> 00:13:50,740
So therefore, neither of them are true.

198
00:13:51,040 --> 00:13:51,940
That's false, right?

199
00:13:53,020 --> 00:13:57,040
So if you think you already got a grip on this, go ahead and pause the video and see if you can fill

200
00:13:57,040 --> 00:13:58,630
out this column by yourself.

201
00:13:59,970 --> 00:14:01,590
All right, so I'm going to go through it.

202
00:14:02,520 --> 00:14:07,600
The next one we have dear, he is one and C is zero.

203
00:14:08,340 --> 00:14:10,410
But both sides got to be true, so that's false.

204
00:14:11,410 --> 00:14:12,700
Same thing on the next one.

205
00:14:12,910 --> 00:14:19,090
Both sides have to be true, which they're not only one side's true false false again.

206
00:14:20,080 --> 00:14:25,030
This next one, we have a false over here in a two here, so that's false.

207
00:14:25,870 --> 00:14:28,590
This one, however, both are true.

208
00:14:28,820 --> 00:14:31,480
We have see as one and deary as one.

209
00:14:31,930 --> 00:14:32,770
So that's true.

210
00:14:33,920 --> 00:14:38,350
Then the next one is the same, I see a one and a one here, so that's true and the last one of the

211
00:14:38,360 --> 00:14:40,070
all ones all the way across the board.

212
00:14:40,080 --> 00:14:41,210
So that is true as well.

213
00:14:43,670 --> 00:14:48,710
OK, so hopefully that was pretty straightforward for you.

214
00:14:48,890 --> 00:14:56,420
Now we're kind of going to look at the last little thing, which is the fact that this is a if something.

215
00:14:57,550 --> 00:15:01,360
And then inside of it kind of here we have another if something.

216
00:15:02,560 --> 00:15:04,230
But really, if you think about it.

217
00:15:05,150 --> 00:15:09,650
These are two separate conditions that need to be fulfilled.

218
00:15:11,300 --> 00:15:12,560
For this to happen.

219
00:15:14,310 --> 00:15:22,380
So technically, we don't need to just put this if this whole thing here, if C and E and I'm circling.

220
00:15:23,310 --> 00:15:27,720
That doesn't necessarily need to be like indented inside of this if.

221
00:15:29,110 --> 00:15:36,010
Up here in that, if not, not a it could instead all be in the same continuous line like one statement,

222
00:15:36,010 --> 00:15:42,490
because you really have to do this has to be true and this has to be true.

223
00:15:43,730 --> 00:15:53,750
For Beagles falls to happen, notice the and I said there, this has to be true and this has to be true.

224
00:15:54,950 --> 00:16:00,830
For this to happen, that means that we could just instead put it all on one line and put an end in

225
00:16:00,830 --> 00:16:03,010
between like this.

226
00:16:04,290 --> 00:16:07,110
So if not, not a and.

227
00:16:07,980 --> 00:16:12,660
If C and D or E then B is false.

228
00:16:13,500 --> 00:16:15,220
So I want to point that out as well.

229
00:16:15,240 --> 00:16:22,500
That is some things, something that you can do a lot of times to condense your code and simplify it.

230
00:16:22,980 --> 00:16:30,150
So a nice thing to know is kind of look for these kind of logical simplifications that you can do.

231
00:16:30,210 --> 00:16:40,410
You don't necessarily need to put some type of if condition inside of another condition for it to work

232
00:16:40,410 --> 00:16:40,620
out.

233
00:16:40,620 --> 00:16:44,550
If you notice that they could, if they both need to be fulfilled or something happen, you can to put

234
00:16:44,550 --> 00:16:45,270
an end to their.

235
00:16:46,720 --> 00:16:48,880
So something to think about.

236
00:16:49,480 --> 00:16:57,160
And now that we have all of this kind of in one line, we don't necessarily we didn't have to put it

237
00:16:57,160 --> 00:17:04,450
on one line to really think about it as one line, but now it's easier for us to see we actually could

238
00:17:04,450 --> 00:17:09,910
like majorly expand this truth table and and really go all out.

239
00:17:10,150 --> 00:17:14,200
You notice I put a red arrow here because we would need more rows for this.

240
00:17:14,740 --> 00:17:23,620
What you can do is add a into the equation kind of literal equation, but you factor that into this

241
00:17:23,620 --> 00:17:25,450
whole table here.

242
00:17:25,690 --> 00:17:29,800
So you have a column and then you can do the have a not not a.

243
00:17:30,490 --> 00:17:37,870
And then the whole thing over here in this column, you know, not not A and C and D or E.

244
00:17:38,380 --> 00:17:39,940
So you could fill this out.

245
00:17:39,940 --> 00:17:45,280
You're going to have more rows, of course, because you just added another variable in here.

246
00:17:45,880 --> 00:17:53,020
So that's actually going to be two to the four amount of combinations you can do, right, because you

247
00:17:53,020 --> 00:17:54,040
have four things now.

248
00:17:55,390 --> 00:17:59,950
So I'm not going to fill this out, but if you would like to, this would be a good exercise to fill

249
00:17:59,950 --> 00:18:05,320
out if truth tables are something that you are interested in practicing.

250
00:18:06,040 --> 00:18:09,570
You will not need to use truth tables so much in the future.

251
00:18:09,580 --> 00:18:16,450
I am guessing a lot of times you just kind of handle this logic on the spot mentally in your brain.

252
00:18:16,660 --> 00:18:21,550
Although they are useful, I'm sure some people have to use them sometimes.

253
00:18:22,840 --> 00:18:25,660
So you never know when it'll come up, so it might be might come in handy.

254
00:18:26,410 --> 00:18:28,900
I'm not going to fill it out, but if you'd like to, you definitely can.

255
00:18:30,370 --> 00:18:36,220
So we just learned a decent amount of stuff, but I don't want to stuff your brains too much with this

256
00:18:36,220 --> 00:18:39,040
logic and go straight into the cold like immediately.

257
00:18:39,040 --> 00:18:45,550
So maybe a review kind of what you've looked over here, but in the next lecture, we're going to discuss

258
00:18:45,550 --> 00:18:48,430
how to implement all this stuff we just talked about in code.

259
00:18:49,390 --> 00:18:56,380
A big thing I'm kind of jumping down to here is the if I didn't explain that a ton, but you might have

260
00:18:56,380 --> 00:19:03,160
already heard that if something, then something else has a lot to do with code.

261
00:19:03,400 --> 00:19:10,540
And so we are able to use this if that we saw in those statements in code as well, and we're going

262
00:19:10,540 --> 00:19:11,290
to cover that.

263
00:19:11,290 --> 00:19:13,090
They are called conditional statements.

264
00:19:13,090 --> 00:19:19,570
And it's not just in if we have some other things that go along with it like else, if and else stuff

265
00:19:19,570 --> 00:19:19,990
like that.

266
00:19:22,540 --> 00:19:28,120
We're also going to go over operators, so today we talked about the and the OR and and not.

267
00:19:28,420 --> 00:19:36,940
But we've got more than that that we can put in code and I'm going to go over that as well in the next

268
00:19:36,940 --> 00:19:37,480
lecture.

269
00:19:38,260 --> 00:19:42,910
So hopefully this was all understandable for you and try to break it down.

270
00:19:42,910 --> 00:19:45,760
The truth tables really good to practice.

271
00:19:46,380 --> 00:19:55,030
And also just remembering the whole thing about each variable that we are talking about.

272
00:19:55,030 --> 00:19:58,480
There was something that was either true or false.

273
00:19:58,990 --> 00:20:02,830
This logic we're talking about is Boolean logic.

274
00:20:03,100 --> 00:20:10,630
You can get deeper into this topic and look up stuff on Boolean algebra, and that gives a little more

275
00:20:10,630 --> 00:20:11,460
theoretical.

276
00:20:11,470 --> 00:20:18,760
I kind of just combined a lot of things here into one lecture where I was doing it in kind of a casual

277
00:20:18,760 --> 00:20:23,440
pseudo code way, using the word, not in the word or in a word.

278
00:20:23,440 --> 00:20:30,280
And but if you look in a Boolean algebra, they have symbols to represent all these just like we will

279
00:20:30,280 --> 00:20:31,890
in code, but a little bit different.

280
00:20:31,900 --> 00:20:37,390
You know, there's a whole theoretical representation to this Boolean true or false algebra stuff.

281
00:20:38,020 --> 00:20:44,710
So if you're interested and you'd like to learn more about that instead of just enough to be able to

282
00:20:44,710 --> 00:20:49,290
start writing code with it, then you can go ahead and look up a Boolean algebra.

283
00:20:49,300 --> 00:20:52,450
Of course, if you're on a computer science major, you're most likely going to have to do a lot of

284
00:20:52,450 --> 00:20:55,570
this in discrete mathematics or discrete structures or whatever.

285
00:20:55,570 --> 00:20:58,450
The corresponding class that relates to that is in your major.

286
00:20:59,620 --> 00:21:03,790
So with that, I'm going to let you go and I will see you in the next lecture where we kind of turn

287
00:21:03,790 --> 00:21:04,630
this all into code.
