If you just go through the numeric standard package, you'll be finding we have a tap shift and rotate
function, which include all the shift as well as rotate function.
Right.
So first, when we have the shift left, OK, which have an argument, as I'm saying, and it basically
returns on, say, right now I'm saying leadership is declaring and I Atripla Numeric Standard Library,
right?
So here we need to use an unsigned today rate.
So in the previous example, we considered standard analytical logic.
Right here we will be discussing Unsane.
And whenever you are in a situation where you want to perform and conversion between this to how you
handle this will be our understanding next, right?
So first shift left is used to perform the logical left shift right.
So whenever we specified the argument to be Unsane, that basically is the logical shift.
Right to similarly shift right with an unseen argument will give us the logical right shift.
Right shift left within sine argument will basically provide us an automatic shift rate again, since
we already know that the shift left and whether it is logical or not metric is exactly correct, right?
So you won't be finding any differences between them.
But when we consider the shift to right with Sinochem, right, so this gives us the automatic right
shift, right?
So you could clearly see perform a shift right on the sine vector.
OK.
And then the vacated positions are filled with the left most element right and left.
Mostly elements basically represent the sign MC rate.
So this is what we refer to as an Hartmut ActionScript.
This makes it so let it just go ahead and try to work with this shift, right?
So we go ahead.
And first thing that we declare is this is you a library, right?
So we need to include a library that allow us to work with all those operating right.
So we like to use AI Tripoli Dot Numeric.
OK, standard.
All right, this makes sense.
So this is how we include the numeric standard library, which consists of all the shift function.
And along with that declaration, four are unsigned unsigned.
Right now, we proceed with the signal.
OK?
We declare resumed in Rachel, which represent.
So which basically represent the original data.
OK, before a shift operation, right?
We're now we declared an on type right.
Again, similar to a standard underscore logic underscore vector.
We could specify the multiple, but by utilizing three down to zero or 0.3, right.
So I'm saying, let's assume that we work on forward.
So three down to zero.
OK, and we'll be initializing this tool.
This is in one zero one zero.
Right.
So this complete the declaration of a sickness temp, right?
And then we declared the two move signal right to one will be holding the result of a right logical
shift, and they will be holding a result of left logical shift right.
So the left logic shift?
OK.
This should again be when we work with Unsane D Drive.
So this should also be an Unsane way because then if we add an argument, OK, so if we add an argument
as an unsane visited in an unsafe rate to the variable which hold the result must also be of an unsigned.
So here also we are on st.
OK.
Three down to zero.
OK, and let it just initialize this too.
All right, this makes sense.
OK.
Next one is let's just declare one more variable, which will be holding the result of logical right
shift, right?
So logical, right?
And shift, OK.
Again, this would be off day one saying OK, saves would be three down to zero, and then we will be
adding again for zero three.
So this makes sense.
So now we proceed right when we consider the data flow more like states.
So how we assign your value to signal or a book is by utilizing the signal assignment operator, right?
So they just use the left logical shift right, then the signal assignment operator, right?
Then we use the function rate.
The function for us is to perform the shift left.
We will just be invoking shift left right.
Now this have two argument, right?
So first one is the value OK, or the variable whose value we want to shift and then the number of big
positions that we want to shift, right?
So let's assume we want to perform the left and right shift by a factor of one right.
So we want to shift by a single bit position, right?
So we add shift left the variable whose value we want to shift.
Is Dean right, so this represent the data source for us, which is Dean.
And then we want to perform the shift by a single big party.
So this is how we use shift left similarly right.
OK, so logical, right?
Shift.
OK, and this again, we will be utilizing the signal assignment operator.
OK, so the function is shift.
Then we have all right again.
We need to specify the source of our data, which is Dean, OK?
And then there are a number of additions that we want to shift, right?
So this completes the call.
Now what we going to do, it will just be receiving a call and we first perform simulation of this right
and then later on, we will be working with an automatic right.
So let's just go ahead and try to perform simulation rates or we'll go ahead and perform a behavioral
simulation.
Now if you also.
Right.
So let me just go ahead and change the radius of all the bus to the binary.
OK, so relics and binary.
So right click on a bus, OK, then change the rates to a binary.
Now, if you observe, right, so if I just zoom in a bit.
So we have an additional canteen in our register as one zero one zero.
Right.
So left, right or left shift will be left.
Shift will be adding the 08 and MSP saved rate.
So you could clearly see this one zero one.
OK.
So when we consider the left shift right, then that gives zero will be added at analyst bit rate and
whatever we have it and MSP will be simply doing all right.
So we have one at the MSB, so that will be thrown out again and then zero one zero will be shifted
in this direction, right?
So you can see we have zero one zero.
OK.
And then we have added zero and it's be great.
So this is our left shift.
And when we consider, all right, shift, right?
So in this case, the value that we have on any list, we will be thrown out, right?
So this zero will be one and one zero one will be shifted in the right direction, right?
So we have one zero one over here and we add zero right and it must be said great.
So this is working as expected right now.
We proceed and first load the simulation right.
Then we proceed to declare now if you remember, OK, so our package.
So just as that, whenever we want to perform an automatic shift, OK, so the data that we need to
feed as an argument should be sine and the variable that will be holding the result should also be assigned
right.
So we could not simply work with this data because we declare it to be the Unsane day right now.
What we're going to do is we declare signal right to be in to.
OK.
This will be all the same rate.
Again, we need to specify the size.
OK.
And then let it just add some random number, right?
Two one zero one zero.
Then we require two variables which will be holding the value of the automatic left and right.
Shift rates already just declared this to be automatic left shift right.
They should also be off sine die right.
So saying again side will be three down to zero.
OK.
And let's just initialize it to.
All right.
Similarly, we required one more variable, which will be touring the result of our automatic right
shift.
OK?
And again, size will be all fobbit and.
We will be initiating it with you right now, we proceed.
OK, so let me just use it and shift that is automatically left shift and this will be Quest two again.
The operator will remain.
That is Signal assignment operator.
We just need to use shift.
OK, again left.
This will work fine.
OK, so depending on the argument that you specify those specific type of shifts choosing right?
So if you buy an argument as a lot Unsane, OK, in that case, the logical shift will be choosing who
you are will be getting the result, which is equivalent to a logical shift.
And when we specify an argument to be saying in that case, we will be getting the result, which is
equivalent to an automatic shift right.
So shift left.
The source of data for us is Steve to.
OK, and let's assume you may want to perform shift by position of what right?
So this completes the code for our automatic left shift.
Now we have an automatic right shift, right?
This is equal to shift.
OK, and then we'll be utilizing right?
OK.
The source of data for us, this gain do.
And the number of pain.
The number of positions we want to shift is again, what makes this complete the quarter?
They just see output.
OK, and then try to again perform a simulation right now if you observe, right?
So we will just be deleting dean and logical shift rate.
So we'll just be using the bus and then press the delete button, right?
So this will remove the logical shift and dean from our V from you right now, we will be changing the
ratings
for.
All the variables to a binary.
Now you could see we have one zero one zero rate when we consider a left shift right, so left shift,
what it will do is whatever we have, one and a bet will be simply thrown out, right?
So this one will be gone.
Zero one zero will be shift in the left direction.
So we have a zero one zero and then we add zero at Analyst River Trade.
So this is exactly similar to what we been observing in that logical left shift, right?
But when we observe the right shift, right?
So this zero will be thrown out, right?
As usual, this is thrown up in one zero one is shifted in the right direction.
And whatever sign that we have is maintaining, then it must be positioned right.
So whatever recorded position that is being created?
OK.
As we remove the bits that will be filled by those signed, but that we have right.
So you're saying it is until we have a single bracketed position because we are performing shift by
a factor of one.
So that will be filled with the value that we have on and saying.
But in this case, it is what right?
So this is how we work within logical and an automatic shift.