1 00:00:00,480 --> 00:00:01,650 Hello, welcome back. 2 00:00:01,920 --> 00:00:09,720 In this video, listen, I'm going to explain the rotation algorithm, so on the left is the code, 3 00:00:09,720 --> 00:00:18,870 which you wrote in previous lesson, and here you find it five, five, a few assets to test the algorithm. 4 00:00:19,890 --> 00:00:25,260 So the first one is who did this piece by one? 5 00:00:26,010 --> 00:00:27,960 So it's supposed to give you this result. 6 00:00:28,710 --> 00:00:30,180 So how do you get this result? 7 00:00:31,180 --> 00:00:37,810 Take a look at this one effing binary, zero zero zero, followed by five once. 8 00:00:38,710 --> 00:00:48,940 So the first operation here is to shift right by one and then here and Surabi one, you get this, everything 9 00:00:48,940 --> 00:00:50,350 is shifted to the right one. 10 00:00:50,800 --> 00:00:55,580 So the three zeros now become four zeros because everything is moved to the right. 11 00:00:56,620 --> 00:01:03,710 Then the second option is to shift left by five minus eight, which is four shift lower by four. 12 00:01:04,210 --> 00:01:06,130 So this one shifts that by four. 13 00:01:06,880 --> 00:01:12,670 We give you this because every bit here moves to the left by four for location. 14 00:01:13,300 --> 00:01:17,130 So does it give you this and any alteration here? 15 00:01:17,410 --> 00:01:19,750 This is an operation where you combine both. 16 00:01:20,380 --> 00:01:25,180 So operation means to just combine all of this to get into it so we get all one. 17 00:01:25,990 --> 00:01:29,650 And then lastly, the operation is masking. 18 00:01:29,980 --> 00:01:35,190 It means you only want to mascotte five bits, one Effie's five ones. 19 00:01:35,560 --> 00:01:43,570 So when you must find ones using the bin Muskan here, you would get the first one, two, three, four, 20 00:01:43,570 --> 00:01:43,880 five. 21 00:01:43,950 --> 00:01:46,120 Which is why this Friday. 22 00:01:47,880 --> 00:01:53,970 So this is explanation for this sit here to test and then now the second one. 23 00:01:58,670 --> 00:02:04,970 So this is the second one where we are going to take the one zero by one. 24 00:02:05,930 --> 00:02:07,550 So the result should be it. 25 00:02:07,730 --> 00:02:10,420 So how do get something first? 26 00:02:10,470 --> 00:02:11,670 Is she frightened by one? 27 00:02:12,080 --> 00:02:13,850 So this is the original. 28 00:02:14,980 --> 00:02:23,590 Or, you know, one zero in binary for rotation, when you buy one, you get this and then here the 29 00:02:23,590 --> 00:02:25,580 second option is Shoveler by four. 30 00:02:26,140 --> 00:02:27,990 You get this all zeros. 31 00:02:28,480 --> 00:02:32,170 And then the operation is where you almost have it combined. 32 00:02:32,170 --> 00:02:33,230 Will you again? 33 00:02:33,320 --> 00:02:33,570 Yes. 34 00:02:34,120 --> 00:02:39,810 And finally, you must find once one of his five once. 35 00:02:40,090 --> 00:02:46,820 So what you do is you must first Phi Beta and then you get this. 36 00:02:46,900 --> 00:02:51,910 So this is a zero, not a 10 one that I said, 37 00:02:55,390 --> 00:02:56,530 OK, so this is the third one. 38 00:02:57,100 --> 00:03:02,180 You're going to retain this hex eight by one bit, so you should get four. 39 00:03:03,130 --> 00:03:07,930 So the original B for hexagon is in binary slyness. 40 00:03:08,800 --> 00:03:13,450 First option here is to SIFF right by one. 41 00:03:13,900 --> 00:03:16,960 So if you buy one, you get this from here. 42 00:03:17,320 --> 00:03:18,340 Everything musterer. 43 00:03:19,290 --> 00:03:26,620 And then the second operation is to shift by five minutes II, which is why for so many, all this land 44 00:03:26,670 --> 00:03:34,470 before this becomes this and then the third operation is to be called so many big armies, you combine 45 00:03:34,470 --> 00:03:36,990 both this and this, which you are getting this. 46 00:03:37,710 --> 00:03:44,160 But the last part you are Muskego, the first five is in this from this Rizza unit taking a force of 47 00:03:44,160 --> 00:03:48,580 IBS because you are Muscardini one, so you get four. 48 00:03:49,530 --> 00:03:56,300 So this is for C, so you can work out yourself, the rest of the two searches on your own based on 49 00:03:56,300 --> 00:03:57,000 the explanation. 50 00:03:57,220 --> 00:04:02,820 So this is the explanation for this algorithm of rotation. 51 00:04:03,370 --> 00:04:04,470 Thank you for watching.