Sparklabs Learning / Digital Technology
JSS 3 First Term
Week 7: Web Development and Web Design
- School
- Creative Brains Academy
- Subject
- Digital Technology
- Pack
- Learner notes
- Prepared
- 7 November 2026
Week index
- 01Senior Review and Computational Problem Solving
- 02Advanced Programming
- 03Functions, Arrays and Data Structures
- 04Object-Oriented Programming
- 05Database Systems
- 06Computer Networks and Internet Technologies
- 07Web Development and Web Design
- 08Software Development Life Cycle
- 09Electronic Commerce
- 10Cyber Security and Emerging Digital Technologies
- 11Revision
- 12Examination
Week 7 / First Term
Web Development and Web Design
Monday 19 October 2026 to Friday 23 October 2026
Lesson notes
Learning Objectives
- Explain what a logic gate is and how it uses bits.
- State the rule of the AND, OR and NOT gates.
- Draw truth tables for the basic gates.
- Describe how gates are combined in a computer.
Starter Scenario
A school laboratory will only let a computer start when two conditions are both true, the door key card is inserted and the power switch is on. If either one is missing, the computer stays off. This is a real world AND decision, because both conditions must be true together. In a computer, a small circuit called an AND gate makes exactly this kind of choice.
What is a Logic Gate
A logic gate is a small electronic circuit that takes one or more inputs, each being 0 or 1, and gives a single output, also 0 or 1. Because every part of a computer stores data as bits, gates are the building blocks that move and combine those bits. The three basic gates are AND, OR and NOT. Each follows a fixed rule, no matter what it is connected to, and its rule can be shown in a truth table. Computers contain millions of gates packed onto a tiny silicon chip, and by combining many gates the computer can add numbers, compare values and follow instructions.
The AND Gate
An AND gate has two inputs and one output. Its rule is simple. The output is 1 only when both inputs are 1. In any other case the output is 0. The AND rule is like two switches in one room light circuit. The bulb lights, giving output 1, only when both switches are on, because the electricity must pass through both. The truth table for an AND gate shows four rows for all possible input combinations. When both inputs are 0, the output is 0. When input A is 0 and input B is 1, the output is 0. When input A is 1 and input B is 0, the output is 0. When both inputs are 1, the output is 1.
Everyday AND decisions include taking your book home only if it is at school and it is your book. A bus departs only when all passengers are seated and the door is closed. You hand in your drawing only when it is finished and your name is on it. In each example both conditions must be true at once, which is exactly what an AND gate checks.
The OR Gate
An OR gate has two inputs and one output. Its rule is that the output is 1 when at least one of the inputs is 1. The output is 0 only when both inputs are 0. The OR gate is like two switches joined in parallel, where either switch on its own completes the path and lights the bulb. The truth table for an OR gate shows that when both inputs are 0 the output is 0. When input A is 0 and input B is 1, the output is 1. When input A is 1 and input B is 0, the output is 1. When both inputs are 1, the output is 1.
Everyday OR decisions include entering the park if you have a ticket or a staff card. A pupil stays for the club if it is raining or if her ride is late. You can pay with cash or with transfer at the market stall. In each case only one true condition is enough, which is the heart of the OR gate.
The NOT Gate
A NOT gate has only one input and one output. Its rule is to flip the value, so a 0 becomes 1 and a 1 becomes 0. It is sometimes called an inverter. The NOT gate is like a light that is on when the switch is off, and off when the switch is on, always showing the opposite of what you expect. The truth table for a NOT gate has just two rows. When the input is 0, the output is 1. When the input is 1, the output is 0.
How Gates Combine Inside a Computer
When the output of one gate feeds into the input of the next, the gates work in a chain. You can trace a signal through the chain, deciding the value at each step using the truth tables. For example, take the output of an AND gate and feed it into a NOT gate. If the AND gives 1, the NOT then gives 0, and if the AND gives 0, the NOT gives 1. The combined circuit gives the opposite of the AND result.
Gates are built into the processor chip, the memory and many other parts of a computer. Their tiny size lets millions of them fit on one chip, and the speed of their switching controls how fast the computer works. Addition is a good example. A simple binary adder is made by connecting a few AND, OR and NOT gates, and the same gate building blocks appear again and again in circuits that compare numbers, follow rules and store values. For learners, the key idea is that there is no magic in a computer, only many simple gates arranged in clever ways to make bigger decisions.
Logic Gate Principles
Logic gates are the fundamental building blocks of every digital circuit inside a computer. A logic gate is a small electronic circuit that takes one or more binary inputs, each either 0 or 1, and produces a single binary output according to a fixed rule. By combining millions of these simple gates on a silicon chip, computers perform complex calculations and make decisions.
There are three basic logic gates: AND, OR and NOT. The AND gate produces 1 only when both inputs are 1. The OR gate produces 1 when at least one input is 1. The NOT gate takes a single input and reverses it, turning 0 into 1 and 1 into 0.
Each gate has one or more inputs and exactly one output.
Gate outputs depend only on the current inputs, not on past values.
Gates are combined in circuits to perform arithmetic, logic and control tasks inside the CPU.
Truth Tables for AND, OR and NOT
A truth table is a simple chart that shows every possible combination of inputs for a logic gate and the resulting output. Truth tables list all outcomes without leaving anything out, making them the most reliable way to understand how a gate behaves.
The AND gate truth table has four rows because each of the two inputs can be 0 or 1. The output is 1 only when both inputs are 1. The OR gate truth table also has four rows, with output 1 in three of them, because it activates when at least one input is 1. The NOT gate has just two rows, because it has one input that it simply flips.
AND truth table: output is 1 only when both inputs are 1.
OR truth table: output is 1 when at least one input is 1.
NOT truth table: output is the opposite of the single input.
Combined Gate Circuits: NAND, NOR and XOR
When basic gates are connected together, they form new gates with different behaviour. A NAND gate is an AND gate followed by a NOT gate. It produces 0 only when both inputs are 1. A NOR gate is an OR gate followed by a NOT gate. It produces 1 only when both inputs are 0.
An XOR gate, short for Exclusive OR, produces 1 when the inputs are different and 0 when they are the same. XOR gates are used in arithmetic circuits inside the CPU for binary addition. A half adder uses one XOR gate and one AND gate to add two single-bit numbers.
NAND gate output is 0 only when both inputs are 1.
NOR gate output is 1 only when both inputs are 0.
XOR gate output is 1 when inputs are different, 0 when they are the same.
| Gate | Inputs | Output Rule |
|---|---|---|
| AND | Two | 1 only when both are 1 |
| OR | Two | 1 when at least one is 1 |
| NOT | One | Always the opposite (flip) |
Practical Work
- Draw the truth table for the AND gate.
- Draw the truth table for the OR gate.
- Draw the truth table for the NOT gate.
- Trace the output of an AND gate fed into a NOT gate for every pair of inputs.
Scenario-Based Questions
- A school door has a lock that opens only when two conditions are both true, the teacher inserts the key and the teacher enters the correct PIN. Name the logic gate that represents this rule and write its truth table.
- A traffic light system turns on the pedestrian signal if button A is pressed OR button B is pressed. Name the gate, write its truth table, and explain why only one button needs to be pressed.
- A security camera sends a 1 signal when there is NO movement in the restricted zone, so it can focus on that area. Name the gate being used and explain what happens to the output when the input changes from 0 to 1.
- A teacher sets a rule: a pupil scores 1 if the homework is submitted on time AND the work is neat. Two pupils, Tunde and Emeka, submit on time but Tunde's work is neat while Emeka's is not. Predict the output for each pupil and name the gate.
- An alarm rings when the door sensor reads 1 OR the window sensor reads 1 OR the fire sensor reads 1. Name the type of gate needed and explain why at least one input must be 1 for the alarm to ring.
- A lab computer starts only when the power switch is ON and the network cable is plugged in and the login is correct. Draw a simple diagram showing three AND gates feeding into a final output.
- A pupil says a NOT gate has two inputs. Correct this and explain what a NOT gate actually does, giving one example from everyday life.