Commit 109c0387 authored by Jules Saget's avatar Jules Saget
Browse files

Add tables

parent f5195285
\begin{table}[h]
\centering
\begin{tabular}{c|rrrrrrrr}
Decimal &
\multicolumn{1}{c}{3} &
\multicolumn{1}{c}{2} &
\multicolumn{1}{c}{1} &
\multicolumn{1}{c}{0} &
\multicolumn{1}{c}{-1} &
\multicolumn{1}{c}{-2} &
\multicolumn{1}{c}{-3} &
\multicolumn{1}{c}{-4} \\ \hline
2 bits &
&
&
01 &
00 &
11 &
10 &
&
\\ \hline
3 bits &
011 &
010 &
001 &
000 &
111 &
110 &
101 &
100
\end{tabular}
\caption{2's complement representation with a various number of bits}
\label{tab:arith_2cpl}
\end{table}
% Please add the following required packages to your document preamble:
% \usepackage{multirow}
\def\oldtabcolsep{\tabcolsep}
\setlength{\tabcolsep}{4pt}
\begin{table}[h]
\begin{tabular}{rl|rcc|rcc|r}
\multicolumn{2}{c|}{\multirow{2}{*}{State}} & \multicolumn{3}{c|}{A} & \multicolumn{3}{c|}{B} & \multicolumn{1}{c}{\multirow{2}{*}{Res}} \\
\multicolumn{2}{c|}{} & \multicolumn{1}{c}{Mem} & End & $\pm$ & \multicolumn{1}{c}{Mem} & End & $\pm$ & \multicolumn{1}{c}{} \\ \hline
\multicolumn{2}{c|}{IDLE} & 001·000 & & & 111·000 & & & \multicolumn{1}{l}{} \\
AB & READ\_A & 001·\textbf{000} & No & & 111·000 & & & \multicolumn{1}{l}{} \\
AB & READ\_B & 001·\textbf{000} & No & & 111·\textbf{000} & No & & \multicolumn{1}{l}{} \\
AB & ADDSUB & 001·\textbf{000} & No & & 111·\textbf{000} & No & & \multicolumn{1}{l}{} \\
AB & ALLOC & 001·\textbf{000} & No & & 111·\textbf{000} & No & & \multicolumn{1}{l}{} \\
AB & WRITE & 001·\textbf{000} & No & & 111·\textbf{000} & No & & ·\textbf{000} \\
AB & READ\_A & \textbf{001}·000 & Yes & + & 111·\textbf{000} & No & & ·\textbf{000} \\
AB & READ\_B & \textbf{001}·000 & Yes & + & \textbf{111}·000 & Yes & - & ·\textbf{000} \\
AB & ADDSUB & \textbf{001}·000 & Yes & + & \textbf{111}·000 & Yes & - & ·\textbf{000} \\
FINAL & CHECK & \textbf{001}·000 & Yes & + & \textbf{111}·000 & Yes & - & ·\textbf{000} \\
FINAL & LINK & \textbf{001}·000 & Yes & + & \textbf{111}·000 & Yes & - & \textbf{000}·000 \\
\multicolumn{2}{c|}{DONE} & \textbf{001}·000 & Yes & + & \textbf{111}·000 & Yes & - & \textbf{000}·000
\end{tabular}
\caption{An addition that requires cleaning afterwards}
\label{tab:arith_ex_clean}
\end{table}
\setlength{\tabcolsep}{\oldtabcolsep}
% Please add the following required packages to your document preamble:
% \usepackage{multirow}
\def\oldtabcolsep{\tabcolsep}
\setlength{\tabcolsep}{4pt}
\begin{table}[h]
\begin{tabular}{rl|rcc|rcc|r}
\multicolumn{2}{c|}{\multirow{2}{*}{State}} & \multicolumn{3}{c|}{A}
& \multicolumn{3}{c|}{B} &
\multicolumn{1}{c}{\multirow{2}{*}{Res}} \\
\multicolumn{2}{c|}{} & \multicolumn{1}{c}{Mem} & End &
$\pm$ & \multicolumn{1}{c}{Mem} & End & $\pm$ & \multicolumn{1}{c}{}
\\ \hline
\multicolumn{2}{c|}{IDLE} & 011·110 & & & 010 & &
& \multicolumn{1}{l}{} \\
AB & READ\_A & 011·\textbf{110} & No & & 010 & &
& \multicolumn{1}{l}{} \\
AB & READ\_B & 011·\textbf{110} & No & & \textbf{010} & Yes & +
& \multicolumn{1}{l}{} \\
AB & ADDSUB & 011·\textbf{110} & No & & \textbf{010} & Yes & +
& \multicolumn{1}{l}{} \\
A & CHECK & 011·\textbf{110} & No & & \textbf{010} & Yes & +
& \multicolumn{1}{l}{} \\
A & ALLOC & 011·\textbf{110} & No & & \textbf{010} & Yes & +
& \multicolumn{1}{l}{} \\
A & WRITE & 011·\textbf{110} & No & & \textbf{010} & Yes & +
& ·\textbf{000} \\
A & READ & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{000} \\
A & ADDSUB & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{000} \\
A & CHECK & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{000} \\
FINAL & CHECK & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{000} \\
FINAL & ALLOC & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{000} \\
FINAL & WRITE & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{100}·000 \\
FINAL & WAIT & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& ·\textbf{100}·000 \\
FINAL & WRITE & \textbf{011}·110 & Yes & + & \textbf{010} & Yes & +
& \textbf{000}·100·000 \\
\multicolumn{2}{c|}{DONE} & \textbf{011}·110 & Yes & +
& \textbf{010} & Yes & + & \textbf{000}·100·000
\end{tabular}
\caption{A more complex example of addition}
\label{tab:arith_ex_gonewrong}
\end{table}
\setlength{\tabcolsep}{\oldtabcolsep}
% Please add the following required packages to your document preamble:
% \usepackage{multirow}
\begin{table}[h]
\begin{tabular}{rl|rcc|rcc|l}
\multicolumn{2}{c|}{\multirow{2}{*}{State}} & \multicolumn{3}{c|}{A} & \multicolumn{3}{c|}{B} & \multicolumn{1}{c}{\multirow{2}{*}{Res}} \\
\multicolumn{2}{c|}{} & \multicolumn{1}{c}{Mem} & End & $\pm$ & \multicolumn{1}{c}{Mem} & End & $\pm$ & \multicolumn{1}{c}{} \\ \hline
\multicolumn{2}{c|}{IDLE} & 010 & & & 110 & & & \\
AB & READ\_A & \textbf{010} & Yes & + & 110 & & & \\
AB & READ\_B & \textbf{010} & Yes & + & \textbf{110} & Yes & - & \\
AB & ADDSUB & \textbf{010} & Yes & + & \textbf{110} & Yes & - & \\
FINAL & CHECK & \textbf{010} & Yes & + & \textbf{110} & Yes & - & \\
FINAL & LINK & \textbf{010} & Yes & + & \textbf{110} & Yes & - & \multicolumn{1}{r}{\textbf{000}} \\
\multicolumn{2}{c|}{DONE} & \textbf{010} & Yes & + & \textbf{110} & Yes & - & \multicolumn{1}{r}{\textbf{000}}
\end{tabular}
\caption{A simple example of addition}
\label{tab:arith_ex_simple}
\end{table}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment