You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
The NOT gate is the simplest logic gate. It takes a single input and produces the opposite (inverted) output. The NOT gate is also called an inverter. This is covered in OCR J277 Section 2.5.
The NOT gate performs negation. If the input is 1, the output is 0. If the input is 0, the output is 1. It simply flips the value.
In Boolean algebra, the NOT operation on input A is written as:
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
This is the simplest truth table — just two rows because there is only one input. With one input there are 2^1 = 2 possible input values.
OCR Exam Tip: The NOT gate is the only standard logic gate with a single input. All other gates (AND, OR, XOR, NAND, NOR) take two inputs. If an exam question asks for a gate with one input, it is always NOT.
The standard NOT gate symbol used in OCR exams consists of:
The triangle represents the gate body, and the bubble indicates inversion. You should be able to both recognise and draw this symbol in the exam.
flowchart LR
A((A)) --> NOT["NOT gate"]
NOT -->|NOT A| Q((Q))
The small circle at the tip of the triangle is the key feature that distinguishes the NOT gate from a simple buffer.
In Python:
# Using the not keyword
logged_in = False
if not logged_in:
print("Please log in")
In OCR pseudocode:
loggedIn = false
if NOT loggedIn then
print("Please log in")
endif
The not operator inverts the Boolean value. Since logged_in is False, not logged_in evaluates to True, so the message is printed.
The NOT gate has many practical uses in computing:
| Application | How NOT is used |
|---|---|
| Toggle switches | Pressing a button inverts the current state (on becomes off, off becomes on) |
| Error detection | A NOT gate can invert a signal to check for the opposite condition |
| Building other gates | NOT is combined with AND and OR to create NAND and NOR gates |
| Bitwise NOT | Flipping all bits in a binary number (e.g., NOT 0110 = 1001) |
When NOT is applied to a whole binary number, it inverts every bit:
| Input | NOT Output |
|---|---|
| 0 0 0 0 | 1 1 1 1 |
| 1 0 1 0 | 0 1 0 1 |
| 1 1 0 0 | 0 0 1 1 |
| 0 1 1 1 | 1 0 0 0 |
This is sometimes called the one's complement of a binary number.
Forgetting the bubble — when drawing the NOT gate symbol, always include the small circle at the output. Without it, the symbol represents a buffer (which does not change the input).
Confusing NOT with subtraction — NOT does not subtract from a value. It inverts the Boolean state.
Incorrect truth table entries — some students accidentally write the same value for input and output. Remember: the output is always the opposite of the input.
OCR Exam Tip: If you are asked to "state the output" of a NOT gate for a given input, you can answer in one word or number. For example, "If A = 1, then NOT A = 0."
Complete the following:
| A | NOT A |
|---|---|
| 1 | ? |
| 0 | ? |
Answers: NOT 1 = 0, NOT 0 = 1
not in Python, NOT in OCR pseudocode)Example 1: A single NOT inside a combined expression.
Evaluate Q = A AND (NOT B) when A = 1 and B = 0.
Step 1: NOT B = NOT 0 = 1. Step 2: Q = A AND (NOT B) = 1 AND 1 = 1.
Example 2: Double negation.
What does NOT (NOT A) evaluate to when A = 1?
Step 1: NOT A = NOT 1 = 0. Step 2: NOT (NOT A) = NOT 0 = 1.
So NOT (NOT A) = A. This identity is called the double negation law and is often used when simplifying Boolean expressions.
Example 3: NOT combined with OR.
Evaluate Q = (NOT A) OR B for every input combination.
| A | B | NOT A | Q = (NOT A) OR B |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 |
Q is only 0 when A = 1 and B = 0. Every other input combination gives Q = 1.
To understand NOT properly you need to see it working inside larger tables. Here is a 3-input expression using NOT on one variable:
Expression: Q = A AND B AND (NOT C)
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.