Now what we will do was we will start understanding how to use an automatic operator within N.S.A. in
day to day, Rachel.
First thing that we do is to include the mandatory library search.
So if we plan so if we plan to work with an unsigned order signed today, right, so we won't be required
to use I Tripoli Dot Numeric Standard.
Dartmouth did include all the operator definition, as well as it also include the definition for our
site and unsigned.
Now we proceed and declared signal's right, so we required to operate, which will be acting as the
data source for us.
So we proceed with the signal, right?
Let it just use the run rate and first operate with an unsigned data.
Right now, we need to specify the size range.
So let's assume that we want to operate with a fool, but I'll print state.
So this should be three down to zero rate and will be initially using this to let assume one zero zero
zero rate.
We required one more operator OK, which will serve as the second input for our making block.
So deemed to be OK again unsigned.
OK and sage will remain same.
There is three down to the zero rate.
The registry initialized is two zero one zero zero.
Right then the result of little will be of six five victory because forward will be allocated for a
sum and one bit will be allocated for a cardio great.
Similarly, if we consider subtraction.
OK, so the result of satisfaction will be forward and one which we need to allocate for a bar.
Right?
So both the variable, which will be holding the result of addition and subtraction, must be all size
VIPIT.
And if you consider a multiplication operation, so the size of variables should be at least twice the
size of our opening right.
So here are all printed off size for weight, so the variable which will be holding the result of multiplication
should be at least eight bit inside state.
So just go ahead.
Now we know that addition and multiplication would have a size of five it.
So we just could signal, OK, let's just declare a variable add.
OK.
This will be holding the result of addition, and some of which will be holding the result of subtraction.
OK.
Again, and say OK.
And this should be of size five with rates of four down to zero and will be initializing this to all
see.
Similarly, the variable which will be holding the result of multiplication, we'll just be naming it
as modeled, right?
Again, and say in this case, it should have at least a size of seven down to zero that is e betrayed
that it just initialized this to a zero no for a need.
Maybe we could just use this suffix as the x ray and then we could just add to zero state.
So this basically mean we are specifying the initialization value and then hexadecimal format, right?
So once we complete the declaration of the signal.
Now we know that we want to work with the signal.
So the type of reader that will be utilizing is the signal assignment operator, right?
So let's proceed with an add.
Now we need to make sure that the size that you have on an elite, you then added just matches because
visually the strongly typed language, right?
So when we consider this addition, so addition is of s it right, and if we consider D in one plus
d into so both have a size of four bit Rachel.
Not just you'll, you'll be noticing that we have a size of orbit, whereas on an elegies we have a
size of Typekit great.
So in this case, the good idea will be to match your size at eight.
So how you might just say this, you are pendency, right?
So Dean went to append anything with a variable.
So we have an ampersand operator in vista rates that will be appending zero.
And then I say to a single zero single could see, right?
So this is how you can work for a bit variable to a fiery trade.
So what we are doing here is we are appending zero.
OK, I then it must be all five variable rates assimilating will be falling for the into.
All right.
So this will make sure that we have a theme size on an allergist as well as our interest rate, and
we won't be getting error at a later date.
Three.
So this complete the expression for an add variable.
Now we proceed and just copy this expression that will be replacing add with subtraction right down.
In this case, we just need to replace this operator with minus three and four and multiplication.
Right.
So we just need to add the one cross to two, right?
So this makes sense.
So if you compute the multiplication to forbid multiplication and less requested bits say so here we
get a little bit reserved and here are two.
We created a great so.
We already have a match to take, right?
So let me just see what quote, right?
So here you could clearly see a green indication indicating that we are correctly following the language
syntax today.
Now we go ahead and try to perform a simulation.
So we all really set this source code as stopping the simulation thought.
So we could just proceed to perform runs simulation and perform a behavioral simulation.
Now, if you observe, right, so we have, Dean, when is it and into us four, right?
So eight plus for sure that it's early to tell.
So if we just right click on an ad and change the ratings to an unsigned decimal, right, so you would
clearly know this, we get the value of it, right?
The result of the extraction is eight minus four will give us four right and eight for the.
We get hexadecimal 20 right.
So to get an unsigned decimal, just right click on the bus and select 19 decimal and you'll be able
to notice 32, right?
So this is how you perform and are mighty operations with an operator and an unsigned at a rate.
So whenever you have lattices you here since the value is greater than the two, right?
So we are getting the positive result.
But if you assume that being one is having a lower value as compared to the into, in that case, we'll
be getting the boost compliment value right, which we need to convert to the respect to decimal number.
So let me just give a try to it to replace this with the into.
And then here we have Dean right now.
You could clearly see we are performing the subtraction between Dean two and Dean went right to Dean.
Two is having a lower value as compared to Dean one, right?
So we'll just see what line relaunch a simulation.
So now if you observe, right?
So eight plus four, 12 again addition will be seem OK, multiplication will be seen, but no, here
if we just change the relics to a binary for our subtraction.
So we are getting a value of one one one zero zero, right?
So the value that we received is one one one zero zero.
Right.
So whenever we have one over here that basically indicate that it is a negative number.
So this basically indicates that it is negative number and to get an equal in value, we need to find
out the two compliment, right?
So we have this resolved rate.
So first we get one compliment by complimenting every bit that we have in reserve ratio zero zero zero
one one.
Right.
So this is one compliment.
Now we just need to add one to it to get to compliment, right?
So when and when will it be zero and decision to carry when one will again be a zero?
This will again generate a carry.
So zero plus one use one and then we get two zeros, right?
So if you just find out an equal and decimal value, so it is four.
Right.
So the result is basically minus four.
And if you observe what we are doing is so our D into is having a value of four and in one is having
a value of eight, right?
So we are basically performing four minus eight and they should give us minus four, right?
And this is what is happening over here.