﻿1
00:00:04,790 --> 00:00:10,720
‫Welcome to the boose rhythm demonstration on the basis to develop a board for this demonstration we're

2
00:00:10,760 --> 00:00:15,300
‫using the boarded at 770 display located on the basis seaboard.

3
00:00:15,350 --> 00:00:21,370
‫We also are using a push button zero to simulate a clock with a barrel shifter or switch 0 and switch

4
00:00:21,380 --> 00:00:27,950
‫one are used selected to determine what we're doing with our barrel shifter if we're shifting right

5
00:00:27,950 --> 00:00:30,380
‫shifting left loading holding.

6
00:00:30,590 --> 00:00:31,570
‫So on and so forth.

7
00:00:32,000 --> 00:00:37,380
‫And our switch seven six and five are used to determine what shift amount.

8
00:00:37,460 --> 00:00:38,520
‫We'll be going for.

9
00:00:38,720 --> 00:00:39,700
‫We're shifting left to right.

10
00:00:39,710 --> 00:00:41,540
‫How much will be shifting.

11
00:00:41,540 --> 00:00:49,660
‫So to start out if we we have an initial value that we're loading into a register which is 128.

12
00:00:49,670 --> 00:00:56,000
‫So the first thing we can do if we set our switch one switch 0 2 0 1.

13
00:00:56,000 --> 00:01:04,220
‫We're going to shift to the right and by setting our shift amount by a switch 7 6 and 5 to 2 or 2 1

14
00:01:04,550 --> 00:01:10,170
‫what we're going to do is shift our bits right to one which is the same as a divide by two.

15
00:01:10,220 --> 00:01:16,700
‫So if I press that button we now divided from 128 to 64 and that's the key thing with the barrel shifter

16
00:01:16,700 --> 00:01:24,710
‫is you can go from a number such as 128 divided by 2 6 4 and we did that in one clock cycle.

17
00:01:24,710 --> 00:01:32,320
‫And so now if I pull my switch down we have a one and we go to a two hour shift right.

18
00:01:32,310 --> 00:01:33,150
‫Two-Bits.

19
00:01:33,290 --> 00:01:35,220
‫We're now dividing by four.

20
00:01:35,370 --> 00:01:40,820
‫So 64 two by four gives us 16 and we can keep going down.

21
00:01:40,820 --> 00:01:43,000
‫So now I can divide by 2 again.

22
00:01:43,120 --> 00:01:44,620
‫Sixty two gives me eight.

23
00:01:44,780 --> 00:01:50,360
‫And so we're able to do these operations really fast just one clock cycle so they're extremely cheap.

24
00:01:50,420 --> 00:01:54,250
‫Now if we go and let's get our.

25
00:01:54,510 --> 00:01:58,200
‫So now we're going to shift left operation which if we shift left.

26
00:01:58,280 --> 00:01:59,740
‫It's the same as multiplying.

27
00:01:59,960 --> 00:02:04,610
‫So we have right now set to 2 or 1 to be multiply by 2.

28
00:02:04,650 --> 00:02:13,060
‫If we said it we're going to shift left to bits which is multiplying by four or button gives us 32.

29
00:02:13,070 --> 00:02:17,510
‫Now if we go and make it two we shift left one bit.

30
00:02:17,570 --> 00:02:22,530
‫So now it's going to be multiplied by 2 and 32 times to 64.

31
00:02:22,550 --> 00:02:25,040
‫Now going to 64.

32
00:02:25,040 --> 00:02:32,300
‫So we can shift left and do a multiply multiply by multiples of 2 or shift right and divide by powers

33
00:02:32,300 --> 00:02:33,590
‫of 2.

34
00:02:33,950 --> 00:02:35,190
‫And also we can do better.

35
00:02:35,190 --> 00:02:37,160
‫So we have a load operation.

36
00:02:37,160 --> 00:02:39,550
‫So if we put both switches up high.

37
00:02:39,560 --> 00:02:41,890
‫Which ones which Zero will load it.

38
00:02:41,960 --> 00:02:44,020
‫And that's what the preconfigured value.

39
00:02:44,030 --> 00:02:49,700
‫Now if you were designing some sort of embedded processor or another piece of computer hardware you

40
00:02:49,700 --> 00:02:50,210
‫would have it.

41
00:02:50,210 --> 00:02:57,470
‫So the user or the code however you have it can load whatever pre-configured valued wanted your barrel

42
00:02:57,470 --> 00:02:58,130
‫shifter.

43
00:02:58,310 --> 00:03:04,690
‫So for example if you're making Alieu and you want that you've got to do it divide by two real quick.

44
00:03:04,850 --> 00:03:06,150
‫You had your load.

45
00:03:06,180 --> 00:03:07,860
‫That's one clock cycle.

46
00:03:07,910 --> 00:03:15,140
‫Now your second clock cycle you're going to change your configuration to switch one to high and your

47
00:03:15,320 --> 00:03:16,950
‫switch three.

48
00:03:17,010 --> 00:03:20,270
‫Once you're on shift right one bit.

49
00:03:20,270 --> 00:03:26,870
‫So the next clock cycle you're already divided by two 64 or most other multiplication or division algorithms

50
00:03:26,870 --> 00:03:28,790
‫will take multiple clock cycles.

51
00:03:28,790 --> 00:03:33,140
‫These can happen in one clock cycle and that's the whole thing we're trying to show with the barrel

52
00:03:33,140 --> 00:03:38,740
‫shifter is that in one clock cycle you can do a multiply or divide as long as it's the power of two.

53
00:03:38,920 --> 00:03:43,150
‫And that is that the barrel shift or demonstration running on the base is to board.

