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.
+---\
A ----| >o---- NOT A
+---/
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:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.