From 90744ac90d4ff4bbf793e4103f88da02ede3fb06 Mon Sep 17 00:00:00 2001 From: John Winans Date: Sun, 16 Aug 2020 15:15:28 -0500 Subject: [PATCH] Add FA truth table to binary addition example --- book/binary/chapter.tex | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/book/binary/chapter.tex b/book/binary/chapter.tex index 1cac253..7612242 100644 --- a/book/binary/chapter.tex +++ b/book/binary/chapter.tex @@ -495,7 +495,33 @@ no ``ten'' decimal) adding $1+1$ results in a zero with a carry as in: $1+1=10_2$ and in: $1+1+1=11_2$. Using these five sums, any two binary integers can be added. -For example: +\index{Full Adder}% +This truth table shows what is called a {\em Full Addr}. +A full addr is a function that can add three input bits +(the two addends and a carry value from a ``prior column'') +and produce the sum and carry output values.\footnote{ +Note that the sum could be expressed in Boolean Algebra as: +$sum = ci \oplus{} a \oplus{} b$} + +\begin{center} +\begin{tabular}{|ccc|cc|} +\hline +%\multicolumn{3}{c}{input} & \multicolumn{2}{c}{output}\\ +$ci$ & $a$ & $b$ & $co$ & $sum$\\ +\hline + 0 & 0 & 0 & 0 & 0 \\ + 0 & 0 & 1 & 0 & 1 \\ + 0 & 1 & 0 & 0 & 1 \\ + 0 & 1 & 1 & 1 & 0 \\ + 1 & 0 & 0 & 0 & 1 \\ + 1 & 0 & 1 & 1 & 0 \\ + 1 & 1 & 0 & 1 & 0 \\ + 1 & 1 & 1 & 1 & 1 \\ +\hline +\end{tabular} +\end{center} + +Adding two unsigned binary numbers using 16 full adders: \begin{verbatim} 111111 1111 <== carries @@ -505,6 +531,10 @@ For example: 0111001100110010 <== sum \end{verbatim} +Note that the carry ``into'' the LSB is zero. + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Signed Numbers}