3.2 Logic Gates and Logic Circuits

Bulk view disabled for Guests. View lessons individually.

Logic Gates and Circuits

1. The Half Adder

A **Half Adder** circuit adds two single binary bits (A and B). It produces two outputs: a Sum (S) and a Carry (C).

XOR Gate ➔ Sum (S)
AND Gate ➔ Carry (C)
Sum (S) = A XOR B
Carry (C) = A AND B
ABSum (S)Carry (C)
0000
0110
1010
1101
Half Adder Circuit

Limitation: A Half Adder cannot handle a "Carry In" from a previous addition, which is why we need the Full Adder.

2. The Full Adder

A Full Adder adds three bits: A, B, and a Carry-in (Cin). This allows multiple adders to be chained together to add large binary numbers (e.g., 8-bit or 32-bit addition).

A Full Adder is constructed using two Half Adders and an OR gate.

Sum = (A XOR B) XOR Cin
Cout = ((A XOR B) AND Cin) OR (A AND B)
ABCinSumCout
00000
01101
11001
11111

3. Flip-Flops (Data Storage)

While adders do math, Flip-Flops are used to store a single bit of data. They are the fundamental component of Static RAM (SRAM) and CPU Registers.

  • SR Flip-Flop: Uses NAND or NOR gates to "latch" a state. It has a Set and Reset input.
  • JK Flip-Flop: An improved version that handles the "invalid" state of an SR flip-flop by toggling the output.
⚠️ AS-Level Exam Tip: You may be asked to show how many Half Adders make a Full Adder. The answer is always two, plus an OR gate to combine the carry bits.