Implementing Logic Function with a ROM

  • Thread starter Thread starter CoolDude420
  • Start date Start date
  • Tags Tags
    Function Logic
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 7K views
CoolDude420
Messages
199
Reaction score
9

Homework Statement


6c057f18b9.png


Homework Equations

The Attempt at a Solution


d6afa7111c.jpg


I'm a bit confused with this. I thought a ROM was just a non-volatile storage. I don't understand how this would work. The decoder can only select one of the 8 outputs depending on what it gets at its input. I still attempted it but I am quite sure it isn't correct. Any ideas on how this is meant to work?
 
Physics news on Phys.org
The output "gates" of a ROM are all the same (eg all OR gates) so you have to convert functions B and C to the required form first.

CoolDude420 said:
I'm a bit confused with this. I thought a ROM was just a non-volatile storage. I don't understand how this would work.

It is just non-volatile storage. Think about what a truth table is. It tells you what the outputs are for a given combination of inputs. You can think of a ROM as doing exactly the same thing.

In this example the ROM contains output data for all possible combinations of input from 000 to 111 so it can generate outputs for all possible combinations of input signals. In that respect it's actually better than hard wired logic. If you need to make a change you just reprogram the ROM. No need to rewire or change any logic gates.

Disadvantages might include cost, speed, area of silicon.
 
CWatters said:
The output "gates" of a ROM are all the same (eg all OR gates) so you have to convert functions B and C to the required form first.
It is just non-volatile storage. Think about what a truth table is. It tells you what the outputs are for a given combination of inputs. You can think of a ROM as doing exactly the same thing.

In this example the ROM contains output data for all possible combinations of input from 000 to 111 so it can generate outputs for all possible combinations of input signals. In that respect it's actually better than hard wired logic. If you need to make a change you just reprogram the ROM. No need to rewire or change any logic gates.

Disadvantages might include cost, speed, area of silicon.
e156b04ecb.jpg


Ah. I see. Would this be correct for the conversion? I just took the complement of the product of maxterms expression. (Id have to replace the AND gates with ORs and change the Xs
 
Yes that's correct.

You need not actually draw a circuit with x's and OR gates. You just need to provide the contents of the ROM in the form of a table with the Address and Data fields. Here is an example (different functions to yours)...

ROM.jpg


Although it might be better to label the address inputs A1(X) and A0(Y) and similarly for the data bits D1(A) and D0(B)