Recently searched
      • Published 12 Jun 2023
      • Last Modified 25 Jan 2024
    • 6 min

    Guide to Logic Gates

    Whether in a microprocessor or assisting the processing of a computer, logic gates are everywhere and make up a crucial part of electronic devices.

     Logic Gates Banner

    Reviewed by Karl Ralph, Technical Support Engineer (February 2023)

    Logic gates are the thinking behind most of the electronic devices we use today. This guide breaks down the history of logic gates, what they can be used for, and what distinct types there are.

    What are Logic Gates?

    Logic gates are devices that are built from an arrangement of transistors and diodes. They are present in digital circuits, operate logically and give a binary outcome of either 0 or 1. These are known as switching functions or Boolean functions. Logic gates help the processing functions of these electronic devices and make decisions. There are seven logic gates in total and these are called AND, NOT, OR, XNOR, NAND, XOR and NOR gates.

    Each logic gate has its own logic gates symbol, which communicates how it is making its decision or why it is delivering a specific output.

    What Do Logic Gates Do?

    Logic gates are a decision part of a circuit, and convey these decisions through binary code, either as a digit 1 or digit 0. Most logic gates will have two inputs and then one output. The logic gate receives two streams of information and makes a logical decision of true (1) or false (0). They can be used with each other to create more complex decisions.

    The type of logic gate also aids in decision-making. For example, AND logic gates give a true reading if both inputs are true, and a false reading if both inputs are false or both inputs differ from each other. This is different from an OR gate, which will give a true reading if either or both inputs are true, but a false reading if both inputs are false.

    The only logic gate that differs in input and output is a NOT gate, which has one input and one output. On a NOT gate, if the input is true, the output will be zero.

    Each logic gate’s decisions or output can be worked out using a logic gates truth table. This is where you use the logic gate function to list inputs and calculate outputs, thus helping you understand what the logic gate is communicating when it delivers its output.

    Why Do We Need Logic Gates?

    Whilst not the most complex of devices, logic gates are a fundamental part of most technology. They help with processing and transmitting data based on their function. Virtually all complex technology will use logic gates to function.

    Why Do Computers Use Logic Gates?

    Computers run on binary code to communicate, transfer and process complicated data, so in terms of functionality, logic gates are best used for converting and manipulating data. Through logic gates, computers can process data easier, to perform more complex tasks.

    What are the Different Types of Logic Gates?

    As previously mentioned, there are seven types of logic gates, the first being the AND gate. The AND gate communicates that if input one and input two read as 1, its output will also be 1. If they both read as false, then the output will be false or 0. If they read differently, then the output will be false or zero.

    The second type of gate is the OR gate. This decides its output by finding truth in differing inputs. If input one is 0, and input two is 1, the output will be true or 1. However, if both inputs are 1, then the output will be 1 but if both are 0, the output will be 0.

    The third logic gate is a NOT gate. This is also called an inverter. It has one input which will always differ from its output.

    The fourth type of gate is a NAND gate. This gate operates as a NOT and an AND gate. If the inputs on this gate both read as 1, or one of them read as 1, then the output will be true. However, if both inputs read as true, the output of the gate will read as false

    The fifth gate is a NOR gate. Like the NAND gate, this gate is a combination of two gates, these being the OR and NOT gates. The gate will complete an OR function and a NOT function to decide its output.

    The sixth gate is an XOR gate, meaning either/or. The output will only be true if either input is true on its own.

    The final gate is an XNOR gate. This gate is a combination of an XOR and NOT gate. It will complete an XOR function followed by a NOT function to find its output value.

    FAQs

    Further Reading

    1 / 3