$A$ is $4$ bit binary no $A4A3A2A1$

$B$ is $4$ bit binary no $B4B3B2B1$

$M$ is result of multiplication $M8M7M6M5M4M3M2M1$ [check biggest no $1111 \times 1111 =11100001$]

$A4$ |
$A3$ |
$A2$ |
$A1$ |
$B4$ |
$B3$ |
$B2$ |
$B1$ |
$M8$ |
$M7$ |
$M6$ |
$M5$ |
$M4$ |
$M3$ |
$M2$ |
$M1$ |

$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |

$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$1$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |
$0$ |

. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |

. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |

$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$0$ |
$1$ |
$1$ |
$0$ |
$1$ |
$0$ |
$0$ |
$1$ |
$0$ |

$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$1$ |
$0$ |
$0$ |
$0$ |
$0$ |
$1$ |

$$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \textbf{A4} & \textbf {A3} & \textbf {A2} & \textbf{A1 }&\textbf{B4} & \textbf {B3} & \textbf {B2} & \textbf{B1 }&\textbf{M8} & \textbf {M7} & \textbf {M6} & \textbf{M5 }&\textbf{M4} & \textbf {M3} & \textbf {M2} & \textbf{M1 }\\\hline0&0&0&0&0&0&0&0&0&0&0&0&0&0 &0&0\\\hline0&0&0&0&0&0&0&1&0&0&0&0&0&0&0&0\\\hline.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.\\\hline&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.\\\hline1&1&1&1&1&1&1&0&1&1&0&1&0&0&1&0 \\\hline1&1&1&1&1&1&1&1&1&1&1&0&0&0&0&1 \\\hline \end{array}$$

So $4$ bit of $A \ 4$ bit of $B$

input will consist of $8$ bit need address $00000000$ to $11111111 = 2^8$ address

output will be of $8$ bits

so memory will be of $2^8 \times 8$

$M = 256 , N = 8$