Logic Gates and Counters
Logic gates combine binary inputs: AND (), OR (), NOT (), NAND, NOR and XOR. Truth tables list every input combination ( rows). Sequential circuits remember: an astable produces a clock signal, and a binary counter counts its pulses; each stage halves the frequency.
Learning objectives
- Use the six common logic gates and Boolean notation.
- Build truth tables for combinations of gates.
- Describe binary and BCD counters and frequency division.
A car's interior light comes on if the driver's door OR the passenger door is open. Which gate is that?
Core idea
"If the door is open AND it's dark, turn on the light." Every such rule can be built from a handful of simple switches called logic gates. Billions of them, clocked millions of times a second, make a computer.
Gates combine 0s and 1s; truth tables list all input combinations. Counters chain flip-flops, each halving the clock frequency.
1. Combinational logic
For which inputs is ?
- Goal
- Rows with .
- Strategy
- An OR is 0 only if both terms are 0.
- Second term must be 0.
- NAND is 0 only when both inputs are 1.
- Join a NAND's inputs: NOT gate.
- NAND followed by NOT: AND gate.
2. Counters
A Hz clock drives a 4-bit binary counter.
- Goal
- Frequency of each output.
- Strategy
- Each stage halves.
- Bit 0 toggles once per clock pulse, so it completes a cycle every two pulses.
- Each later bit halves again: bits 0 to 3.
Clock in, binary count out.
How many flip-flops are needed to count to 100?
Summary
- AND, OR, NOT, NAND, NOR, XOR.
- rows.
- Counters halve frequency per bit.
- Truth table
- List of outputs for every input combination.
- Astable
- Circuit producing a continuous pulse train.
- Counter
- Sequential circuit counting clock pulses.
Create a free account to read the rest of this lesson: key formulae, worked examples, explore the graph, common mistakes, exam tip, guided practice and more. Your answers are checked and your progress is saved.