Computing / Knowledge quiz

How do logic gates work? A quiz on AND, OR, NAND and adders

How do logic gates work? They use switches where a closed circuit represents 1 and an open circuit represents 0, with transistors flipping these states rapidly. The quiz covers AND gate, OR gate, NAND gate universal design, half adder and binary adder circuits. Try the questions to check your understanding.

10 questionsAnswers and score at the end
Practice quiz

Test your knowledge.

Question 1 of 100 answered

Adding up your answers

Your score is next.

Question 1

What number represents the closed state of a switch in digital logic?

A closed switch completes a circuit and allows current to flow. In binary notation, this active state is assigned the number 1.

Source excerpt
In digital logic, we represent the closed state of a switch as the number 1.

From the Knowverse course text.

Question 2

What condition makes an AND gate output a 1?

An AND gate requires every input to be active before it produces a high signal. A single 0 forces the output to 0.

Source excerpt
The AND gate only produces a '1' output if both of its inputs are also '1'.

From the Knowverse course text.

Question 3

Why is the standard digital OR gate called inclusive?

Inclusive OR means that having either input at 1, or both simultaneously at 1, produces a 1 output.

Source excerpt
In standard logic, the OR gate is inclusive, meaning 'one, the other, or both' will result in a 1.

From the Knowverse course text.

Question 4

How many inputs does a standard NOT gate have?

A NOT gate is an inverter with a single input line, flipping whatever signal enters it.

Source excerpt
Unlike the AND and OR gates you learned about before, the NOT gate only has one single input.

From the Knowverse course text.

Question 5

What output does a NAND gate produce when all its inputs are set to 1?

A NAND gate inverts standard AND logic. Because an AND gate produces 1 when all inputs are 1, the NAND gate flips that result to 0.

Source excerpt
Because of that final flip, the NAND gate produces a '0' only when both inputs are '1'.

From the Knowverse course text.

Question 6

Why is the NAND gate classified as a universal gate?

Engineers call a gate universal when circuits built solely from that gate can reproduce every standard Boolean operation.

Source excerpt
A universal gate is a specific type of gate that can be used to build every other logic gate in existence.

From the Knowverse course text.

Question 7

Which logic gate computes the sum bit inside a half adder?

The half adder passes the two binary inputs through an XOR gate, which outputs 1 only when the inputs differ.

Source excerpt
The first gate in the circuit is the XOR gate, which is responsible for calculating the Sum bit.

From the Knowverse course text.

Question 8

Which logic gate computes the carry bit inside a half adder?

A carry bit only forms in binary addition when both inputs are 1 (1 + 1 = 10 in binary). An AND gate detects this exact condition.

Source excerpt
To find the Carry, the Half Adder uses an AND gate in parallel with the XOR gate.

From the Knowverse course text.

Question 9

Why is a full adder needed instead of a half adder when adding long numbers?

Adding multiple columns requires handling two addend bits plus the carry bit coming from the previous column. A half adder only accepts two inputs.

Source excerpt
A standard Half Adder can only handle two inputs at a time. It has no way to accept that extra carry bit from the right.

From the Knowverse course text.

Question 10

What is chaining in the context of binary adders?

Chaining links adder circuits in sequence by routing each carry-out wire to the adjacent adder's carry-in pin.

Source excerpt
The Carry-out wire of the first circuit plugs directly into the Carry-in wire of the next one.

From the Knowverse course text.

YOUR SCOREcorrect answers
Quiz complete

Here's how you did.

See the answer and explanation for each question below.

Knowverse app icon
KNOWVERSE FOR IPHONE

Get the Knowverse app.

Find more quizzes and full courses in the free iOS app.

Get KnowverseDownload on iOS

Switches and binary states

Electric current is the physical flow of charge along a wire. When a switch closes, it completes the loop and allows current to pass, which digital logic labels as 1 or True. Opening the switch breaks the path, halts the current, and produces a 0 or False state.

Modern microprocessors use microscopic electronic transistors rather than physical levers to flip these states rapidly. Digital systems treat every switch as entirely open or closed, discarding intermediate electrical voltages to avoid computing errors.

Source excerpt
In digital logic, we represent the closed state of a switch as the number 1.

From the Knowverse course text.

Complex Logic from NAND — image from Wikimedia Commons
MUX Diagram using NAND Gates · Semleon · CC0

Logic gates take binary inputs and produce an output according to strict rules. An AND gate outputs 1 only when every input signal is 1, acting like an industrial safety switch where two hands must engage separate controls simultaneously.

The OR gate produces 1 if at least one input is active, representing an inclusive condition where one, the other, or both inputs trigger the signal. A NOT gate acts as an inverter with a single input, reversing a 0 to a 1 or a 1 to a 0.

Source excerpt
The AND gate only produces a '1' output if both of its inputs are also '1'.

From the Knowverse course text.

Universal NAND gates

A NAND gate combines an AND operation with an inverter bubble, producing 0 only when every input is 1. If any input is 0, the NAND output stays 1. Because engineers can build every other logic gate solely out of arranged NAND gates, it is recognized as a universal gate.

Fabricating millions of identical NAND circuits on a single silicon die lowers manufacturing costs while letting designers implement whatever Boolean equations their processors require.

Source excerpt
Because the NAND gate can replicate any other gate, it is the most efficient 'Lego brick' for building a computer.

From the Knowverse course text.

Adding two binary digits requires calculating both a sum bit and a carry bit. A half adder routes two incoming signals to an XOR gate to find the sum and to an AND gate to detect whether a carry forms. Because a half adder cannot accept an incoming carry from an earlier column, multi-digit calculations rely on full adders.

Full adders process three inputs at once, letting engineers link carry-out wires directly to carry-in pins across long arithmetic chains.

Source excerpt
The Half Adder is the specific circuit designed to solve this by taking two input bits and producing those two necessary outputs.

From the Knowverse course text.

Sources

Sources: Digital Logic and Circuits. Each question or step includes an excerpt from the course.