For a 4-bit multiplier there are $2^4 \cdot 2^4 = 2^8$ combinations.
The output of 4-bit multiplication is 8 bits, so the amount of ROM needed is $2^8 \cdot 8 = 2048$ bits.
Why is that? Why does the ROM need all the combinations embedded into it?
What will be the case with RAM?