0:00:18.790,0:00:22.950 Hello and welcome to the first[br]video on Boolean logic. 0:00:23.620,0:00:27.850 And Boolean expressions. You[br]might know this topic in an 0:00:27.850,0:00:31.234 alternative name because the[br]same topic sometimes also 0:00:31.234,0:00:35.887 referred to as digital Logic or[br]Boolean algebra or algebra of 0:00:35.887,0:00:40.540 proposition. What this topic is[br]looking at is looking at a 0:00:40.540,0:00:42.232 collection of input values. 0:00:42.830,0:00:44.930 A collection of operators. 0:00:45.520,0:00:49.840 That sometimes we refer to as[br]logic gates and looking at what 0:00:49.840,0:00:54.160 happens at the end, what is a[br]particular set of of these 0:00:54.160,0:00:58.480 inputs and operators? What kind[br]of outputs you can end up with? 0:00:58.480,0:01:03.160 Now the origonal part of this[br]coming from the at the very very 0:01:03.160,0:01:06.760 beginning, the computer has been[br]built up from logic circuits. 0:01:06.760,0:01:10.360 Tiny, tiny little circuits and[br]then depending on which circuits 0:01:10.360,0:01:14.680 you connected together, you were[br]able to tie the computer to do 0:01:14.680,0:01:15.760 different things so. 0:01:15.910,0:01:20.914 The input and output values can[br]be recorded in a number of 0:01:20.914,0:01:24.250 different ways. Again, there are[br]two common ways. 0:01:24.890,0:01:30.954 One is the true for set up and[br]the other one is the 1 zero set 0:01:30.954,0:01:35.502 up again. It comes from the fact[br]that logic circuits can be 0:01:35.502,0:01:40.808 turned on or off true and one is[br]equal to the on position and 0:01:40.808,0:01:44.977 force in OR equal to the off[br]position. Remember circuits turn 0:01:44.977,0:01:48.009 it on or turn it off. So let's 0:01:48.009,0:01:53.926 look at. What are the[br]basic Boolean operations? The 0:01:53.926,0:01:55.750 first Boolean operation? 0:01:57.100,0:02:02.010 Is the end operation now this[br]end operation sometimes just 0:02:02.010,0:02:07.411 written out as end in capital[br]letters sometimes is referred to 0:02:07.411,0:02:08.884 as this symbol? 0:02:09.650,0:02:12.782 And sometimes it's referred to[br]as a multiplication simple 0:02:12.782,0:02:15.566 symbol because it works like[br]ordinary multiplication within 0:02:15.566,0:02:19.742 the binary system. Now it also[br]has got in digital logic. If 0:02:19.742,0:02:22.874 you're looking at the circuits[br]themselves. If you're looking 0:02:22.874,0:02:26.702 at how to build boards[br]together, it has got a logic 0:02:26.702,0:02:30.182 gate symbol and that logic[br]gate symbol is this one. 0:02:32.490,0:02:36.736 Now this tells you that this[br]endgate can take a minimum 0:02:36.736,0:02:40.982 of two input values and it[br]will give you always one 0:02:40.982,0:02:41.754 output value. 0:02:43.770,0:02:48.281 So what does the end gate do[br]now? The end gate is actually 0:02:48.281,0:02:53.139 working as if you had a water[br]pipe fixed with two taps on it, 0:02:53.139,0:02:54.527 one after the other. 0:02:57.610,0:03:01.966 So when we have water flow[br]through, the water will flow 0:03:01.966,0:03:06.718 through only if both of the[br]tabs are open. If I turn 0:03:06.718,0:03:07.906 this tab off. 0:03:09.040,0:03:13.590 The voter will stop here if I[br]turn this step on when I leave 0:03:13.590,0:03:17.490 this tab of the water will stop[br]here, so water still doesn't 0:03:17.490,0:03:21.065 flow through an. Obviously, if[br]I have both taps turned off, 0:03:21.065,0:03:24.965 the water doesn't go further[br]than here. So what are we only 0:03:24.965,0:03:29.190 go through if all of these[br]steps are on, so would have can 0:03:29.190,0:03:33.090 go through only this way. Now[br]how can we sort of summarize 0:03:33.090,0:03:36.340 this information in a nice and[br]simple visual format? That's 0:03:36.340,0:03:37.315 why truth tables. 0:03:40.510,0:03:44.173 Has been invented through.[br]Tables are simple tables which 0:03:44.173,0:03:48.650 tells you what are the input[br]values or other possible input 0:03:48.650,0:03:53.941 values that can come. What is[br]the logic gate or what is the 0:03:53.941,0:03:58.825 Boolean operation that we use[br]here and then? What will be the 0:03:58.825,0:04:02.488 end result of that Boolean[br]operation for every possible 0:04:02.488,0:04:06.151 income combinations? Now let's[br]look at the simple examples. 0:04:06.151,0:04:08.593 Let's see how does the P&Q 0:04:08.593,0:04:13.230 operation works. B is an input[br]queue, is a different input. 0:04:13.230,0:04:17.410 What happens if I combine them[br]together? What will be the 0:04:17.410,0:04:18.930 common output so P. 0:04:20.390,0:04:21.330 And Q. 0:04:23.450,0:04:25.418 And here will be my output. 0:04:27.540,0:04:33.364 Now what kind of setups can the[br]two taps have? While I can turn 0:04:33.364,0:04:35.028 both of them on? 0:04:37.120,0:04:41.644 I can turn one of them on[br]the other one off, all in 0:04:41.644,0:04:42.688 the other combination. 0:04:43.980,0:04:46.923 Or I can have both[br]of them turned off. 0:04:48.140,0:04:52.368 So what did we say? The water[br]can only go through if both of 0:04:52.368,0:04:53.576 the taps are on? 0:04:54.250,0:04:58.570 Every other combination will[br]stop the water from flowing, so 0:04:58.570,0:05:02.026 this is the truth table[br]accompanying the end. 0:05:02.750,0:05:07.640 Operation. With this Boolean[br]trip tables, you need to know 0:05:07.640,0:05:11.600 them. You need to understand[br]them because later on we'll be 0:05:11.600,0:05:14.840 combining more than just one[br]single operation together and 0:05:14.840,0:05:19.880 see what happens if we start to[br]mix them up. So this was the 0:05:19.880,0:05:24.200 first one, the end operation.[br]Let's have a look at the next 0:05:24.200,0:05:28.520 one, which is the OR operator.[br]Now the symbol for the OR 0:05:28.520,0:05:32.480 operator can be this small away.[br]The opposite, the turned upside 0:05:32.480,0:05:35.720 of the end or the addition[br]because it works. 0:05:35.830,0:05:36.919 Like the audition. 0:05:39.120,0:05:42.126 And if you are coming from[br]the engineering background. 0:05:43.320,0:05:45.880 You can see either this. 0:05:48.010,0:05:51.150 Symbol or this symbol? 0:05:53.790,0:05:58.014 For the OR gates, again it[br]takes in at least two 0:05:58.014,0:06:01.854 incoming values and gives you[br]one outgoing value, so at 0:06:01.854,0:06:03.774 least two inputs, one output. 0:06:05.390,0:06:07.819 You can think about the OR gate. 0:06:08.370,0:06:12.000 As water pipes but fixed 0:06:12.000,0:06:17.750 now. In a different way now[br]these water pipes I fixed 0:06:17.750,0:06:21.458 together in a parallel[br]fashion and on each branch 0:06:21.458,0:06:23.518 we have got a tap. 0:06:24.760,0:06:30.920 So what happens in this case?[br]Now if I turn this tap off, stop 0:06:30.920,0:06:35.760 the water flowing here, but I[br]don't turn this stuff off. 0:06:36.400,0:06:40.573 The water will be able to bypass[br]that turned side and fluid flow 0:06:40.573,0:06:44.104 through. Here the same the other[br]way around. And obviously if 0:06:44.104,0:06:48.598 both of the tabs are open then[br]the voter have got the choice of 0:06:48.598,0:06:51.808 flowing through one or the[br]other, so the OR operation. 0:06:52.470,0:06:56.370 Opposite to what the end does,[br]it only stops the water. In one 0:06:56.370,0:07:00.270 case it stops the water if both[br]of the taps are turned off. 0:07:01.570,0:07:05.509 So what does it look like in the[br]truth table fashion? So again. 0:07:07.680,0:07:12.360 P or Q. What are the possible[br]income combinations and what are 0:07:12.360,0:07:15.480 the possible outcome[br]combinations of these? So again, 0:07:15.480,0:07:17.430 I can have two values. 0:07:18.270,0:07:19.710 Two input values P. 0:07:20.330,0:07:20.780 K. 0:07:22.020,0:07:26.992 So again, what are the different[br]input combinations for these two 0:07:26.992,0:07:29.252 values? The P&QA quick trick. 0:07:29.850,0:07:37.270 True, true Force Force 3434.[br]This fact comes from I've 0:07:37.270,0:07:40.238 got two input values. 0:07:41.750,0:07:47.836 P or K, but all both of them can[br]be true or false, so I only have 0:07:47.836,0:07:52.490 got two possible switch stands.[br]So 2 to the power of two gives 0:07:52.490,0:07:57.502 me 4, but two is the number of[br]input values and two is the 0:07:57.502,0:08:00.366 number of possible outcomes like[br]trues or force. 0:08:01.420,0:08:06.484 So what did we establish if[br]both of the taps are turned 0:08:06.484,0:08:11.548 on, then the voter can flow[br]through. If one of the taps 0:08:11.548,0:08:16.190 are turned on, then the water[br]can flow through that branch 0:08:16.190,0:08:18.300 and bypass the off tab. 0:08:19.480,0:08:24.485 But if both of the taps are[br]turned off than the water it 0:08:24.485,0:08:27.950 stopped. So that's when this[br]this operation is forced. 0:08:28.720,0:08:33.556 So the next operation that I[br]would like to talk about is the 0:08:33.556,0:08:36.532 not operation, which sometimes[br]also used this symbol. 0:08:37.310,0:08:42.040 Sometimes this symbol and[br]sometimes it used just by a bar 0:08:42.040,0:08:46.770 over the input for the pictorial[br]symbol for the Northgate. For 0:08:46.770,0:08:51.930 engineers is this it's a little[br]triangle with a little circle at 0:08:51.930,0:08:53.220 the end now. 0:08:54.150,0:08:59.140 Compared with the others, the[br]not operation only have one 0:08:59.140,0:09:01.635 input and has one output. 0:09:02.210,0:09:08.990 OK, so that state to wait as you[br]something. So if I have got just 0:09:08.990,0:09:11.702 one input then that input P. 0:09:13.270,0:09:17.790 Can only be true or false and[br]then not P. 0:09:19.300,0:09:24.508 But what is not true? What[br]is not true is force and 0:09:24.508,0:09:29.282 what is not force is true.[br]So the not operation has 0:09:29.282,0:09:34.056 got a very special role. It[br]flips it inverts it changes 0:09:34.056,0:09:36.226 the input to its opposite. 0:09:37.700,0:09:40.340 The next simple operation[br]is the X or. 0:09:41.850,0:09:47.986 Which has got this symbol, so it[br]doesn't have that many symbol as 0:09:47.986,0:09:53.178 the not. So that's easier. And[br]the exors pictorial symbol for 0:09:53.178,0:09:54.594 joining as circuit. 0:09:55.720,0:09:57.520 Is the OR gate? 0:10:00.400,0:10:04.855 But with an extra leg added to[br]it so it can take again at least 0:10:04.855,0:10:08.716 two inputs. Or if we use the[br]alternative way of the X or. 0:10:10.650,0:10:11.690 And it would look. 0:10:12.420,0:10:13.500 Something like that. 0:10:14.610,0:10:20.010 OK, now this is called the[br]axle operation because it's 0:10:20.010,0:10:20.550 exclusive. 0:10:22.160,0:10:22.630 Or 0:10:23.830,0:10:29.176 so it's exclusively one or the[br]other input, so the xclusive 0:10:29.176,0:10:35.008 or the X or operation filters[br]out the input values when the 0:10:35.008,0:10:41.812 inputs are the same. So what[br]do I mean by that? If I have 0:10:41.812,0:10:43.270 got inputs P&Q? 0:10:45.390,0:10:49.558 What will the acts or do[br]to them? 0:10:51.790,0:10:57.022 So again, be can be true[br]to force force and Q is 0:10:57.022,0:10:58.766 true force three force. 0:10:59.950,0:11:04.498 So exclusive, or if the inputs[br]are the same, which is this 0:11:04.498,0:11:09.425 case? Because both of them are[br]true. The Exor Gate gives you a 0:11:09.425,0:11:13.215 4th signal. Basically the axle[br]gates stops the signal going 0:11:13.215,0:11:18.142 through. If one is to the other[br]one is forced then that's when 0:11:18.142,0:11:22.311 the signal can go through and[br]again because force enforces the 0:11:22.311,0:11:26.480 same input value that the EXOR[br]gate stops your signal going 0:11:26.480,0:11:30.270 through. And remember that I[br]mentioned at the beginning of 0:11:30.270,0:11:34.584 this video. These are based on[br]the electric circuits and then 0:11:34.584,0:11:38.500 you wanted to manipulate at the[br]very, very early stages or 0:11:38.500,0:11:42.060 lippit stages of computing you[br]wanted to manipulate where the 0:11:42.060,0:11:45.264 electrical signal goes doesn't[br]go through here doesn't go 0:11:45.264,0:11:48.468 through that you wanted to[br]manipulate and filter out 0:11:48.468,0:11:52.384 certain inputs in favor of other[br]inputs. So these different gates 0:11:52.384,0:11:56.656 give you that kind of option of[br]turning them around. Saying, I 0:11:56.656,0:12:00.572 don't want this input, I want[br]that that input combination to 0:12:00.572,0:12:02.352 go through and nothing else. 0:12:03.530,0:12:06.720 There are a couple of more[br]operations that I would like 0:12:06.720,0:12:09.330 to talk about. These are[br]slightly more complicated. I 0:12:09.330,0:12:12.810 can't really give you any nice[br]and simple example of why they 0:12:12.810,0:12:16.580 work in here. We just have to[br]learn that this is the way 0:12:16.580,0:12:19.770 that they work, so one of them[br]is that you've done. 0:12:22.050,0:12:25.047 And the symbol for that[br]is this forward error. 0:12:26.440,0:12:30.350 So again. I've got inputs P&Q. 0:12:31.320,0:12:35.220 And then what will be[br]the Alpha output of the 0:12:35.220,0:12:37.170 P IF then Q operation? 0:12:39.620,0:12:46.586 So true true Force force[br]three force, three force. 0:12:48.030,0:12:51.060 Sometimes this also[br]called the implies. 0:12:53.470,0:12:57.196 So true implies true, that is 0:12:57.196,0:13:04.340 true. But true cannot imply[br]force, so this one is force 0:13:04.340,0:13:06.592 force can imply true. 0:13:08.150,0:13:11.290 And force can imply force[br]that's true. Again, this is 0:13:11.290,0:13:14.430 probably going to be the most[br]difficult gate to understand 0:13:14.430,0:13:18.198 why this works. You just have[br]to learn the truth tables, and 0:13:18.198,0:13:21.652 once you know the truth[br]tables, you can apply it to 0:13:21.652,0:13:22.908 any kind of combinations. 0:13:25.070,0:13:29.308 And the last operation that I[br]would like to talk about is that 0:13:29.308,0:13:30.612 if and only if. 0:13:33.130,0:13:36.903 And the symbol for that is[br]an arrow that goes both 0:13:36.903,0:13:40.676 ways. So if I have got the[br]two inputs again P&Q. 0:13:42.840,0:13:47.570 The P if and only Q[br]will work this way. 0:13:49.130,0:13:55.020 33443434. 0:13:57.240,0:13:59.440 This one is only true. 0:14:00.420,0:14:05.488 If both inputs are the same, so[br]true and true are the same, so 0:14:05.488,0:14:09.470 this will be true. True annefors[br]are different, so the output 0:14:09.470,0:14:14.538 will be force same for the third[br]right and for some for side the 0:14:14.538,0:14:19.968 same. So this is true in here.[br]Now if you look at this one and 0:14:19.968,0:14:24.312 if you remember the X or you can[br]support that these two 0:14:24.312,0:14:29.018 operations if and only if an the[br]X or are doing exactly the 0:14:29.018,0:14:30.828 opposite in this using this. 0:14:30.880,0:14:37.312 Operation I can filter out the[br]same input values and stop the 0:14:37.312,0:14:38.920 different input values. 0:14:40.000,0:14:43.132 So that's again a very useful[br]operation to have. 0:14:46.120,0:14:50.748 This short video was intended to[br]expose you to the basics of the 0:14:50.748,0:14:54.664 Boolean logic or digital logic[br]and show you had the truth. 0:14:54.664,0:14:58.936 Tables can be built up and what[br]are the most commonly used 0:14:58.936,0:15:03.208 operations to be able to follow[br]up on digital logic? You will 0:15:03.208,0:15:07.836 need to be able to know this by[br]heart, so these are different 0:15:07.836,0:15:12.108 operations that every time you[br]need to apply them you will be 0:15:12.108,0:15:15.668 have to be very, very confident[br]knowing these operations how 0:15:15.668,0:15:19.176 they work. What they do? What[br]kind of inputs they let 0:15:19.176,0:15:22.520 through an? What kind? What[br]kind of inputs they stop from 0:15:22.520,0:15:25.560 going through? And again, as I[br]mentioned at the beginning, 0:15:25.560,0:15:28.600 this is all coming from the[br]basic principles that went 0:15:28.600,0:15:31.640 first. Human started team when[br]the computers they build them 0:15:31.640,0:15:33.464 together from very tiny basic[br]circuits.