aımnova
DashboardMy LearningCrash CoursesStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Crash Courses
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Teachers
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aımnova

IB study, practice and feedback built around the real exam.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.c1e448f

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer ScienceTopic 1.2Logic gates
Back to Computer Science Topics
1.2.34 min read

Logic gates

IB Computer Science · Unit 1

IB exam ready

Study like the top scorers do

Access a smart study planner, AI tutor, and exam vault — everything you need to hit your target grade.

Start Free

Contents

  1. 1What a gate does
  2. 2The seven gates
  3. 3Gates doing real jobs
  4. 4Exam-style question
The big idea: A logic gate takes one or two bits in and gives one bit out.

Which bit comes out depends only on which bits went in — the same inputs always give the same output, every time.
Why they matter: Gates are what the CPU is physically built from. Adding two numbers, comparing them, choosing between two paths — all of it is gates wired together.

Everything the CPU does sits on top of this.

Free preview

This is the free notes preview

You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:

  • FlashcardsLock in vocabulary and key terms with spaced repetition.
  • Practice questionsAnswer exam-style questions and get instant AI marking.
  • Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
  • Personalised study planA daily plan built around your exam date and weak areas.
Start Studying Free Full access to Aimnova Pro · cancel anytime

Each gate's symbol beside its truth table. Step through all seven.

Interactive diagram

Explore the labelled diagram, charts and maps for this topic in full study mode.

Claim your free topic

The three basic ones

  • AND — 1 only when both inputs are 1
  • OR — 1 when at least one input is 1
  • NOT — flips the input; one input only
  • Every other gate is built from these

The inverted ones

  • NAND — AND with the output flipped
  • NOR — OR with the output flipped
  • Shown by a small circle on the output
  • The circle always means "then invert"

The exclusive ones

  • XOR — 1 when the inputs are different
  • XNOR — 1 when the inputs are the same
  • Shown by an extra curved line at the back
  • XOR answers "do these disagree?"
Learn the circle, halve the work: NAND is not a new table to memorise — it is the AND table with every output flipped. Same for NOR and OR, and XNOR and XOR.

Three tables plus the circle gives you all seven.

Memorize terms 3x faster

Smart flashcards show you cards right before you forget them. Perfect for definitions and key concepts.

Try Flashcards FreeYour first topic is free to keep • No credit card required
A gate is a condition in hardware: Every gate answers one yes-or-no question about its inputs. Wire a few together and you have a rule the machine obeys without any program running.
1

AND — every condition must hold

A microwave runs only if the door is closed AND the timer is running. Either input at 0 and the output is 0, so the machine stops.

Use AND whenever the rule says "both" or "all".

2

OR — any one condition is enough

A car alarm sounds if the driver's door opens OR the passenger's door opens OR the boot opens.

Use OR whenever the rule says "either" or "any".

3

XOR — the two must disagree

A landing light controlled by a switch at the top of the stairs and one at the bottom: flipping either switch changes the light.

XOR is also how a processor adds two bits: 1 + 1 gives 0 and carries.

4

NOT — turn a condition around

A fridge's cooling runs when the temperature is not below the target.

NOT is how a circuit acts on the absence of something rather than its presence.

How this is tested — you must name the right gate for a stated rule and justify it from the rule's wording. It comes up two ways:

Paper 1 Section A

  • Describe what a named gate does, 1-2 marks
  • Choose the gate that matches a described rule
  • State the purpose of gates in a computer

Paper 1 Section B — case study

  • Identify the logic behind a case study control rule
  • Explain what happens when one input changes
The classic trap: Confusing OR with XOR. Plain OR is still 1 when both inputs are 1; XOR is 0 there. If the rule says "one or the other but not both", it is XOR.
IB-style questionDescribe[4 marks]

A lift door may close only when the door sensor is clear and the close button has been pressed. It must not close if the emergency stop is active. Describe the gates needed and what each does.

Model answer plan

See the answer broken into clear points, with guidance on how each point earns marks.

Claim your free topic

Try an IB Exam Question — Free AI Feedback

Test yourself on Logic gates. Write your answer and get instant AI feedback — just like a real IB examiner.

the output of an AND gate when both of its inputs are 1. [1 mark]

Related Computer Science Topics

Continue learning with these related topics from the same unit:

1.1.1CPU components1.1.2The GPU1.1.4Primary memory1.1.5Fetch–decode–execute
View all Computer Science topics
Improve your exam techniqueCommand terms, paper structure, and mark-scheme tips for Computer Science
Previous1.2.2Storing data in binaryNextTruth tables1.2.4

21 questions to test your understanding

Reading is just the start. Students who tested themselves scored 82% on average — try IB-style questions with AI feedback.

Start FreeView All Computer Science Topics