How is this method of addressing memory scalable

addressingdigital-logicflipflop

I've been watching Computerphile videos about memory. I'm currently watching this one

In it he goes over using some logic gates to address flip flops. He explains that is is cumbersome to add a wire for each memory address, and that using some logic circuitry is better. He only goes over the case for two bits.

It would seem to me that adding more bits make the logic circuits increasingly complex. I designed a simple logic circuit for 3 bits and it looks like this:

gates

Perhaps my design is poor, but it seems to me that as you add more addresses, the logic circuit to address them would become increasingly complex. Wouldn't adding all these extra components to the memory chip be just as bad as adding more wires? Or am I missing something fundamental?

What is the advantage over using logic circuits as opposed to individual wires to address the flip flops?

Best Answer

What you have there is a decoder, also refer to in this usage as an address decoder. It decodes a binary number into one-hot. An encoder does the reverse.

The benefit in using one is that you don't need a wire in your address bus for every memory location.

If your memory has \$k\$ locations, you would need \$k\$ wires, but with a decoder, you would only need \$log_2{k}\$ wires. So rather than \$65536\$ wires to address \$65536\$ locations, you would only need \$16\$ as \$log_2{65536} = 16\$. This is because a \$16\$ input decoder turns a \$16\$ bit input in binary into a one-hot output that is one single high output with the rest low of one of the \$2^{16}\$ or \$65536\$ outputs.