WEBVTT

00:00.060 --> 00:04.980
So now we'll try to understand how we use an automatic operating in Virginia, right, so here.

00:05.100 --> 00:11.660
First, let's proceed to decline a signal, OK, which will be holding the source of data for our automatic

00:11.660 --> 00:12.150
clock, right?

00:12.450 --> 00:19.470
So we declare two variables being 119 two, which represent our brand one an opening to four are automatic

00:19.470 --> 00:19.970
block, right?

00:19.980 --> 00:26.130
So we declare them to be of state standard and good logic and disco vector and the size that we specify,

00:26.130 --> 00:30.660
it's full, but similarly to it's also of, say, standard underscore logic, underscore vector.

00:31.050 --> 00:34.110
And then we have a four bit size, right?

00:34.260 --> 00:37.020
So we initialized in one to seven, right?

00:37.030 --> 00:39.000
So this you could clearly guess from here.

00:39.010 --> 00:41.610
So 0111 is equal to seven.

00:42.180 --> 00:42.480
Right.

00:42.480 --> 00:44.100
So this is equal to seven.

00:44.340 --> 00:51.210
And then two is equal to one right now when we consider an attrition rate.

00:51.210 --> 00:55.460
So we need to allocate one more bit to who is the result of carry out, right?

00:55.470 --> 01:00.360
So we declare the variable to hold the result of our addition as well as subtraction.

01:00.570 --> 01:04.170
OK, and here we added the size to be four down to zero.

01:04.170 --> 01:10.500
That is vibrant, so an extra bit is added to hold the result of carry out or about bottom right, then

01:10.650 --> 01:11.790
for a multiplication.

01:11.820 --> 01:18.060
OK, do we should have a size of at least eight because we are working with an all brand of sites for

01:18.070 --> 01:23.340
bitrate, so we should at least look at the size of twice the size that we have for an open rate.

01:23.340 --> 01:28.770
So we declared the variable model and that is the same the size of eight bit rate.

01:28.770 --> 01:30.450
So we initialize it to zero.

01:30.460 --> 01:35.230
And here we are specifying the initialization value in n hexadecimal format.

01:35.230 --> 01:38.070
Hence we have added the suffix as x ray.

01:38.550 --> 01:43.770
So first thing, whenever you want to work with a standard underscore logic, underscore vector, and

01:43.770 --> 01:49.590
to perform an athletic operation is to include the mandatory library, let us assume that we want to

01:49.590 --> 01:51.370
work on an unseen number eight.

01:51.660 --> 01:53.850
So we'll just try to use it properly.

01:54.240 --> 01:58.590
OK, Dot Standard underscore the logic underscore Unsane, right?

01:58.590 --> 02:04.440
So this is the library that you need to include if you wish to work with an automatic operation and

02:04.440 --> 02:07.120
with the standard and disco logic on the score vector type.

02:07.220 --> 02:09.000
Right now, we proceed.

02:09.300 --> 02:15.630
So here we have a signal, so to assign a value to a variable will again be utilizing a signal assignment

02:15.630 --> 02:16.080
operator.

02:16.240 --> 02:20.580
So this is how we work when we have a data flow, more exchange rate.

02:20.580 --> 02:21.700
So addition.

02:21.720 --> 02:24.900
OK, so I will be with to d in one.

02:25.140 --> 02:26.180
OK, Blostein.

02:26.400 --> 02:32.130
Remember that we usually strongly type language, so the size that you have on analogies must be matching

02:32.130 --> 02:34.220
to the size that you have on an interest rate.

02:34.230 --> 02:40.680
So on analogies, you have a size of five bit, whereas in and 192 is having a set of four bitrate.

02:40.980 --> 02:44.940
So if you just perform this edition, we won't be getting any cardio through it.

02:44.970 --> 02:48.360
So what we could do is we could just abandon zero, right?

02:48.360 --> 02:49.500
And it might be OK.

02:49.570 --> 02:54.780
So if fire is originally to carry, that will be automatically added on that fifth bitrate.

02:55.080 --> 02:58.440
So to perform concatenation.

02:58.470 --> 03:04.620
OK, so what we do is let's assume we want to obtain 018 and Mississippi State rate, so we are at an

03:04.620 --> 03:05.100
impasse.

03:05.400 --> 03:08.220
OK, and then we want to append zero and it must be.

03:08.220 --> 03:13.080
So we'll just be at zero in a single rate and the parentheses rate.

03:13.090 --> 03:16.860
So this is how we obtained zero at the Mississippi State.

03:16.920 --> 03:24.090
Now this will make this entire thing firing rate of orbit from the union and the single zero will make

03:24.360 --> 03:26.840
five it four out or opened one right.

03:27.120 --> 03:30.680
Similarly, he will be making this to be also five bitrate.

03:30.690 --> 03:36.510
So we basically match the size that we have on in colleges and an outrageous rate.

03:37.380 --> 03:40.380
Similar thing we will be doing with then subtraction also.

03:40.380 --> 03:44.700
So we'll go ahead and will try to add, OK, subtract, right?

03:45.300 --> 03:49.200
We're here and this should be replaced with the subtraction operator.

03:49.260 --> 03:49.530
Right?

03:49.950 --> 03:53.260
The last thing is for a multiplication right multiplication.

03:53.370 --> 03:59.100
We will just be doing the one rosti into right, so this will automatically return.

03:59.640 --> 04:00.730
We'll give it an asterisk.

04:00.750 --> 04:06.620
We basically retain the result of eight bit and we have an election that is also a size eight great.

04:06.630 --> 04:09.900
So we do not need to perform any additional phases, right?

04:09.900 --> 04:11.490
And they must be right now.

