So now we'll try to understand how we use an automatic operating in Virginia, right, so here.
First, let's proceed to decline a signal, OK, which will be holding the source of data for our automatic
clock, right?
So we declare two variables being 119 two, which represent our brand one an opening to four are automatic
block, right?
So we declare them to be of state standard and good logic and disco vector and the size that we specify,
it's full, but similarly to it's also of, say, standard underscore logic, underscore vector.
And then we have a four bit size, right?
So we initialized in one to seven, right?
So this you could clearly guess from here.
So 0111 is equal to seven.
Right.
So this is equal to seven.
And then two is equal to one right now when we consider an attrition rate.
So we need to allocate one more bit to who is the result of carry out, right?
So we declare the variable to hold the result of our addition as well as subtraction.
OK, and here we added the size to be four down to zero.
That is vibrant, so an extra bit is added to hold the result of carry out or about bottom right, then
for a multiplication.
OK, do we should have a size of at least eight because we are working with an all brand of sites for
bitrate, so we should at least look at the size of twice the size that we have for an open rate.
So we declared the variable model and that is the same the size of eight bit rate.
So we initialize it to zero.
And here we are specifying the initialization value in n hexadecimal format.
Hence we have added the suffix as x ray.
So first thing, whenever you want to work with a standard underscore logic, underscore vector, and
to perform an athletic operation is to include the mandatory library, let us assume that we want to
work on an unseen number eight.
So we'll just try to use it properly.
OK, Dot Standard underscore the logic underscore Unsane, right?
So this is the library that you need to include if you wish to work with an automatic operation and
with the standard and disco logic on the score vector type.
Right now, we proceed.
So here we have a signal, so to assign a value to a variable will again be utilizing a signal assignment
operator.
So this is how we work when we have a data flow, more exchange rate.
So addition.
OK, so I will be with to d in one.
OK, Blostein.
Remember that we usually strongly type language, so the size that you have on analogies must be matching
to the size that you have on an interest rate.
So on analogies, you have a size of five bit, whereas in and 192 is having a set of four bitrate.
So if you just perform this edition, we won't be getting any cardio through it.
So what we could do is we could just abandon zero, right?
And it might be OK.
So if fire is originally to carry, that will be automatically added on that fifth bitrate.
So to perform concatenation.
OK, so what we do is let's assume we want to obtain 018 and Mississippi State rate, so we are at an
impasse.
OK, and then we want to append zero and it must be.
So we'll just be at zero in a single rate and the parentheses rate.
So this is how we obtained zero at the Mississippi State.
Now this will make this entire thing firing rate of orbit from the union and the single zero will make
five it four out or opened one right.
Similarly, he will be making this to be also five bitrate.
So we basically match the size that we have on in colleges and an outrageous rate.
Similar thing we will be doing with then subtraction also.
So we'll go ahead and will try to add, OK, subtract, right?
We're here and this should be replaced with the subtraction operator.
Right?
The last thing is for a multiplication right multiplication.
We will just be doing the one rosti into right, so this will automatically return.
We'll give it an asterisk.
We basically retain the result of eight bit and we have an election that is also a size eight great.
So we do not need to perform any additional phases, right?
And they must be right now.
You could see we get a green indication over here.
So that basically means all the package that is required to work with an automatic operator are correctly
specified.
Now, if you just try to in this library, right, so you could clearly see that our compiler won't
be able to understand the proper definition for plus minus an asterisk, right?
If you're just whowere or an error, you could find that we that the compiler won't be able to find
any definition for an operator rate.
So whenever we work with the standard underscore logic on the score vector Unsane type, right?
And if we want to utilize and metric operator, then this is the package which is mandated.
So we'll just see what I could go ahead and try to perform a simulation.
So we already set this source as a top model and S.
So, OK, so we just need to go ahead and try to perform a simulation right now, you could clearly
see.
Right.
So our opinion will have a value of seven offering to have a value of one.
Right.
So the result of violation is seven plus one will result in to it.
The result of the extraction is six.
Now here, since option one is created an opening two and we are performing option one minus 0.2.
OK, so result will be positive rate and it is having a value of zero.
Similarly, the result of multiplication is seven cross one will be set right now.
Let's understand what will happen if we have the result of subtraction, which is negative, right?
And that will happen if we perform the subtraction between Dean two and in one right.
So the two have a value of one.
And Dean one have a value of seven three two one minus seven will be giving us minus six.
OK.
So let it just go ahead and try to see how we how you handle this situation whenever you have a negative
result for a subtraction operation, right?
So we'll just see why.
Now here we are performing a subtraction between the dying two and in one, right?
So this will give us the negative result.
They just go ahead and try to again, just click on this relaunch simulation.
OK, so this will again apply the updated stimulus to our duty and then we'll be analyzing the result
right now here, if you analyze.
So we have a seven right one.
OK, so election result is this makes sense.
And then we have a multiplication result at seven.
But if you analyze the subtraction, we are getting one zero to let it just go ahead and try to change
the relics to an unseen decimal rate.
So if you just select an unseen decimal, you get twenty six, right?
And if you just select the same decimal, you will be clearly finding that you are getting minus six,
right?
So whatever value that you see over here, right?
So if you just convert this to a binary, this is basically a CPU's complement value when we have a
negative result, right?
So let it just go ahead and try to see how we get minus six out of it, right?
So the value that we have over here is one one zero one zero eight.
So the value that we get after subtraction is one.
One zero one zero.
Right.
So first thing to observe is what you have it, and I miss pubic trade.
So this is one that basically mean the result is negative.
Right.
So this is the first instance out of this result, right?
Then as we have a negative result, OK, we need to find the two compliment value to predict, right?
So let it just invert all the bits that we have in the.
So one will be inverted to zero.
One will be negative two zero zero two one one two zero and zero to one right and after.
Inverting this, basically is to just give this one compliment right now, we proceed and add one to
this to get the two compliment value, right?
So when and when will returning to zero?
And here we have a carry rate, so this will be one.
This will be one.
And then we have a two zero three.
So if you find out any equal in decimal, so this will be six today.
So the result this is equivalent to minus six.
This is what we get because we are subtracting one minus seven, right?
So this is how you handle the situation when you get the negative number right.