Address space sizing With an 8-bit address code, how many unique memory locations can be selected?
-
A8 locations in memory
-
B256 locations in memory
-
C65,536 locations in memory
-
D131,072 locations in memory
Answer
Correct Answer: 256 locations in memory
Explanation
Introduction / Context:Address lines select locations in memory using binary codes. The number of unique addresses depends on the number of address bits. This is a foundational calculation in digital design and computer architecture.
Given Data / Assumptions:
- Number of address bits n = 8.
- Each unique address maps to one location.
- Binary combinations are counted as powers of 2.
Concept / Approach:
The number of unique codes represented by n bits is 2^n. Therefore, an 8-bit address field can address 2^8 locations. This relationship scales directly (e.g., 16 bits → 2^16 locations, etc.).
Step-by-Step Solution:
Compute total addresses = 2^n.For n = 8: 2^8 = 256.Therefore, 256 distinct memory locations can be selected.Verification / Alternative check:
Check extremes: with 1 bit you can select 2 locations; doubling bits squares capacity. 8 bits yielding 256 is consistent with this rule.
Why Other Options Are Wrong:
- 8 locations: corresponds to 3 address bits.
- 65,536 locations: requires 16 address bits.
- 131,072 locations: requires 17 address bits.
Common Pitfalls:
- Confusing bytes of data per location with number of locations. Address bits count locations, independent of data width.
Final Answer:
256 locations in memory