# multicolumns wrapped one another

\documentclass[usenames,dvipsnames]{beamer}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{listings}
\usepackage{dcolumn}
\usepackage{algpseudocode}
\usefonttheme[onlymath]{serif}
\usepackage{amsmath}
\newcolumntype{2}{D{.}{}{2.0}}
\begin{document}
\begin{frame}
\frametitle{Modular Arithmetic operations}
\begin{exampleblock}{To find $11^{11} \mod 13$ we can procceed as follows}
\begin{aligned} %& 11^2 = 121 = 4(\mod 13)\\ % & 11^4 = (11^2)^2 = 4^2 = 3 (\mod 13)\\ %& 11^7 = 11\times 4\times3 = 132=2(\mod 13) & 11^2=121\equiv 4\ (\mod 13)\\ & 11^4 = (11^2)^2 \equiv 4^2 \equiv 3\ (\mod 13)\\ & 11^7 = 11 \times 4\times 3\equiv 132\equiv 2\ (\mod 13)\\ \end{aligned}
\end{exampleblock}
\renewcommand\arraystretch{1.3}
\setlength\doublerulesep{0pt}
\begin{columns}
\footnotesize
\begin{column}{0.4\linewidth}
\begin{tabular}{r||*{8}{2|}}
+ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline\hline
\hline
0 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 0\\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 0 & 1\\
\hline
2 & 3 & 4 & 5 & 6 & 7 & 0 & 1 & 2\\
\hline
3 & 4 & 5 & 6 & 7 & 0 & 1 & 2 & 3\\
\hline
4 & 5 & 6 & 7 & 0 & 1 & 2 & 3 & 4\\
\hline
5 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
6 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
7 & 7 & 0 & 1 & 2 & 3 & 4 & 5 & 6\\
\end{tabular}
\end{column}
\begin{column}{0.4\linewidth}
\begin{tabular}{r||*{8}{2|}}
x & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline\hline
\hline
0 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 0\\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 0 & 1\\
\hline
2 & 3 & 4 & 5 & 6 & 7 & 0 & 1 & 2\\
\hline
3 & 4 & 5 & 6 & 7 & 0 & 1 & 2 & 3\\
\hline
4 & 5 & 6 & 7 & 0 & 1 & 2 & 3 & 4\\
\hline
5 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
6 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
7 & 7 & 0 & 1 & 2 & 3 & 4 & 5 & 6\\
\end{tabular}
\end{column}
\end{columns}
\end{frame}
\end{document}


I want to put the example title line in one or two lines. And make a gap between two tables.

I found the table solution from Addition and Multiplication Tables

You can play with the column widths and the value of \tabcolsep. As to the example title, just use in-line maths:

\documentclass[usenames,dvipsnames]{beamer}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{listings}
\usepackage{dcolumn}
\usepackage{algpseudocode}
\usefonttheme[onlymath]{serif}
\usepackage{amsmath}
\newcolumntype{2}{D{.}{}{2.0}}

\begin{document}

\begin{frame}
\frametitle{Modular Arithmetic operations}
\begin{exampleblock}{To find $\:11^{11} \mod 13$, we can proceed as follows}
\begin{aligned} %& 11^2 = 121 = 4(\mod 13)\\ % & 11^4 = (11^2)^2 = 4^2 = 3 \pmod 13\\ %& 11^7 = 11\times 4\times3 = 132=2(\mod 13) 11^2 & =121\equiv 4 \pmod{13} \\ 11^4 & = (11^2)^2 \equiv 4^2 \equiv 3 \pmod{13} \\ 11^7 & = 11 \times 4\times 3\equiv 132\equiv 2 \pmod{13} \\ \end{aligned}
\end{exampleblock}
\renewcommand\arraystretch{1.3}
\setlength\doublerulesep{0pt}
\begin{columns}
\footnotesize
\setlength{\tabcolsep}{3.5pt}
\renewcommand{\arraystretch}{1.1}
\noindent
\begin{column}{0.45\linewidth}
\begin{tabular}{r||*{8}{2|}}
+ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline\hline
\hline
0 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 0\\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 0 & 1\\
\hline
2 & 3 & 4 & 5 & 6 & 7 & 0 & 1 & 2\\
\hline
3 & 4 & 5 & 6 & 7 & 0 & 1 & 2 & 3\\
\hline
4 & 5 & 6 & 7 & 0 & 1 & 2 & 3 & 4\\
\hline
5 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
6 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
7 & 7 & 0 & 1 & 2 & 3 & 4 & 5 & 6\\
\end{tabular}
\end{column}
%
\begin{column}{0.45\linewidth}
\begin{tabular}{r||*{8}{2|}}
x & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline\hline
\hline
0 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 0\\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 0 & 1\\
\hline
2 & 3 & 4 & 5 & 6 & 7 & 0 & 1 & 2\\
\hline
3 & 4 & 5 & 6 & 7 & 0 & 1 & 2 & 3\\
\hline
4 & 5 & 6 & 7 & 0 & 1 & 2 & 3 & 4\\
\hline
5 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
6 & 6 & 7 & 0 & 1 & 2 & 3 & 4 & 5\\
\hline
7 & 7 & 0 & 1 & 2 & 3 & 4 & 5 & 6\\
\end{tabular}
\end{column}
\end{columns}
\end{frame}

\end{document}