Components / Memory
ROM (Read-Only Memory) in Logisim
Combinational Read-Only Memory lookup table indexed by an S-bit address bus (A) that outputs the stored N-bit hexadecimal word on D.
| Library | Memory |
|---|---|
| Type name | ROM |
| Pins and defaults | addr A (-40, 0), out0 D (0, 0), width 4 (1..32), selectBits 4 (1..8), value comma-separated hex words |
How the ROM Works in Logisim
The ROM (Read-Only Memory) component is a non-volatile combinational lookup table. Given an unsigned binary address on its left-hand Address bus (A, whose bit width is set by selectBits from 1 to 8 bits, default 4 bits = 16 words), it immediately outputs the N-bit word stored at that index on its right-hand Data pin (D, default width = 4 bits).
Contents are stored in the Value attribute as a comma- or space-separated list of hexadecimal numbers (by default "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F"). Because a ROM can map any S-bit input combination to any N-bit output word, a single ROM can replace an entire multi-output combinational gate network—such as a 4-bit-to-7-segment decoder or a CPU control unit.
Tip: To drive a 7-Segment Display from a 4-bit binary number without building Karnaugh-map gates, set a ROM to width = 7 (or 8) and store the 7-segment bit patterns in its hex Value list, then unpack D with a Splitter.
ROM Pins & Pinout
| Pin | Direction | Width | Location & Role |
|---|---|---|---|
| addr (A) | Input (Left edge) | 1–8 bits (selectBits, default 4) | Offset (-40, 0). Unsigned binary word address (0 to 2^S - 1). |
| out0 (D) | Output (Right edge) | 1–32 bits (width, default 4) | Offset (0, 0). Outputs the N-bit word stored at address A, or E if A is floating/invalid. |
ROM Truth Table & Behavior
| Address A (Binary / Hex) | Word Index | Default Output D (Hex) |
|---|---|---|
| 0000 (0x0) | Word 0 | 0x0 |
| 0001 (0x1) | Word 1 | 0x1 |
| 1010 (0xA) | Word 10 | 0xA |
| 1111 (0xF) | Word 15 | 0xF |
| Z or E | Floating or invalid address | E |