|
|
@ -2063,58 +2063,6 @@ as a byte with the bits ordered from \emph{most significant} to |
|
|
|
is toward the left of a diagram. Where bit fields are used, the text will |
|
|
|
clarify their position in each case. |
|
|
|
|
|
|
|
\begin{comment} |
|
|
|
\todo{Update example for big-bit-endian order.} |
|
|
|
|
|
|
|
\newsavebox{\exampleabox} |
|
|
|
\begin{lrbox}{\exampleabox} |
|
|
|
\setchanged |
|
|
|
\begin{bytefield}[bitwidth=1.3em]{32} |
|
|
|
\bitbox{1}{0} & |
|
|
|
\bitbox{1}{1} & |
|
|
|
\bitbox{1}{0} & |
|
|
|
\bitbox{1}{0} & |
|
|
|
\bitbox{16}{16 bit $\hexint{ABCD}$} & |
|
|
|
\bitbox{12}{12 bit $\hexint{123}$} & |
|
|
|
\end{bytefield} |
|
|
|
\end{lrbox} |
|
|
|
|
|
|
|
\newsavebox{\examplebbox} |
|
|
|
\begin{lrbox}{\examplebbox} |
|
|
|
\setchanged |
|
|
|
\begin{bytefield}[bitwidth=1.3em]{32} |
|
|
|
\bitbox{4}{4 bit $\hexint{2}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{D}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{C}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{B}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{A}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{3}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{2}$} & |
|
|
|
\bitbox{4}{4 bit $\hexint{1}$} & |
|
|
|
\end{bytefield} |
|
|
|
\end{lrbox} |
|
|
|
|
|
|
|
\newsavebox{\examplecbox} |
|
|
|
\begin{lrbox}{\examplecbox} |
|
|
|
\setchanged |
|
|
|
\begin{bytefield}[bitwidth=1.3em]{32} |
|
|
|
\bitbox{8}{8 bit $\hexint{D2}$} & |
|
|
|
\bitbox{8}{8 bit $\hexint{BC}$} & |
|
|
|
\bitbox{8}{8 bit $\hexint{3A}$} & |
|
|
|
\bitbox{8}{8 bit $\hexint{12}$} & |
|
|
|
\end{bytefield} |
|
|
|
\end{lrbox} |
|
|
|
|
|
|
|
For example, the following diagrams are all equivalent: |
|
|
|
\begin{formulae} |
|
|
|
\item $\Justthebox{\exampleabox}$ |
|
|
|
\item $\Justthebox{\examplebbox}$ |
|
|
|
\item $\Justthebox{\examplecbox}$ |
|
|
|
\end{formulae} |
|
|
|
|
|
|
|
and represent the byte sequence $[\hexint{D2}, \hexint{BC}, \hexint{3A}, \hexint{12}]$. |
|
|
|
\end{comment} |
|
|
|
|
|
|
|
\introlist |
|
|
|
\nsubsection{Constants} \label{constants} |
|
|
|
|
|
|
|