Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
346 views
in Technique[技术] by (71.8m points)

architecture - How to find out how wide adress bus width is?

Basicly, I couldn't find anywhere where this is explained thoroughly, so I though maybe anybody would have a explanation or any direction where should I search for the answer.

The question would be : If I have a CPU connected to 16384 bit RAM, the data bus width is 16 bit, how should I find the width of the adress bus?

Or from another perspective : If i have a CPU connected to RAM using 10 bit address bus and 8 bit data bus, how many bits does my RAM have?

The answer to first question I searched and could only get the answer as 2^16 and the answer would be 65535 ~ 64kB. If this is not correct, I would love to hear the explanation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The address bus width determines how many addresses can be accessed by the CPU. It also determines the maximum size of your RAM.

For example, if you have an address bus of width 3, you can access 2 ^ 3 = 8 addresses from the memory, which are:

Address0 -> 000
Address1 -> 001
Address2 -> 010
Address3 -> 011
Address4 -> 100
Address5 -> 101
Address6 -> 110
Address7 -> 111

So if you have an address bus width of 10, you can access 2 ^ 10 = 1024 addresses, which is equivalent to 1 KB of RAM memory.

If you have an address bus of width 32, you can access 2 ^ 32 = 4294967296, addresses, which is around 4 GB of RAM memory.

That's the reason you can't install more than 4 GB memory on a 32-bit system - because the extra-memory cannot be addressed (the registers have a fixed 32-bit size).

Now to your question, if you have a RAM memory of size 16384, which is around 16KB, you need an address bus of width log2(16384) = 14, in order to address this entire space.

You can check this reddit thread for more details.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...