So, no, let us continue here.
So what if I have more inputs than that?
Well, that's very simple.
Let's say I want to create an X or gate with three inputs, so I just need to add input C and I need
to add here instead of four X or and I need to X or the other.
So I have all of this source and this C and I need to call this X or gate.
In these three places, then we need to save this save as.
And we're going to call this X or Y D now, next step, make sure this is a top entity and then compile.
We're done compiling now quickly that does create a BWF and.
We're going to add notes, not find her list.
Now we have three inputs and let us create the test bench.
We have three, so we have eight cases.
So first one is zero zero zero.
Then we have zero zero.
One.
Then we have.
Zero one one.
So here is one and it is one.
Next, we have one 00, so here we have one.
Then we have one zero one.
One zero.
And here is my one.
On the on the last bit.
Exactly, and now we have one one zero.
This is one.
On.
Zero.
And lastly, we have one on one, so all of these I want so we have zero zero zero four zero zero one
second case zero.
So we have zero zero zero first zero zero one second case.
Zero one zero.
We forgot the dear ones here, we're going to the end then zero one more than one zero zero, then one
zero one one one zero and one one one zero one one.
And we need the.
Zero one zero.
So this is zero, this one.
And it is so this is how we have all the combination now let us go to simulation simulation settings,
restore defaults.
And let's delete this line, click, save and let's go to simulation.
Would you like to save this?
Yes, I want to call it X or gave the same as the entity.
Name that at compile.
We're going to get an error, which is actually kind of a bug in the software.
So we need to go back simulation settings and restore default one more time and delete this line like
save got.
Yes.
And this is the result.
Well.
Remember X or give us a one when the signals are different, so zero zero zero, they are not different.
So it's a zero no zero zero one.
It's different.
Why?
Because zero zero.
Well, it's zero because it's an X or now this result of the two signals X them with the third signal,
with input C is like zero X or one.
It will give us one.
Now let us X or the first two signals zero.
And one of them is one.
But exorcising them with the last signal input C is going to give us one, X or one is zero.
See what you need to do here, you X or every couple on their own.
So one zero will give us one.
Extorting them was a zero, so one zero zero is one and so on, so forth.
Now here one zero will give us one of demos was one is zero.
That's correct.
No one X or one is zero zero zero is actually zero.
That's correct.
Now, when all of this are one, we're going to get one.
That's correct.
And zero X or one is one and one X or zero is one.
So that's correct.
So as you can see, this is how we create Gates.
You can go on and create any gate you want.
The same way the upcoming lectures.
We're going to create some combination of logic together.