LogisimRevisited

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.

ROMAD
Default settings, facing east. Pins are the dots.
LibraryMemory
Type nameROM
Pins and defaultsaddr A (-40, 0), out0 D (0, 0), width 4 (1..32), selectBits 4 (1..8), value comma-separated hex words

Try it in the app

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

PinDirectionWidthLocation & 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

Default 16×4 ROM lookup table behavior
Address A (Binary / Hex)Word IndexDefault Output D (Hex)
0000 (0x0)Word 00x0
0001 (0x1)Word 10x1
1010 (0xA)Word 100xA
1111 (0xF)Word 150xF
Z or EFloating or invalid addressE

Related Circuits & Components