‫Welcome to the boose rhythm demonstration on the basis to develop a board for this demonstration we're
‫using the boarded at 770 display located on the basis seaboard.
‫We also are using a push button zero to simulate a clock with a barrel shifter or switch 0 and switch
‫one are used selected to determine what we're doing with our barrel shifter if we're shifting right
‫shifting left loading holding.
‫So on and so forth.
‫And our switch seven six and five are used to determine what shift amount.
‫We'll be going for.
‫We're shifting left to right.
‫How much will be shifting.
‫So to start out if we we have an initial value that we're loading into a register which is 128.
‫So the first thing we can do if we set our switch one switch 0 2 0 1.
‫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
‫what we're going to do is shift our bits right to one which is the same as a divide by two.
‫So if I press that button we now divided from 128 to 64 and that's the key thing with the barrel shifter
‫is you can go from a number such as 128 divided by 2 6 4 and we did that in one clock cycle.
‫And so now if I pull my switch down we have a one and we go to a two hour shift right.
‫Two-Bits.
‫We're now dividing by four.
‫So 64 two by four gives us 16 and we can keep going down.
‫So now I can divide by 2 again.
‫Sixty two gives me eight.
‫And so we're able to do these operations really fast just one clock cycle so they're extremely cheap.
‫Now if we go and let's get our.
‫So now we're going to shift left operation which if we shift left.
‫It's the same as multiplying.
‫So we have right now set to 2 or 1 to be multiply by 2.
‫If we said it we're going to shift left to bits which is multiplying by four or button gives us 32.
‫Now if we go and make it two we shift left one bit.
‫So now it's going to be multiplied by 2 and 32 times to 64.
‫Now going to 64.
‫So we can shift left and do a multiply multiply by multiples of 2 or shift right and divide by powers
‫of 2.
‫And also we can do better.
‫So we have a load operation.
‫So if we put both switches up high.
‫Which ones which Zero will load it.
‫And that's what the preconfigured value.
‫Now if you were designing some sort of embedded processor or another piece of computer hardware you
‫would have it.
‫So the user or the code however you have it can load whatever pre-configured valued wanted your barrel
‫shifter.
‫So for example if you're making Alieu and you want that you've got to do it divide by two real quick.
‫You had your load.
‫That's one clock cycle.
‫Now your second clock cycle you're going to change your configuration to switch one to high and your
‫switch three.
‫Once you're on shift right one bit.
‫So the next clock cycle you're already divided by two 64 or most other multiplication or division algorithms
‫will take multiple clock cycles.
‫These can happen in one clock cycle and that's the whole thing we're trying to show with the barrel
‫shifter is that in one clock cycle you can do a multiply or divide as long as it's the power of two.
‫And that is that the barrel shift or demonstration running on the base is to board.