1
\$\begingroup\$

(Hypothetical) Let's say there is a CPU with 8 address lines and 8 data lines. If each external device has 128 accessible registers, how many external devices can be linked?

For 8 address lines, I assumed 2^8 = 256 addressable locations.A nd then 256*8 (dl) = 2048. 2048 / 128 (R) = 16 external devices . Is this correct thinking?

Edit : question is: if each external device has 128 accessible registers of control and data. No mentions on bits

\$\endgroup\$
  • 2
    \$\begingroup\$ Only if the "registers" are only 1 bit wide. Normally, a register is the full width of the data bus. \$\endgroup\$ – Dave Tweed Jan 8 at 13:59
  • 1
    \$\begingroup\$ Question is not complete. 8 address lines, sure 256 addresses, 8 data lines = byte wide data storage. Plus you need a write enable lines, and and typically an output enable, unless chip select with no write enable = output enable. Better question is how many chip selects are there? Each device will need one. With a shift register(or several) then any number of chip selects can be created with just 3 control lines. \$\endgroup\$ – CrossRoads Jan 8 at 14:00
  • 1
    \$\begingroup\$ This question needs more details an 8-bit address bus gives 256 addressable locations but an address bus can easily be extended with a latch and you can have two devices at the same location if one is read only and the other is write only. RAM would normally be bidirectional but ROM might be read only and ports could be read only, write only or bidirectional. \$\endgroup\$ – Warren Hill Jan 8 at 14:06
  • \$\begingroup\$ The exact question was : if each external device has 128 accessible registers of control and data, how many external device we can add ? No mentions on bits \$\endgroup\$ – Jordan_b Jan 9 at 14:34
  • \$\begingroup\$ Infinite because you can decode sequences. This is done substantially more often than your idea of having each bit on the bus come from a different device. If you want a real world example, think about a network interface card on an 8-bit bus, that can see the entire Internet... or an IDE hard drive (which you can use with only 8 data lines, if you throw away half the capacity) \$\endgroup\$ – Chris Stratton Jan 9 at 16:40
2
\$\begingroup\$

You have correctly calculated that with 8 address lines and 8 data lines you can uniquely address 2048 bits.

However, your question is vague in that it uses the word register without any explanation of how many bits are in a register. You must know that to answer the question. As DaveTweed pointed out, your conclusion is only valid if each register is just one bit. If the registers have more bits than one then your answer would be different.

\$\endgroup\$
  • \$\begingroup\$ The exact question was : if each external device has 128 accessible registers of control and data, how many external device we can add ? No mentions on bits \$\endgroup\$ – Jordan_b Jan 9 at 14:34
  • \$\begingroup\$ So, an 8-bit register, means only 2 external devices? \$\endgroup\$ – Jordan_b Jan 11 at 9:14
  • \$\begingroup\$ Sorry, I don't pregrade homework. I won't answer questions of the form "Is my answer correct?" \$\endgroup\$ – Elliot Alderson Jan 11 at 12:45
  • \$\begingroup\$ While not even half of these were in any "homework" , and while I m not requesting answers without trying to understand and/or solve it myself, your stance is understandable and respected. Thank you \$\endgroup\$ – Jordan_b Jan 12 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.