TutorChase logo
Login
AQA A-Level Computer Science

15.4.1 Basic Logic Gates

Logic gates are the fundamental components of digital electronic circuits. They process binary inputs, which can be either 0 (low/off) or 1 (high/on), and produce outputs according to specific logical rules. These gates underpin everything in digital computing—from simple arithmetic operations to the decision-making functions of processors.

What is a logic gate?

A logic gate is an electronic component that performs a basic logical function. It takes one or more binary inputs and produces a single binary output based on a rule defined by the type of gate. These gates are used to build combinational logic circuits that perform tasks such as arithmetic, comparison, and data storage.

There are six standard logic gates that are commonly used in digital electronics:

  • NOT

  • AND

  • OR

  • XOR

  • NAND

  • NOR

Each of these gates has a unique logical function, a symbolic Boolean expression, and a graphical representation defined by ANSI/IEEE standard 91-1984.

NOT gate (inverter)

Function

The NOT gate is the simplest of all gates. It has only one input and one output. The function of the NOT gate is to invert the input. This means:

  • If the input is 0, the output is 1.

  • If the input is 1, the output is 0.

Take your grades to the next level!

UPGRADING TO PREMIUM UNLOCKS
AI Tutor
AI-powered study assistant
instant feedback and guidance
Predicted Papers
Examiner-style predicted papers
based on recent exam trends
Practice Questions
All exam practice questions
by topic for each subject
Study Notes
All detailed revision notes
written by expert teachers
Cheat Sheets
Quick revision summaries
perfect for last-minute review
Past Papers
Complete collection
of practice and past exam papers
Email
Password
Confirm Password
Already have an account?

Practice Questions

FAQ

The NOT gate, also known as an inverter, is fundamental in digital logic because it allows systems to perform logical negation. Although it only has one input and one output, its ability to reverse a binary value makes it indispensable. In practice, NOT gates are crucial in constructing more complex gates and logic functions. For instance, they are used in the creation of NAND and NOR gates, which are themselves universal gates capable of forming any logic circuit. The NOT gate is also essential in memory circuits where inversion determines whether a bit is stored or cleared. In decision-making logic, a NOT gate can flip conditions to allow for "if not" scenarios. Without the NOT gate, many logical decisions would be limited or require unnecessary complexity using alternative arrangements of gates. It’s also used in enabling or disabling certain parts of a circuit based on conditions. Despite its simplicity, its impact on circuit design is significant.

Yes, logic gates can have more than two inputs, and this is quite common in practical digital circuit design. While most examples use two inputs for simplicity, gates like AND, OR, NAND, and NOR can handle three or more inputs. The behaviour remains consistent with their logical definitions. For instance, an AND gate with three inputs will only output 1 if all inputs are 1; if even one is 0, the output is 0. Similarly, a three-input OR gate will output 1 if any one or more inputs are 1. As the number of inputs increases, the size of the truth table grows exponentially, with 2^n rows, where n is the number of inputs. This complexity can make manual analysis more difficult but offers greater flexibility in building compact circuits. These multi-input gates are useful in systems requiring simultaneous conditions or triggers from multiple sources to operate or activate a process.

The inversion bubble is a small circle placed at the output of certain logic gate symbols, and it plays a critical role in indicating logical negation. It appears in the symbols of NOT, NAND, and NOR gates, and serves as a visual cue that the output has been inverted. For instance, an AND gate outputs 1 only when all inputs are 1, but if you add an inversion bubble, it becomes a NAND gate, which does the opposite—outputting 0 when all inputs are 1. This bubble is more than just a symbol; it defines the logic behaviour of the gate. Without it, a circuit diagram would be misleading and potentially interpreted incorrectly. The presence of the inversion bubble ensures clarity in reading and designing logic diagrams, especially in complex circuits where combinations of gates are used. It also simplifies circuit notation by making negation visually immediate, removing the need for extra NOT gates in some configurations.

Unlike AND, OR, and similar gates, XOR and XNOR gates behave differently when extended to more than two inputs, and their operation is not simply an extension of the two-input case. A multi-input XOR gate outputs 1 if the number of 1s at the inputs is odd, and 0 if the number is even. This is because XOR performs a binary comparison: it outputs true if inputs differ. So, with three inputs A, B, and C, the gate outputs 1 only when one or all three of the inputs are 1 (i.e., an odd count). Similarly, an XNOR gate outputs 1 when the number of 1s is even. This behaviour is less intuitive than that of AND or OR gates, where the logic scales linearly with input count. Therefore, when using XOR or XNOR gates with more than two inputs, designers must take care in analysis and construction, often breaking the logic into multiple two-input gates for predictability.

NAND and NOR gates are called universal gates because they can be combined to replicate the functionality of any of the other basic logic gates, including AND, OR, and NOT. This means that any digital logic circuit, no matter how complex, can be constructed using only NAND gates or only NOR gates. This universality offers several advantages in circuit design. Firstly, using a single gate type simplifies manufacturing processes and reduces costs, as fewer different components are needed. Secondly, NAND gates in particular are faster and more power-efficient in many integrated circuits, which makes them a preferred building block in modern microprocessors. Additionally, universal gates allow for standardisation in logic families, such as TTL and CMOS, where designers may choose to use only NAND or NOR logic throughout a system. This flexibility also enhances fault tolerance and makes troubleshooting easier, since redundant functions can be recreated even if some gate types are unavailable.

Hire a tutor

Please fill out the form and we'll find a tutor for you.

1/2
Your details
Alternatively contact us via
WhatsApp, Phone Call, or Email