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