You want to address a specific memory location out of N memory locations in a memory system.
Texas Instruments technical mcq question, verified with a worked answer. Free to practise - no sign-up.
You want to address a specific memory location out of $N$ memory locations in a memory system.
How many address lines are required to do so?
Show answer & explanation
In a binary addressing system, each address line can represent two states (0 or 1). Therefore, with 'k' address lines, a system can uniquely address 2^k locations. To find the number of lines required for N locations, we solve for k in the equation N = 2^k, which yields k = log2(N).
Step-by-step Derivation:
Step 1: Define the relationship between the number of address lines (k) and the total number of addressable memory locations (N). In digital electronics, address lines are binary.
Step 2: The total number of unique combinations possible with k binary lines is 2^k.
Step 3: Set up the equation to find the minimum number of lines needed to cover N locations: 2^k ≥ N.
Step 4: To solve for k, take the logarithm base 2 of both sides: log2(2^k) ≥ log2(N).
Step 5: Using the logarithm power rule, k ≥ log2(N).
Step 6: Therefore, the number of address lines required is log2(N) (rounded up to the nearest integer if N is not a power of 2).