I want to implement the following 4 functions on the 8x4 ROM below:
F= S(1,2,4,7)
G= å(0,3,5,6)
H= å(0,1)
J= å(2,5,7)

| x | y | z | F | G | H | J
|
0 | 0 | 0 | 0 | 1 | 1 | 0
|
0 | 0 | 1 | 1 | 0 | 1 | 0
|
0 | 1 | 0 | 1 | 0 | 0 | 1
|
0 | 1 | 1 | 0 | 1 | 0 | 0
|
1 | 0 | 0 | 1 | 0 | 0 | 0
|
1 | 0 | 1 | 0 | 1 | 0 | 1
|
1 | 1 | 0 | 0 | 1 | 0 | 0
|
1 | 1 | 1 | 1 | 0 | 0 | 1 | |
Rather than viewing the 3 inputs as boolean variables, they can be viewed as an address. The 4 outputs can be viewed as a 4-bit word stored at that address. So, you request the contents of address 2 (010) and the memory responds that the word stored there is 1001. If the number of outputs were increased to 8, the memory could be used to store bytes, in which you could put, text, programs, or anything else!
The way the size of a ROM is given has to do with it's capacity as a memory - ROM sizes are given as 2N x M, where N is the number of inputs and M is the number of outputs. 2N is therefore the total number of words stored (the number of addresses that can fit in N inputs), which happens to equal the number of outputs in the internal decoder. M is the n