Hello, my name is Stephan, and today we are going to explore a fascinating aspect of assembly language
called or Logic.
So don't worry if that sounds a bit confusing.
So we are going to break it down using fun and relatable examples involving buttons and robots.
So imagine you are in a super cool robot workshop and you have got two special buttons, a red one and
a green one here.
Right?
So these buttons can either be pressed, which we call one, so we will note it down.
Press.
Is one.
Or not pressed, which we will call zero.
So.
Not.
Pressed.
We will call zero here.
So now let's say we want our robot to do something awesome if at least one of these buttons is pressed.
So in the world of computers, we communicate with them using a language called assembly language.
So it's like giving step by step instructions to our robot, but in a language it understands, right?
So now we have a magical trick called all logic up our sleeves.
So it's like having a super smart helper who can decide if something is true when we give them two choices.
So imagine that our helper is named or so we introduce them to.
You France So red button.
So let's call our red button as our.
One, right?
Red button is actually.
Write it in blue.
The red button is our one.
And.
The green button, let's call the green button.
R2 are.
You.
R1 and R2 tell us if they are pressed.
The press is one or not pressed is zero.
So now when we ask our helper which we named it or they check if let's actually yeah.
Which we named it Mr. or they check if R1 is pressed or if R2 is pressed.
So if at least one of them says yes, our helper excitedly routes yes.
So but if both of them say no, our helper sadly says no.
So if our red button here says yes.
And our helper is happy and shoots.
Yes.
So if both R1 and R2.
Says no.
Then our helper is set.
So it tells zero, right?
So it tells no.
So in assembly language, which is which is like a robot's secret secret language and the processors
computer language, we use this all trick like that.
Right.
So.
Here.
We will also make it more explanatory with this here.
So if.
With.
Or here.
If one the left one is R1 here and the right one is R2.
Let's write it down here.
R1 and R2.
So if R1 actually let's actually write it this like this one zero.
And here.
So.
Here.
So if R1 is true, which is.
Yes.
And R2 actually, let's actually we will also write the results.
So it will more explanatory here.
Write it like that.
And.
This here on the right side of this diagram.
This here is our robot, right?
So comma robot here.
So here.
If our left side R1 is one and R2 is zero, then our robot is happy here.
And.
It doesn't like like happy.
Right.
So our robot is happy here.
So it is.
Yes.
So it it will give us one, Right.
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.
And if both of them is zero.
And our robot Sally is very angry here and will say no to us here.
Angry and sad here.
But if here are both of the.
R1 and R2 is one, then our robot is same as happy as in the first two examples here.
So it will say yes.
Right.
So this is how.
Our order logic works in.
Basically every language.
So just like our helper or decides if something is true based on two choices and computers use this
trick to make decisions.
So next time you see a cool robot doing something, when you press a button, you will know that it
is using a bit of or magic in its programming and keep exploring and have fun with your robot and hacking
and reverse engineering and assembly programming adventures.
So that's it.
I'm waiting you in the next lecture.