Step 4: Logic Gates
A computer consists of thousands of logic gates arranged to carry out certain functions. A logic gate is a component in digital electronics whose output depends on the state of its inputs. Most logic gates have two inputs and one output. You can think of logic gates as the decision-makers in digital electronics. The six main logic gates used in digital electronics are:
AND Gate: Output is high when all if its inputs are high.
OR Gate: Output is high when any of its inputs are high.
NOT Gate: Only has one input. Output is high when its input is low.
NAND Gate: Output is high unless all of its inputs are high.
NOR Gate: Output is high when none of its inputs are high.
XOR Gate: Output is high when an odd number of inputs are high.
Tri-State Buffer: A buffer that is controlled by a third logic signal.
It is important to mention now the difference between a high "1" signal and a low "0" signal. A high signal can either be a connection to positive voltage or it can be a floating input. A floating input is one that is not connected to any output. An example of a floating input would be one that is not connected at all or one that is connected to the output of a 3-state buffer that is not activated. A low signal is present when an input is at ground.
Logic gates can be fed into each other to produce almost any function imaginable. For instance, two NOR gates can be fed into each other to store one bit of data in a RS_NOR latch while power is supplied to the circuit.