‫Welcome to the barrow shift or demonstration with the already board I have the seven segments boy and
‫two slides which is set up on the breadboard.
‫The 7st display I have all the different segments type through the 56 ohm resistor back into the J port
‫p mod of the arty board and the four digit selects are coming into the GBP mod of the aready board and
‫then the two slides switches.
‫I have coming fed into the JCP model port.
‫Now once I load the the barrel shifter design onto the already board the 7st and display will show all
‫four zeroes.
‫And so what we want to do is by modifying the two flights which is on the breadboard which is R which
‫control what the barrel shifter does if there 0 0 we're going to hold it to 0 1.
‫Want to shift right.
‫If it's a 1 0 we want to shift left and if they're both ones we want to load a value in the value we're
‫going to load in is a preconfigured value that's set inside of the barrel shifter design.
‫So if we set both of the side switches to one which we just slide them both forward to the right and
‫push the button zero.
‫This will load the preconfigured value of 128 into our shift register.
‫So we push that we'll now see 128 shown on the 7 segment display.
‫So we want to do is do a divide operation.
‫So if we do a divide by two we'll see a value of 64 in order to do that.
‫We to set we shift by one bit to the left.
‫So in order to do a arcsin and one bit to the right.
‫So in order to do a right shift we want to have a value of 0 and then 1 on our slide switch and on our
‫shift switches which we have on the board we want to have a value of.
‫We wanted to put the least in the begin bit or the s w zero up to 1.
‫So this is going to shift the bits in our register the 128 one bit to the right which will effectively
‫be a divide by two.
‫So when I press this button 0 we should see a value of 64 on a 7 segment display.
‫Now I pressed it twice.
‫So you'll see what 64 and divide by 2 again.
‫Give us 32.
‫If I press it once more that will divide by two.
‫Once again and take it down to 16.
‫Now conversely we can go the opposite way.
‫If we do a shift left we will be actually multiplying.
‫So in order to do a shift left we want to have a 1 0.
‫So I got to switch my switches make it a 1 and then a zero.
‫So now I'm going to be multiplying by two because I'm doing a shift left.
‫So when I press the button I should take that 16 value and multiply it by two.
‫So I press the button you'll see me multiply that by two and get a value of 32.
‫I press the button once again or you get a value of 64 and now I keep pressing for press again I'll
‫get a value 128.
‫I just keep multiplying by 2.
‫Now what I can do at any point in time is go ahead and reload the value.
‫So if I make both of my slide switches at one that's the load configuration if I press my button zero
‫that gets my register back to the 128 value.
‫And so I can keep by selecting different division shift left or shift right.
‫We can perform very fast multiplication and division.
‫As always it's Empower them too.
‫So by changing our values to determine whether we're shifting left right and by changing the amount
‫we shift with a slide switches on the Ardie board down here we can determine how many what are multiplication
‫or division is by if it's 2 4 8 16.
‫So on and so forth.
‫And so the big thing with the bear shifter is it becomes a very efficient way to perform multiplication
‫and division.
‫Whenever you're doing something in a multiple of two.
‫And that is how the barrel shifter should be running on your already board.