So why do we use diode, compared to simple wires, in ROM??
Googled a bit with no luck.
Thanks.
If you don't use diodes, then the whole matrix will get shorted together and it will be impossible to read anything.
Think about the following case:
B0 B1
| |
W0 ---X--X--
| |
W1 ---X--+--
In this case, X represents either a diode or a wire connection and + represents a crossing with no connection. If you use diodes, applying a current to W1 will result in current flowing out of B0 only. If you use wires, current going in W1 will go onto B0, then back onto W0, and then on to B1. Since current flows on both B0 and B1, the value that corresponds to W1 is read incorrectly.
Diode matrix is effectively an AND-OR gate array with programmed connections on the inputs of the AND gates. If you use wires you just shorted a bunch of address and data lines together - bad idea.
This wikipedia page Diode matrix seems to answer some of the question.
A ROM has an address bus, and a data bus. Think of the address bus as multiplexed signals.
The set of bits in the ROM matrix is read using the demultiplexed address signals; the multiplexed address signals are demultiplexed within the ROM. For example, a 10-bit address might be demultiplexed to 1024 'row/select' signals (it's a bit more subtle, but this will do).
Approaches: 1. All 'row/select' signals are driven, but only one is high, assume all others are low. Wires wouldn't work, the low 'row/select' signals would cause a short circuit of the single high 'row/select'-signal. 2. Only one 'row/select' is high, and all of the others are 'tristated' and hence are not connected to high or low. Wires still won't work because their is likely a path from any bit connected to the 'row/select' high, to every other bit via all the other 'row/select' signals.
Using diodes ensure the other 'row/select' signals don't affect the single high 'row/select'-single.
Details
Once inside the ROM 'subsystem' the address would be demultiplexed to select the specific ROM word. This implies that many words can be selected, but only one can be allowed to respond. This could be managed by using logic gates on every bit of every word to control exactly which of the many words is able to drive the output nodes. However, it is adequate for ROM, if the data is represented directly using diodes. Diodes will only connect a 'high' word-select signal to the output nodes for the bits connected with a diode, for a word with a high word-select signal. None of the diodes for words with a low word-select signal affect the output. This uses fewer, simpler, devices, diodes, than logic gates.
AFAIK, diode-based ROM is a very old technology, mainly interesting for historical significance.
However, diodes may be used to make things like a keyboard matrix for similar reasons. The state of a subset of a matrix of switches can be read at any instant using far fewer signal wires than switches, i.e. a full keyboard could be scanned using under 20 'unmultiplexed' signals.
Apologies for the late update. A moderator chose to delete my answer while I was updating it. I wasn't informed about the 'undelete', so my update did't happen for a day.