next up previous contents
Next: Finite Fields Up: Vector Spaces Previous: Linear Maps   Contents

Sentences as Numbers

The following chart shows how we are converting letters and other characters into a binary representation for use in the later sections describing linear codes.


letter a b c d ... z A ... Z ... &
numerical value 0 1 2 3 ... 25 26 ... 51 ... &
$ \FF[2^6]$ $ \left(\begin{array}{c}0\\ 0\\ 0\\ 0\\ 0\\ 0 \end{array}\right)$ $ \left(\begin{array}{c}
1\\ 0\\ 0\\ 0\\ 0\\ 0 \end{array}\right)$ $ \left(\begin{array}{c}0\\ 1\\ 0\\ 0\\ 0\\ 0\\
\end{array}\right)$ $ \left(\begin{array}{c}1\\ 1\\ 0\\ 0\\ 0\\ 0
\end{array}\right)$ ... $ \left(\begin{array}{c}1\\ 0\\ 0\\ 1\\ 1\\ 0 \end{array}
\right)$ $ \left(\begin{array}{c}0\\ 1\\ 0\\ 1\\ 1\\ 0
\end{array}\right)$ ... $ \left(\begin{array}{c}1\\ 1\\ 0\\ 0\\ 1\\ 1 \end{array}
\right)$ ... $ \left(\begin{array}{c}
1\\ 1\\ 1\\ 1\\ 1\\ 1 \end{array}\right)$


The vector in the third row of the above table is given by the base 2 expansion of a letter's numerical value. The top position in the vector corresponds to $ 2^0$ and the bottom most position corresponds to $ 2^5$. For example, the word 'ace' has the numerical value '0','2','4'. The $ \FF[2^6]$ elements that represent 'ace' are then $ \left(\begin{array}{c}0\\ 0\\ 0\\ 0\\ 0\\ 0 \end{array}\right)$, $ \left(\begin{array}{c}0\\ 1\\ 0\\ 0\\ 0\\ 0\\
\end{array}\right)$, $ \left(\begin{array}{c}
0\\ 0\\ 1\\ 0\\ 0\\ 0 \end{array}\right)$. Below is an applet that converts a letter or a word to it's base 2 representation. The word can be a maximum of five letters long. If the word is too long it will be trimmed to the appropriate length. If the word is too short, the applet will assign the extra spaces to the zero vector. In the alphabet we are using the zero vector represents `a'. When switching back from the number form the word will have extra `a's at the end. Feel free to edit the words or the numbers and see what the translation is.


next up previous contents
Next: Finite Fields Up: Vector Spaces Previous: Linear Maps   Contents
Frederick Leitner 2004-05-12