WEBVTT 00:00.840 --> 00:08.100 Hello again let's continue with the operators now and let's complete the bitwise operators the assignment 00:08.100 --> 00:14.180 operators the membership and the identity operators quickly in this review. 00:14.260 --> 00:21.510 All right so we go into programming that ASPI to 3 and let's understand. 00:21.890 --> 00:27.770 I'm not going to make a file and write them in the sialic So this time let's say is equal to 5. 00:27.920 --> 00:39.000 Or or let me say easy equal to 7 and B is equal to equals 10. 00:41.960 --> 00:48.410 Now when I see the bit twice operate. 00:49.010 --> 00:58.330 What you're going to go with this a and b it takes two white right. 00:58.500 --> 01:04.330 Now we need to understand a because a 7. 01:04.540 --> 01:13.840 I say it can get it as binary 0 0 0 0 0 1 1 1. 01:13.840 --> 01:18.490 That's the binary of the 7 cuts the Big 8 bits each. 01:19.080 --> 01:30.580 And then if I say be that Astin it's going to be written as 0 0 0 0 1 0 1 0. 01:30.620 --> 01:31.500 All right. 01:31.610 --> 01:37.700 Now when you do this twice and when you do a bit why isn't that the campus and operable. 01:38.010 --> 01:40.960 And then it stands. 01:40.980 --> 01:43.620 Each of these bits twice. 01:43.620 --> 01:54.980 1 and 0 0 1 and 1 is a 1 so if I write and the it's going to be something like this 01:59.180 --> 02:12.670 0 0 0 0 1 0 0 0 and 0 0 0 and 1 is 0 1 and 0 0 1 and 1 is 1 and 1 and zero is zero. 02:12.830 --> 02:15.660 What is this too perfect. 02:15.680 --> 02:17.360 That's the answer. 02:17.360 --> 02:29.360 All right let's go on to let's go on to what would be a or OK A or B what would it be. 02:29.390 --> 02:30.070 All right. 02:30.270 --> 02:33.670 It's going to be OK. 02:34.170 --> 02:36.400 I'll just say this. 02:36.500 --> 02:38.340 Or B before going to a command. 02:38.340 --> 02:42.610 Sorry that's 15. 02:42.630 --> 02:44.150 How did that come. 02:44.200 --> 02:53.750 I'll write this once again and I'll write this B once again and then we will do the oring part of it. 02:53.850 --> 02:55.950 That is a or b. 02:56.100 --> 03:13.030 So that's going to be 0 0 0 0 0 0 0 0 1 1 1 or 2 1 is 1 1 or 0 is again 1 0 or 1. 03:13.080 --> 03:18.300 If any one of them on one or at least one of them one. 03:18.520 --> 03:19.160 OK. 03:19.310 --> 03:21.840 And to now. 03:22.070 --> 03:30.250 So we got a or b then you have another operator called as a exhaust. 03:30.470 --> 03:32.600 Now what is exhaust. 03:32.840 --> 03:36.130 Again if I copied these two things out to 03:45.610 --> 03:55.810 a zombie that's going to be given as exactly 0 0 0 0 0 0 0 0 eggs or UPS. 03:55.940 --> 04:04.150 Just a minute one sec x or x or is one exhorter is one. 04:04.160 --> 04:04.730 Yeah. 04:04.780 --> 04:06.100 When any one of them are one. 04:06.100 --> 04:12.010 So if it pulls them or zeros or both of them or once it's going to be answered it's going to be zero 04:12.010 --> 04:19.130 so $0.00 exhaust below zero zero zero zero or one at least one of them is one. 04:19.180 --> 04:20.070 Yes. 04:20.200 --> 04:30.620 Then it is going to be 1 1 exhorter zero is again one but one in Zone One is 0 1 0 0 is 1 again. 04:30.630 --> 04:31.570 What is that. 04:31.590 --> 04:33.940 This is 13. 04:33.990 --> 04:40.140 This is a plus for that astraddle 12 plus one that is Kirti OK. 04:40.290 --> 04:47.410 We now go on to the next bitwise operator that is knocked off. 04:48.190 --> 04:49.960 It says it's mine is it. 04:50.220 --> 04:55.030 OK what is not ofI and that's mynahs. 04:55.080 --> 04:55.490 OK. 04:55.620 --> 05:03.010 So if it's a copy the when you put it up here. 05:05.210 --> 05:10.090 Not or not they are negative off the negation of the. 05:10.490 --> 05:14.420 There's going to be given as a complement of each of them. 05:14.600 --> 05:19.380 So you know this is a negative. 05:19.390 --> 05:20.600 No. 05:20.720 --> 05:25.010 Now there's a negative number which is stored in this particular fashion. 05:25.010 --> 05:31.030 Now if you want to know what kind of number this is you need to get the two complement of the complement 05:31.070 --> 05:33.950 of this is going to be OK. 05:33.990 --> 05:38.090 So so this negative number not of the is going to get this and this is going to be exactly the way that 05:38.090 --> 05:41.210 it's going to be stored in your memory. 05:41.600 --> 05:46.000 But then if you want to read it why does vinyl see it when you write not of his mindset. 05:46.340 --> 05:47.030 OK. 05:47.030 --> 05:51.710 Why is it minus eight then you need to take the two's complement of this and figure out what is the 05:51.710 --> 05:57.990 positive number of which this is all right. 05:58.200 --> 05:59.640 So it is a complement. 05:59.790 --> 06:02.170 So negative numbers are starting to complement form. 06:02.250 --> 06:05.720 So then I can say this right here. 06:05.970 --> 06:07.490 If I were to take the compliment. 06:07.560 --> 06:10.500 I would just say zero. 06:10.630 --> 06:17.790 First then you take the one complement that is 000.00 1 1 1 and then I need to add 1 to it. 06:17.820 --> 06:20.290 So if I add a 1 to it one plus one. 06:20.310 --> 06:27.570 So one plus one to the last bit one if I add to this last bit one to one to the last one what is going 06:27.570 --> 06:29.390 to happen one plus one is zero. 06:29.400 --> 06:32.790 Gary one zero carry one. 06:32.790 --> 06:35.070 This one needs to be added with this one. 06:35.100 --> 06:37.920 Again it's going to be zero carry one. 06:38.040 --> 06:40.340 Again this is going to be zero carry one. 06:40.380 --> 06:42.280 The one is going to come here. 06:42.630 --> 06:44.390 So this one right here. 06:44.400 --> 06:46.380 Now what is this number. 06:46.740 --> 06:49.370 And hence the number that is. 06:49.500 --> 06:53.030 This particular number is minus eat. 06:53.100 --> 06:56.050 So this is how you read what is a negative number. 06:56.310 --> 06:57.000 All right. 06:57.150 --> 07:06.360 Now we go on to the next one that is so you resaw bitwise operators and or X or negation and then oh 07:06.390 --> 07:12.310 we have Sorry congressman and then we have the right shift and the left shift. 07:12.350 --> 07:18.700 OK a right shift by 2 and to it says one by one. 07:18.930 --> 07:26.340 OK I'll store a I'll write it once again and then let's see what is it right. 07:26.400 --> 07:32.170 Shift by two OK what is it going to be. 07:32.220 --> 07:36.880 Each of the bits are going to be shifted to the right by two. 07:36.930 --> 07:40.620 So this bit is going to be shifted one place you're in one place here. 07:41.570 --> 07:46.920 So this bit is going to finally come here. 07:47.130 --> 07:49.760 The first MSBA is going to come here. 07:49.920 --> 07:54.430 The next bit is also going to be shifted by two which means that it's going to come here. 07:54.590 --> 07:56.280 The next one is going to come here. 07:56.280 --> 07:59.360 So these are the three bits which got shifted to the right. 07:59.370 --> 08:01.840 What about East to deal so we come off of that. 08:01.870 --> 08:03.550 Then comes the three ones. 08:03.570 --> 08:07.340 This one is going to be shifted to the right which means that one is going. 08:07.410 --> 08:09.140 That one is also going to come here. 08:09.540 --> 08:12.890 But what about the rest of the day once you are gone. 08:13.140 --> 08:13.470 OK. 08:13.470 --> 08:17.280 They cannot be shifted to the right because this is the maximum that it can hold. 08:17.280 --> 08:18.930 What about these Two-Bits. 08:19.050 --> 08:22.270 These debates are going to be zero. 08:22.440 --> 08:26.760 And you they just go flat. 08:26.760 --> 08:28.100 So what's the answer. 08:28.310 --> 08:31.940 Right shifting the bits by two onset is one. 08:31.950 --> 08:36.530 All right then we go on to left shifting belts by two. 08:36.570 --> 08:37.080 OK. 08:37.080 --> 08:41.520 So that's going to be a left shift by two. 08:41.520 --> 08:44.230 OK so if I do that I'm going to shift. 08:44.520 --> 08:44.800 OK. 08:44.820 --> 08:46.660 Not not this one. 08:46.660 --> 08:52.170 There's a lot of the shape shifting there's some shifting a by too so they're shifted by two. 08:52.440 --> 09:00.950 If I shifted or were I'm going to get like this 000 right these two zeroes will go off. 09:00.950 --> 09:06.650 It is not going to be there then it's going to be 1 1 1 and then zeros are going to be added at the 09:06.650 --> 09:07.690 end. 09:07.790 --> 09:09.420 Again this is going to be the answer. 09:09.530 --> 09:11.370 Now what exactly is that. 09:11.510 --> 09:14.940 A lecture by two that's going to be 28. 09:14.960 --> 09:19.740 This is 16 plus 16 plus eight is how much that's going to be. 09:19.760 --> 09:23.960 Twenty four twenty four plus four is straight. 09:23.960 --> 09:24.820 And that's right. 09:25.100 --> 09:28.620 So you are really off shift to that is 28 clear. 09:28.910 --> 09:31.160 These are the bitwise operators. 09:31.220 --> 09:34.620 Now we go on to some other operators also. 09:34.830 --> 09:37.580 So the so that we finish up the operators quickly. 09:37.820 --> 09:38.990 OK. 09:39.110 --> 09:41.590 By the way where are these operators going to be used. 09:41.660 --> 09:43.170 We're going to use them. 09:43.550 --> 09:49.700 Maybe when you have certain data and you want to hide a few bits you want to show a few bits you want 09:49.700 --> 09:56.710 to do some operations where you want do you want to do some bitwise operations on that data. 09:56.990 --> 09:57.610 Okay. 09:57.650 --> 10:03.430 On any kind of data that you get when you will use any of the bitwise operators. 10:03.540 --> 10:07.460 Okay another operator which is going to be used very frequently. 10:07.500 --> 10:08.080 Scholars. 10:08.110 --> 10:09.940 The assignment operators. 10:10.310 --> 10:10.930 OK. 10:11.000 --> 10:12.010 This is nothing. 10:12.050 --> 10:15.610 This is not is not difficult to understand why. 10:15.620 --> 10:24.420 Because if I do a class 2 what's the answer 9 but if I say what is the value of it now it is seven. 10:24.500 --> 10:29.350 Which means which means it has not changed. 10:29.400 --> 10:33.330 We got the answer A-plus too because we are printing a too. 10:33.420 --> 10:37.000 But did we when we change D-plus do. 10:37.140 --> 10:39.980 Did we assign it back to it. 10:40.140 --> 10:41.440 Did we change it. 10:41.490 --> 10:47.210 No he was still remaining seven hands you can write that. 10:47.400 --> 10:49.610 Hence we have an. 10:49.650 --> 10:54.780 You can actually write something like this a plus do is equal to a plus two. 10:54.780 --> 10:56.400 Now if I say what is a. 10:56.460 --> 10:57.600 That's nine. 10:57.690 --> 10:58.350 That's right. 10:59.790 --> 11:05.470 But instead of writing this White says will give you an operator. 11:05.490 --> 11:12.950 It says A what do you want or do you want to add it to. 11:13.030 --> 11:15.260 And then you could get back to me. 11:15.520 --> 11:20.810 You can write something like this plus sequel to a plus equals or two. 11:20.950 --> 11:23.340 And it was Garny nine. 11:23.350 --> 11:25.670 It has become Levan correct. 11:27.160 --> 11:27.690 OK.