{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

SFU - CMPT 150 - Lectures - Week 1

SFU - CMPT 150 - Lectures - Week 1 - c A.H.Dixon CMPT 150...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
c A.H.Dixon CMPT 150: Week 1 (Jan 7 - 11, 2008) 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 interpreta- tion . 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 non-negative 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. 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. However, a binary alphabet does not lend itself to human interpretation readily, and so encodings must be defined for “user-friendly” alphabets using the binary alphabet. Some of the ways of encoding larger alphabets using the binary alphabet are: 1. Natural binary encoding : Each unsigned integer is represented by its base-2 value. The arithmetic techniques for converting between base-2 and base-10 provide the tools for transforming sentences in one alphabet to sentences in the other. Techniques for converting from decimal to binary and from binary to decimal are described in the textbook by Mano and Kime, pages 13 - 15. 2. Binary Coded Decimal (BCD) : Rather than encode every integer into its base-2 equivalent, only the symbols “0” through “9” are represented by
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
c A.H.Dixon CMPT 150: Week 1 (Jan 7 - 11, 2008) 2 their corresponding 4-bit base-2 equivalents. The BCD representation of an unsigned integer is obtained by concatenating the corresponding binary codes together.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

SFU - CMPT 150 - Lectures - Week 1 - c A.H.Dixon CMPT 150...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online