WEBVTT

00:00.350 --> 00:07.160
Hello, my name is Stephan, and today we are going to explore a fascinating aspect of assembly language

00:07.160 --> 00:08.980
called or Logic.

00:08.990 --> 00:11.600
So don't worry if that sounds a bit confusing.

00:11.600 --> 00:18.620
So we are going to break it down using fun and relatable examples involving buttons and robots.

00:18.620 --> 00:29.900
So imagine you are in a super cool robot workshop and you have got two special buttons, a red one and

00:29.900 --> 00:31.550
a green one here.

00:32.090 --> 00:32.720
Right?

00:32.720 --> 00:40.340
So these buttons can either be pressed, which we call one, so we will note it down.

00:40.340 --> 00:41.510
Press.

00:44.290 --> 00:46.420
Is one.

00:48.190 --> 00:51.230
Or not pressed, which we will call zero.

00:51.250 --> 00:52.000
So.

00:52.760 --> 00:53.600
Not.

00:54.930 --> 00:55.770
Pressed.

00:59.230 --> 01:01.810
We will call zero here.

01:01.960 --> 01:09.940
So now let's say we want our robot to do something awesome if at least one of these buttons is pressed.

01:10.360 --> 01:17.410
So in the world of computers, we communicate with them using a language called assembly language.

01:17.420 --> 01:23.350
So it's like giving step by step instructions to our robot, but in a language it understands, right?

01:23.350 --> 01:28.510
So now we have a magical trick called all logic up our sleeves.

01:28.510 --> 01:36.970
So it's like having a super smart helper who can decide if something is true when we give them two choices.

01:36.970 --> 01:41.530
So imagine that our helper is named or so we introduce them to.

01:42.340 --> 01:44.580
You France So red button.

01:44.590 --> 01:49.090
So let's call our red button as our.

01:49.840 --> 01:51.090
One, right?

01:51.130 --> 01:53.130
Red button is actually.

01:54.180 --> 01:55.620
Write it in blue.

01:55.830 --> 01:59.850
The red button is our one.

02:03.090 --> 02:03.870
And.

02:04.870 --> 02:07.600
The green button, let's call the green button.

02:07.600 --> 02:09.580
R2 are.

02:10.330 --> 02:10.570
You.

02:13.180 --> 02:17.140
R1 and R2 tell us if they are pressed.

02:17.380 --> 02:21.010
The press is one or not pressed is zero.

02:21.010 --> 02:28.750
So now when we ask our helper which we named it or they check if let's actually yeah.

02:28.750 --> 02:36.850
Which we named it Mr. or they check if R1 is pressed or if R2 is pressed.

02:36.850 --> 02:44.470
So if at least one of them says yes, our helper excitedly routes yes.

02:44.470 --> 02:49.870
So but if both of them say no, our helper sadly says no.

02:49.870 --> 02:55.720
So if our red button here says yes.

02:58.200 --> 03:03.140
And our helper is happy and shoots.

03:03.150 --> 03:03.390
Yes.

03:03.390 --> 03:07.950
So if both R1 and R2.

03:08.720 --> 03:10.280
Says no.

03:11.570 --> 03:15.030
Then our helper is set.

03:15.050 --> 03:19.450
So it tells zero, right?

03:19.460 --> 03:20.980
So it tells no.

03:20.990 --> 03:28.430
So in assembly language, which is which is like a robot's secret secret language and the processors

03:28.670 --> 03:34.250
computer language, we use this all trick like that.

03:34.250 --> 03:34.670
Right.

03:34.670 --> 03:35.330
So.

03:36.300 --> 03:37.200
Here.

03:37.440 --> 03:41.370
We will also make it more explanatory with this here.

03:41.370 --> 03:42.810
So if.

03:42.810 --> 03:43.230
With.

03:43.230 --> 03:44.430
Or here.

03:44.580 --> 03:45.720
Or here.

03:46.260 --> 03:52.220
If one the left one is R1 here and the right one is R2.

03:52.230 --> 03:53.460
Let's write it down here.

03:53.490 --> 03:57.300
R1 and R2.

03:57.330 --> 04:02.910
So if R1 actually let's actually write it this like this one zero.

04:04.080 --> 04:05.130
And here.

04:05.830 --> 04:06.610
So.

04:10.700 --> 04:11.330
Here.

04:11.330 --> 04:15.110
So if R1 is true, which is.

04:15.110 --> 04:15.620
Yes.

04:15.620 --> 04:19.460
And R2 actually, let's actually we will also write the results.

04:19.460 --> 04:22.130
So it will more explanatory here.

04:23.600 --> 04:24.770
Write it like that.

04:30.080 --> 04:30.860
And.

04:31.620 --> 04:35.220
This here on the right side of this diagram.

04:35.730 --> 04:38.270
This here is our robot, right?

04:38.280 --> 04:41.040
So comma robot here.

04:44.590 --> 04:45.670
So here.

04:46.450 --> 04:56.410
If our left side R1 is one and R2 is zero, then our robot is happy here.

04:56.940 --> 04:57.660
And.

04:58.980 --> 05:00.680
It doesn't like like happy.

05:00.690 --> 05:00.960
Right.

05:00.960 --> 05:03.150
So our robot is happy here.

05:03.150 --> 05:04.550
So it is.

05:04.560 --> 05:05.100
Yes.

05:05.100 --> 05:07.890
So it it will give us one, Right.

05:07.890 --> 05:19.950
So if our R one is zero and r two is one, then our robot will be happy again and we'll say yes to us.

05:19.950 --> 05:23.670
And if both of them is zero.

05:25.380 --> 05:32.640
And our robot Sally is very angry here and will say no to us here.

05:33.770 --> 05:35.940
Angry and sad here.

05:35.960 --> 05:39.470
But if here are both of the.

05:41.200 --> 05:51.550
R1 and R2 is one, then our robot is same as happy as in the first two examples here.

05:51.550 --> 05:54.310
So it will say yes.

05:54.340 --> 05:54.820
Right.

05:54.820 --> 05:56.350
So this is how.

05:57.730 --> 06:01.180
Our order logic works in.

06:02.530 --> 06:03.740
Basically every language.

06:03.770 --> 06:10.750
So just like our helper or decides if something is true based on two choices and computers use this

06:10.750 --> 06:12.550
trick to make decisions.

06:12.850 --> 06:17.680
So next time you see a cool robot doing something, when you press a button, you will know that it

06:17.680 --> 06:26.740
is using a bit of or magic in its programming and keep exploring and have fun with your robot and hacking

06:26.740 --> 06:30.090
and reverse engineering and assembly programming adventures.

06:30.100 --> 06:32.260
So that's it.

06:32.290 --> 06:33.580
I'm waiting you in the next lecture.
