\documentclass{article}
\usepackage{common}
\usepackage[landscape]{geometry}

\begin{document}
\begin{framed}

\pagehead{Characters}

Characters are 8$\times$8 grids of pixels, defined by the values in the character
data and palette RAMs.  The character data RAM holds the 64 pixels of the character
image, encoded using two bits per pixel.  The hardware uses these two bits to look
up the final pixel color in the character's four-entry palette.

For example, a character with a palette of blue, yellow, red and white might appear
as shown below.  On the left, the pixel values 0-3 are shown.  In the middle,
these same pixel values in binary.  On the right are the hex values,
as they appear in memory for this character.

\vspace{10 pt}

\begin{tikzpicture}[scale=1.0]
% \node [inner sep=0pt,above right] {\includegraphics[width=8.0cm]{chr.jpg}};
% \draw[help lines] (0,0) grid (8,8);
% \draw[fill=blue!20] (1,7) rectangle (0,8);
% \node at (0.5,0.5) {0};

\tikzstyle{Pixel} = [draw=black, font=\tt, line width=1pt, minimum width=0.7cm, minimum height=0.7cm, node distance=0.7cm]
\tikzstyle{Pixel0} = [fill=blue!15, Pixel]
\tikzstyle{Pixel1} = [fill=yellow!15, Pixel]
\tikzstyle{Pixel2} = [fill=red!15, Pixel]
\tikzstyle{Pixel3} = [fill=white, Pixel]

\node[name=00, Pixel0] {0};
\node[name=01, right of=00, Pixel1] {1};
\node[name=02, right of=01, Pixel1] {1};
\node[name=03, right of=02, Pixel1] {1};
\node[name=04, right of=03, Pixel1] {1};
\node[name=05, right of=04, Pixel1] {1};
\node[name=06, right of=05, Pixel1] {1};
\node[name=07, right of=06, Pixel1] {1};

\node[name=10, below of=00, Pixel0] {0};
\node[name=11, right of=10, Pixel1] {1};
\node[name=12, right of=11, Pixel2] {2};
\node[name=13, right of=12, Pixel2] {2};
\node[name=14, right of=13, Pixel2] {2};
\node[name=15, right of=14, Pixel1] {1};
\node[name=16, right of=15, Pixel1] {1};
\node[name=17, right of=16, Pixel1] {1};

\node[name=20, below of=10, Pixel1] {1};
\node[name=21, right of=20, Pixel1] {1};
\node[name=22, right of=21, Pixel2] {2};
\node[name=23, right of=22, Pixel2] {2};
\node[name=24, right of=23, Pixel2] {2};
\node[name=25, right of=24, Pixel1] {1};
\node[name=26, right of=25, Pixel1] {1};
\node[name=27, right of=26, Pixel0] {0};

\node[name=30, below of=20, Pixel0] {0};
\node[name=31, right of=30, Pixel1] {1};
\node[name=32, right of=31, Pixel2] {2};
\node[name=33, right of=32, Pixel3] {3};
\node[name=34, right of=33, Pixel3] {3};
\node[name=35, right of=34, Pixel3] {3};
\node[name=36, right of=35, Pixel3] {3};
\node[name=37, right of=36, Pixel3] {3};

\node[name=40, below of=30, Pixel1] {1};
\node[name=41, right of=40, Pixel1] {1};
\node[name=42, right of=41, Pixel1] {1};
\node[name=43, right of=42, Pixel1] {1};
\node[name=44, right of=43, Pixel2] {2};
\node[name=45, right of=44, Pixel1] {1};
\node[name=46, right of=45, Pixel1] {1};
\node[name=47, right of=46, Pixel1] {1};

\node[name=50, below of=40, Pixel0] {0};
\node[name=51, right of=50, Pixel1] {1};
\node[name=52, right of=51, Pixel1] {1};
\node[name=53, right of=52, Pixel1] {1};
\node[name=54, right of=53, Pixel2] {2};
\node[name=55, right of=54, Pixel1] {1};
\node[name=56, right of=55, Pixel1] {1};
\node[name=57, right of=56, Pixel1] {1};

\node[name=60, below of=50, Pixel1] {1};
\node[name=61, right of=60, Pixel1] {1};
\node[name=62, right of=61, Pixel1] {1};
\node[name=63, right of=62, Pixel1] {1};
\node[name=64, right of=63, Pixel2] {2};
\node[name=65, right of=64, Pixel1] {1};
\node[name=66, right of=65, Pixel1] {1};
\node[name=67, right of=66, Pixel1] {1};

\node[name=70, below of=60, Pixel0] {0};
\node[name=71, right of=70, Pixel1] {1};
\node[name=72, right of=71, Pixel1] {1};
\node[name=73, right of=72, Pixel1] {1};
\node[name=74, right of=73, Pixel2] {2};
\node[name=75, right of=74, Pixel1] {1};
\node[name=76, right of=75, Pixel1] {1};
\node[name=77, right of=76, Pixel1] {1};

\begin{scope}[xshift=7.3cm]

\tikzstyle{Byte} = [draw=black, font=\tt, minimum width=2.8cm, minimum height=0.7cm, node distance=0.7cm]
\node[name=00, Byte] {00 01 01 01};
\node[name=01, right=2.2cm, right of=00, Byte] {01 01 01 01};

\node[name=10, below of=00, Byte] {00 01 10 10};
\node[name=11, right=2.2cm, right of=10, Byte] {10 01 01 01};

\node[name=20, below of=10, Byte] {01 01 10 10};
\node[name=21, right=2.2cm, right of=20, Byte] {10 01 01 00};

\node[name=30, below of=20, Byte] {00 01 10 11};
\node[name=31, right=2.2cm, right of=30, Byte] {11 11 11 11};

\node[name=40, below of=30, Byte] {01 01 01 01};
\node[name=41, right=2.2cm, right of=40, Byte] {10 01 01 01};

\node[name=50, below of=40, Byte] {00 01 01 01};
\node[name=51, right=2.2cm, right of=50, Byte] {10 01 01 01};

\node[name=60, below of=50, Byte] {01 01 01 01};
\node[name=61, right=2.2cm, right of=60, Byte] {10 01 01 01};

\node[name=70, below of=60, Byte] {00 01 01 01};
\node[name=71, right=2.2cm, right of=70, Byte] {10 01 01 01};

\end{scope}

\begin{scope}[xshift=13cm]

\tikzstyle{Byte} = [draw=black, font=\tt, minimum width=1.4cm, minimum height=0.7cm, node distance=0.7cm]
\node[name=00, Byte] {15};
\node[name=01, right=0.8cm, right of=00, Byte] {55};

\node[name=10, below of=00, Byte] {1A};
\node[name=11, right=0.8cm, right of=10, Byte] {95};

\node[name=20, below of=10, Byte] {5A};
\node[name=21, right=0.8cm, right of=20, Byte] {94};

\node[name=30, below of=20, Byte] {1B};
\node[name=31, right=0.8cm, right of=30, Byte] {FF};

\node[name=40, below of=30, Byte] {55};
\node[name=41, right=0.8cm, right of=40, Byte] {95};

\node[name=50, below of=40, Byte] {15};
\node[name=51, right=0.8cm, right of=50, Byte] {95};

\node[name=60, below of=50, Byte] {55};
\node[name=61, right=0.8cm, right of=60, Byte] {95};

\node[name=70, below of=60, Byte] {15};
\node[name=71, right=0.8cm, right of=70, Byte] {95};

\end{scope}

\end{tikzpicture}

\end{framed}
\end{document}
