Digital Building Blocks – GATES

GATES are DIGITAL BUILDING BLOCKS. They are called DIGITAL because they operate on digital principles. They require a signal (also called a PULSE or INPUT) that is either 0v (LOW) or rail volts (HIGH) and give out a signal that is either LOW or HIGH.

Gates can also accept MORE THAN ONE INPUT but always have ONLY ONE OUTPUT.

Gates do not amplify (we are talking about voltage amplification). The amplitude of the input must be very close to rail voltage for the gate to work and the output is very nearly rail voltage.


They take 1, 2 or more inputs and make the output HIGH if a certain condition is present. It may be all inputs HIGH. Or all inputs LOW. Or only one input HIGH or LOW.

A “gate operation” can be programmed into a Microcontroller, constructed with individual components such as diodes and resistors or obtained as a CHIP. This discussion describes that last two.

There are lots of times when a GATE is required in a circuit and it’s important to understand HOW THEY WORK so you can make one if needed.

For example, an alarm circuit may require to be triggered when a door is opened AND a pressure mat is activated. This feature can be built into the microprocessor controlling the whole circuit or you can use a separate chip. But if you know how gates work, it may only require a few extra components.

The situation above is an AND decision. The digital block for this is drawn as:

AND Gate Logic

The block has two inputs and a single output. It can have 3 or more inputs but we will describe only the two-input version of all gates. The “conventional” symbol is the easiest to remember. It is like the letter “D.” The mechanical way of explaining how the gate works is shown below. Two relays inside the block must be activated for the globe to illuminate.

Note: When an input to a gate is not connected to a switch, it is pulled-down internally. In other words it “sees” a LOW.

AND Gate Logic Animation

The electrical equivalent of the AND gate is:

electrical equivalent of the AND gate

There is also the OR gate, where ONE input will activate the output. The digital block for this is:

OR Gate Logic

The mechanical OR is shown below:

OR Gate Logic Animation

The electrical equivalent of the OR gate is:

electrical equivalent of the OR gate

If you require a globe to NOT WORK when an input is HIGH, the gate is called an INVERTING DECISION MAKER or INVERTER.

The block for this is drawn as a triangle with a circle or “bubble” on the output. The circle indicates inversion and the block is called a NOT function (remember the circle as a bow or KNOT).

NOT Gate Logic

The NOT gate is an inverting gate. When the input is LOW the output is HIGH and when the input is HIGH, the output is LOW. This is shown on the diagram below:

NOT Gate Logic Animation

We can combine the AND gate with the INVERTER to obtain a gate with 2 (or more) inputs and  “inverts.” The result is a NAND function (comes from Not  +  AND).

NAND Gate Logic

For a NAND gate, the output is HIGH when any input is LOW.

NAND Gate Logic Animation

A NOR gate can be produced by combining an OR gate with an INVERTER.

NOR Gate Logic

For a NOR gate, the output is LOW  when any input is HIGH.

NOR Gate Logic Animation

Another very handy gate is the EXCLUSIVE OR. The output is HIGH when ONLY ONE of the inputs is HIGH. You will notice the OR gate above has this feature but the output is also HIGH when BOTH inputs are HIGH. The standard OR gate is sometimes called the INCLUSIVE-OR for this reason.

XOR Gate Logic Animation

There is one gate that really doesn’t perform like a gate. It is the BUFFER. The output is the same as the input. It was needed for the original logic chips as they required a small amount of current into the input lines and if a chip had to drive a number of other chips, a BUFFER was required.

Chip-design has now improved and BUFFER chips are no longer required.

To complete this discussion on gates, we have included the BUFFER:

Buffer Gate

Each gate produces a number of results and these can be placed in a table so it is easy to see exactly what will happen when each combination of HIGH’s and LOW’s is presented to the gate. This table is called  a TRUTH TABLE and the truth table for each gate is shown below:

Logic Gates Truth Tables

Study the following waveform diagrams to see how each gate operates:

XOR Gate Working Animation NOR Gate Working Animation OR Gate Working Animation NAND Gate Working Animation AND Gate Working Animation NOT Gate Working Animation

Question : Name the gate that that has a single input and the output is INVERTED.

Ans: The NOT gate.

Question : Name the gate that is HIGH, only when both inputs are HIGH.

Ans: The AND gate.

Question : Name the gate that is only HIGH when ONE INPUT is HIGH.

Ans: The XOR gate. This is the advantage of the exclusive-OR gate.


We have seen how the output of a gate goes HIGH or LOW when certain conditions are present on the input lines. But how does a gate work and what does it do when it is placed in a circuit? This is the first thing to be discussed on the next page.


Modern circuits require very few individual “logic blocks” (digital gates) as any “decision making” can be programmed into a microcontroller. If an individual gate is required, it can sometimes be created with separate components. On the next page we show how to create the “effect” of some of the gates. It is called “GATING.”

We say “effect” of some of the gates because the signal normally goes though a gate (as you will see) but with a gating pulse, a signal is “blocked” or “allowed to pass.”


Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

Leave a Comment