How many external devices can be linked to a CPU with n address buses and m data buses?

(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

• Only if the "registers" are only 1 bit wide. Normally, a register is the full width of the data bus. Jan 8, 2019 at 13:59
• 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. Jan 8, 2019 at 14:00
• 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. Jan 8, 2019 at 14:06
• 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 Jan 9, 2019 at 14:34
• 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) Jan 9, 2019 at 16:40