
Read-Only Memory (ROM)
A memory programmed once; reading an address returns fixed stored bits — also a truth-table machine.
Description
A ROM holds fixed data: an n-input address drives a full decoder (all 2^n minterms), and a programmable OR array selects which minterms appear on each output. That makes a ROM a direct truth-table implementation: store the output column for every input combination and you have realized any combinational function.
- n address lines → 2^n decoder outputs (every minterm).
- Each output bit ORs a programmed subset of minterms.
- So a 2^n × m ROM realizes any m functions of n variables.
- The AND array (decoder) is fixed; only the OR array is programmed.
- Programming = storing the truth-table output columns.
- Mask ROM: programmed at fabrication (cheap in volume).
- PROM: user-programmed once via fuses.
- EPROM: UV-erasable and reprogrammable.
- EEPROM / Flash: electrically erasable, byte/block reprogrammable.
- All are non-volatile (retain data without power).
At a glance
What
Non-volatile memory whose contents are fixed at programming time; structurally a fixed AND (decoder) + programmable OR.
Why
It stores firmware and implements arbitrary combinational logic by table lookup.
How
Address = inputs → decoder makes all minterms → OR array picks ones per output.
Where
Boot firmware, microcode, lookup tables, code converters.
When
When the function/data is fixed and read frequently.
Think of it like…
A ROM is a printed answer key: every possible question (address) already has its answer (data) written down; you just look it up.
ROM = decoder + OR array
- n address lines → 2^n decoder outputs (every minterm).
- Each output bit ORs a programmed subset of minterms.
- So a 2^n × m ROM realizes any m functions of n variables.
- The AND array (decoder) is fixed; only the OR array is programmed.
- Programming = storing the truth-table output columns.
ROM types
- Mask ROM: programmed at fabrication (cheap in volume).
- PROM: user-programmed once via fuses.
- EPROM: UV-erasable and reprogrammable.
- EEPROM / Flash: electrically erasable, byte/block reprogrammable.
- All are non-volatile (retain data without power).
ROM as logic
| Part | Array | Programmable? |
|---|---|---|
| Decoder | AND (all minterms) | fixed |
| Output | OR | programmable |
Black-box view
Inputs on the left → outputs on the right · particles show signal direction
Functional / block diagram
Functional blocks · arrows animate in the direction data flows
ROM-style lookup (read-only use)
▶ live simulatordecoder→ row 0
8×4 RAM · address decoder selects one word · Write stores, Read fetches
Real-world applications
The 5 Whys
- 1
Why ROM? Fixed data/logic that's read often, kept without power.
- 2
Why is it a truth-table machine? Decoder makes all minterms; OR selects them.
- 3
Why fixed AND, programmable OR? Minterms are universal; only the selection varies.
- 4
Why EPROM/Flash? Reprogrammability for updates.
- 5
Root cause: storing every output column realizes any function by lookup.
Cheat sheet
Working principle
- Address = inputs → decoder makes all minterms → OR array picks ones per output.
- Non-volatile memory whose contents are fixed at programming time; structurally a fixed AND (decoder) + programmable OR.
Formulas & Boolean expressions
- ROM size = 2^n × m
- Each output = OR of selected minterms
- n address lines → 2^n decoder outputs (every minterm).
- So a 2^n × m ROM realizes any m functions of n variables.
- Programming = storing the truth-table output columns.
Key facts
- n address lines → 2^n decoder outputs (every minterm).
- Mask ROM: programmed at fabrication (cheap in volume).
Why it exists
- Root cause: storing every output column realizes any function by lookup.