Skip to main content

Design ROM for A,B,C to F1-F4 table

Short answer

8x4 ROM with 3-to-8 decoder. F1 = w4+w5+w6, F2 = w0+w2+w5, F3 = w0+w1+w2+w4+w5+w7, F4 = w0+w1+w5+w7.

Design a ROM to store the following information:

ABCF1F2F3F4
0000111
0010011
0100110
0110000
1001010
1011111
1101000
1110011

The table has 3 address inputs, so there are 2^3 = 8 words, each 4 bits wide. The ROM is therefore 8 x 4.

Stored contents

Address (A,B,C)Word (F1,F2,F3,F4)
000 (word line 0)0111
001 (word line 1)0011
010 (word line 2)0110
011 (word line 3)0000
100 (word line 4)1010
101 (word line 5)1111
110 (word line 6)1000
111 (word line 7)0011

Design

Use a 3-to-8 decoder (address lines select exactly one word line) and one OR gate per output bit. Connect a word line to an OR gate only where that word stores a 1 in the column (a programmable connection/transistor at the crosspoint).

OutputWord lines ORed (addresses with a 1)Output expression
F14, 5, 6F1 = w4 + w5 + w6
F20, 2, 5F2 = w0 + w2 + w5
F30, 1, 2, 4, 5, 7F3 = w0 + w1 + w2 + w4 + w5 + w7
F40, 1, 5, 7F4 = w0 + w1 + w5 + w7
  A B C (address)
   |  |  |    +----------+ w0..w7  OR gates
   +--+--+--->| 3-to-8  |==> word lines ==> [ OR ]--> F1
              | decoder  |                  [ OR ]--> F2
              +----------+                  ...   --> F4

✓ Answer checked by Claude Opus 5.5 (high effort)

All Embedded System chapter 4 questions →