Related
Quick Links
Logic gate: a cool term, but what does it mean?
What Is aLogic Gate?
First, it’s important to realize that logic gates take many forms.
Even in our personal lives, we are constantly processing things through various logic gates.
While our minds are optimized at doing so, we often do not realize the thought process in motion.
However, it does take place.
If you thought this through and understood the concept, your mind has just processed aNOTgate!
In other words (pseudo code):
.
Such logic gates form the building blocks for much of the world’s code as well as for electronics.
Let’s look at each one in detail.
Note how we have two inputs and one output.
This isn’t the case for all logic gates.
All gates have one output.
In all other cases, the output of ourORgate will betrue.
Interestingly, if both inputs aretrue, the output will also betrue.
XOR
TheXORgate is also sometimes calledEORorEXOR.
The correct lingo for anXORgate isExclusive OR.
Welcome toXOR(exclusiveOR), which solves this problem, much in line with standard human reasoning.
If the input istrueandtrue, the output isfalse.
NOR
Remember our earlierNOTexample?
We’ve reversed things.
Hence, the outcome istrue(1).
In this image, we see an SN7400N chip that has four logic gates, namely,NANDgates.
Basically, anExclusive NOT-ORorExclusive NORgate.
The logic is as follows:
In other words, the reverse of aXORgate outcome.
Yes, it can get a little complex to follow.
NOT
We already briefly introduced theNOTgate earlier with our human equivalent example.
TheNOTgate basically reverses whatever input is given to it.
If you providetrueas the input, the output will befalseand vice versa.
Because we use aNOTgate, the output is true even thoughnot trueis false.
But practice makes perfect, and seasoned developers love to use complex gate conditional statements.
ANOTgate is usually represented by the!symbol.
We also had a brief look at logic gates as used in computer code.