To determine the number of address lines required for a memory chip, you can use the formula:
\[
\text{Number of Address Lines} = \log_2(\text{Memory Size in Bytes})
\]
where the memory size is given in bytes.
### (I) 4K RAM
- **Memory Size:** 4K (where K = 1024)
- **Total Memory Size in Bytes:** \( 4 \times 1024 = 4096 \) bytes
\[
\text{Number of Address Lines} = \log_2(4096) = \log_2(2^{12}) = 12
\]
So, **12 address lines** are required for 4K RAM.
### (II) 8K ROM
- **Memory Size:** 8K (where K = 1024)
- **Total Memory Size in Bytes:** \( 8 \times 1024 = 8192 \) bytes
\[
\text{Number of Address Lines} = \log_2(8192) = \log_2(2^{13}) = 13
\]
So, **13 address lines** are required for 8K ROM.
### Summary:
- 4K RAM requires **12 address lines**.
- 8K ROM requires **13 address lines**.