If you have 11 bits available for RAM addresses, how many memory cells can theoretically exist?
If you have 11 bits available for RAM addresses, how many memory cells can
theoretically exist?
If you have 8 MiB of memory, then how many bits are needed to represent all
memory addresses?
Due to this addressing, RAM devices virtually always have a memory capacity that is a power of two. Usually several memory cells share the same address. For example, a 4 bit 'wide' RAM chip has 4 memory cells for each address.
The RAM size is very small, 16 cells(words) each one with 8 bits. It's a small and simple computer so a program and its variables will be directly loaded into memory using a programmer. Results and any temporary variables are also all just stored in RAM.
Memory consists of bytes (B). Each byte consists of 8 bits (b).
1 B = 8 b
1 GB of RAM is actually 1 GiB (gibibyte, not gigabyte). The difference is:
1 GB = 10^9 B = 1 000 000 000 B 1 GiB = 2^30 B = 1 073 741 824 B
Every byte of memory has its own address, no matter how big the CPU machine word is. Eg. Intel 8086 CPU was 16-bit and it was addressing memory by bytes, so do modern 32-bit and 64-bit CPUs. That's the cause of the first limit - you can't have more addresses than memory bytes.
Memory address is just a number of bytes the CPU has to skip from the beginning of the memory to get to the one it's looking for.
To access the first byte it has to skip 0 bytes, so first byte's address is 0.
To access the second byte it has to skip 1 byte, so its address is 1.
(and so forth...)
To access the last byte, CPU skips 1073741823 bytes, so its address is 1073741823.
Now you have to know what 32-bit actually means. As I mentioned before, it's the size of a machine word.
Machine word is the amount of memory CPU uses to hold numbers (in RAM, cache or internal registers). 32-bit CPU uses 32 bits (4 bytes) to hold numbers. Memory addresses are numbers too, so on a 32-bit CPU the memory address consists of 32 bits.
Now think about this: if you have one bit, you can save two values on it: 0 or 1. Add one more bit and you have four values: 0, 1, 2, 3. On three bits, you can save eight values: 0, 1, 2... 6, 7. This is actually a binary system and it works like that:
Decimal Binary
0 0000
1. 0001
2. 0010
3 0011
4. 0100
5 0101
6. 0110
7. 0111
8 1000
9. 1001
10 1010
11. 1011
12 1100
13 1101
14 1110
15. 1111
- For 1 bit the greatest value is 1,
- 2 bits - 3,
- 3 bits - 7,
- 4 bits - 15
The greatest possible number is always 2^N-1, where N is the number of bits. As I said before, a memory address is a number and it also has a maximum value. That's why machine word's size is also a limit for the number of available memory addresses - sometimes your CPU just can't process numbers big enough to address more memory.
So for 11 bits 2 ^11-1
i.e 2047
Trending now
This is a popular solution!
Step by step
Solved in 2 steps