04:11.850 --> 04:14.450
You could see we get a green indication over here.

04:14.460 --> 04:19.500
So that basically means all the package that is required to work with an automatic operator are correctly

04:19.500 --> 04:20.010
specified.

04:20.040 --> 04:26.790
Now, if you just try to in this library, right, so you could clearly see that our compiler won't

04:26.790 --> 04:31.350
be able to understand the proper definition for plus minus an asterisk, right?

04:31.590 --> 04:37.770
If you're just whowere or an error, you could find that we that the compiler won't be able to find

04:37.770 --> 04:39.690
any definition for an operator rate.

04:39.930 --> 04:45.680
So whenever we work with the standard underscore logic on the score vector Unsane type, right?

04:45.870 --> 04:51.030
And if we want to utilize and metric operator, then this is the package which is mandated.

04:51.330 --> 04:56.130
So we'll just see what I could go ahead and try to perform a simulation.

04:56.130 --> 04:59.820
So we already set this source as a top model and S.

05:00.270 --> 05:06.050
So, OK, so we just need to go ahead and try to perform a simulation right now, you could clearly

05:06.050 --> 05:06.440
see.

05:06.890 --> 05:07.190
Right.

05:07.430 --> 05:11.000
So our opinion will have a value of seven offering to have a value of one.

05:11.070 --> 05:11.260
Right.

05:11.270 --> 05:14.810
So the result of violation is seven plus one will result in to it.

05:15.260 --> 05:17.100
The result of the extraction is six.

05:17.120 --> 05:23.570
Now here, since option one is created an opening two and we are performing option one minus 0.2.

05:23.900 --> 05:27.920
OK, so result will be positive rate and it is having a value of zero.

05:28.760 --> 05:33.590
Similarly, the result of multiplication is seven cross one will be set right now.

05:33.590 --> 05:39.710
Let's understand what will happen if we have the result of subtraction, which is negative, right?

05:39.980 --> 05:46.340
And that will happen if we perform the subtraction between Dean two and in one right.

05:46.340 --> 05:48.080
So the two have a value of one.

05:48.320 --> 05:54.470
And Dean one have a value of seven three two one minus seven will be giving us minus six.

05:54.500 --> 05:54.770
OK.

05:54.980 --> 06:00.770
So let it just go ahead and try to see how we how you handle this situation whenever you have a negative

06:00.770 --> 06:02.830
result for a subtraction operation, right?

06:02.850 --> 06:03.650
So we'll just see why.

06:04.310 --> 06:08.900
Now here we are performing a subtraction between the dying two and in one, right?

06:08.900 --> 06:10.760
So this will give us the negative result.

06:11.180 --> 06:15.710
They just go ahead and try to again, just click on this relaunch simulation.

06:15.920 --> 06:23.510
OK, so this will again apply the updated stimulus to our duty and then we'll be analyzing the result

06:23.510 --> 06:26.330
right now here, if you analyze.

06:26.360 --> 06:29.030
So we have a seven right one.

06:29.360 --> 06:32.030
OK, so election result is this makes sense.

06:32.420 --> 06:35.600
And then we have a multiplication result at seven.

06:35.600 --> 06:41.600
But if you analyze the subtraction, we are getting one zero to let it just go ahead and try to change

06:41.600 --> 06:44.300
the relics to an unseen decimal rate.

06:44.300 --> 06:47.870
So if you just select an unseen decimal, you get twenty six, right?

06:47.870 --> 06:54.380
And if you just select the same decimal, you will be clearly finding that you are getting minus six,

06:54.380 --> 06:54.620
right?

06:54.620 --> 06:57.020
So whatever value that you see over here, right?

06:57.020 --> 07:02.360
So if you just convert this to a binary, this is basically a CPU's complement value when we have a

07:02.360 --> 07:03.460
negative result, right?

07:03.470 --> 07:08.630
So let it just go ahead and try to see how we get minus six out of it, right?

07:08.810 --> 07:12.770
So the value that we have over here is one one zero one zero eight.

07:13.280 --> 07:17.060
So the value that we get after subtraction is one.

07:18.750 --> 07:22.020
One zero one zero.

07:22.110 --> 07:22.380
Right.

07:22.650 --> 07:26.540
So first thing to observe is what you have it, and I miss pubic trade.

07:26.550 --> 07:30.750
So this is one that basically mean the result is negative.

07:30.870 --> 07:31.010
Right.

07:31.010 --> 07:34.680
So this is the first instance out of this result, right?

07:34.980 --> 07:42.650
Then as we have a negative result, OK, we need to find the two compliment value to predict, right?

07:42.660 --> 07:45.960
So let it just invert all the bits that we have in the.

07:46.440 --> 07:48.150
So one will be inverted to zero.

07:48.390 --> 07:55.170
One will be negative two zero zero two one one two zero and zero to one right and after.

07:56.120 --> 08:03.050
Inverting this, basically is to just give this one compliment right now, we proceed and add one to

08:03.050 --> 08:05.090
this to get the two compliment value, right?

08:05.090 --> 08:08.210
So when and when will returning to zero?

08:08.240 --> 08:11.060
And here we have a carry rate, so this will be one.

08:11.450 --> 08:12.470
This will be one.

08:12.470 --> 08:14.150
And then we have a two zero three.

08:14.420 --> 08:18.260
So if you find out any equal in decimal, so this will be six today.

08:18.650 --> 08:25.140
So the result this is equivalent to minus six.

08:25.400 --> 08:29.500
This is what we get because we are subtracting one minus seven, right?

08:29.510 --> 08:33.250
So this is how you handle the situation when you get the negative number right.
