This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: c A.H.Dixon CMPT 150: Week 1 (Jan 7  14) 1 1 ALPHABETS AND ENCODINGS An alphabet is a finite set of distinct symbols often called characters. Some, but not necessarily all, sequences of characters are meaningful. That is, they have been selected to represent an idea or concept. The assignment of meanings to a subset of sentences defined on an alphabet is called an interpretation . The 26 letters of the alphabet can be used to define sequences more commonly called words. Some words are meaningful, others are just garbled sequences of letters. The 10 digits, 0 through 9 define sequences called the nonnegative integers. In this case every sentence is meaningful since each defines some integer. By adding the character  to the alphabet of digits, we can construct sentences that correspond to the full set of integers, both positive and negative. An encoding is the assignment of a unique sequence of symbols from one alphabet to represent each symbol of the second alphabet. When a symbol (or sequence of symbols) in one alphabet has been assigned a unique sequence of characters from the second alphabet, that sequence is called a codeword for the original symbol or sequence. A sequence of symbols in a given alphabet can be encoded in a second alphabet by concatenating the codewords for each symbol of the given alphabet as expressed in the second alphabet. The resulting encoded sequence is called a message. For example, if 8 is encoded as 1000 and 7 is encoded as 0111 then 87 is expressed by the message 10000111. There are two types of encodings: 1. Variable Length Encoding : Assigns codewords that may be sequences of dif ferent length. 2. Fixed Length Encoding : The codewords for all symbols have the same length. Variable length encodings may lead to shorter messages, but may not be uniquely de cipherable; that is, attempting to interpret the message may lead to more than one possible interpretation. In such cases, the encoding is called ambiguous. Fixed length encodings are always uniquely decipherable, but the messages may be longer. In the design of electrical circuits an encoding is defined to represent an alphabet of symbols using different voltage levels. It is desirable to use an alphabet of only two symbols to maximize the voltage level interval that can be associated with each symbol in an encoding of characters by voltage levels. Although more symbols could be used, an alphabet of only two symbols simplifies the design of circuits and reduces the chance of error from voltage fluctuations. The symbols of the binary alphabet { 0, 1 } are called bits (analgous to digits for the ten digit symbols) and a bit refers to one symbol (either 0 or 1) in a binary sequence....
View
Full
Document
 Spring '08
 Dr.AnthonyDixon

Click to edit the document details