Introduction to Computer Design CMPT 150 Section: D100 9962 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Introduction to Computer Design CMPT 150 Section: D100 9962

Description:

Digital Systems deal with signals having a finite number of discrete values. ... Note: 210 = Kilo, 220 = Mega, 230 = Giga. Changing decimal integers to binary ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 13
Provided by: css64
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Computer Design CMPT 150 Section: D100 9962


1
Introduction to Computer Design CMPT 150
Section D100 9962
  • Ch. 1 Digital Computers and Information

Characteristics of a Digital System is its
manipulation of discrete elements into
information. Digital Systems deal with signals
having a finite number of discrete values. In
electronic implementations, these discrete
elements can be represented by voltage intervals.
In Analog systems variables are measured over a
continuous range of intervals.
1
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
2
Representation of discrete elements
Discrete elements of information are represented
in a digital system by physical quantities called
signals. These signals use two discrete values
and as a result are known to be binary.
Example High/Low True/False I/O
The set of values 0, 1 defines a "2-valued" or
"binary" alphabet. A sequence of symbols from a
given alphabet is called a codeword.
2
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
3
Comparison of numbers in different bases
3
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
4
Changing from other number bases to decimal
An ? 1 r n? 1 An ? 2 r n? 2 A1 r 1 A0 r
0 A ? 1 r ? 1 A? 2 r? 2 . A? m 1 r ? m
1 A? m r ? m
Each coefficient Ai is one of the digits of given
number system. The subscript value i gives the
position of the coefficient and , hence, the
weight r i by which the coefficient must be
multiplied.
(312.4)5 3 x 52 1 x 51 2 x 5 0 4 x 5? 1
(82.8)10
Note 210 Kilo, 220 Mega, 230
Giga
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
4
5
Changing decimal integers to binary
This procedure requires division of decimal
integers by 2 and making a note of the remainder.
The first remainder obtained is referred to as
the Least Significant Digit (LSD) and the last
integer is referred to as the Most Significant
Digit (MSD).
5
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
6
Changing the fractional part of decimals to binary
If the fraction part is 0.375, then we multiply
the fractional by 2 and record the integer part
in each calculation. We continue to do this
until we obtain a string of zeros as our
fractional part or observe a repeating pattern.
Note The direction of LSD and MSD is reversed in
the fractional multiplication.

6
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06,
SFU
7
Arithmetical Operations , ?, ? on Binary
1 0 1 1 0 1 0 1 1 1 1 0 1 1 0 1
  • 1 0 1 1
  • ? 1 0 1
  • 1 0 1 1
  • 0 0 0 0 ?
  • 1 0 1 1 ? ?
  • 1 1 0 1 1 1

1 0 1 1 0 ? 1 0 0 1 0 0 0 1 0 0
7
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
8
Base 2 Encodings
An encoding is an assignment of codewords in one
alphabet to each of the symbols in a second
alphabet. In the design of electrical circuits it
is desirable to use a binary alphabet to maximize
the voltage interval that can be associated with
each symbol in an "encoding" of characters by
voltage levels.
Base 2 Encoding Each integer is represented by
its corresponding value in base 2. As the value
of the integer gets larger, the number of bits
required gets longer. Thus the codewords vary in
length.
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06,
SFU
8
9
Binary Coded Decimal (BCD)
In BCD each integer into binary, only the symbols
0 through 9 are represented by their
corresponding base-2 equivalents. Each binary
value is extended to four characters (bits) by
adding leading 0s to any binary value with fewer
than four bits. The resulting codewords are
The BCD representation of an unsigned integer is
obtained by concatenating the corresponding
binary codes together. For example 9132 would
be encoded as 1001 0001 0011 0010. NOTE The
message is actually 16 bits long. Spaces are not
part of the encoding but are used to make clear
each codeword in the message.
9
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
10
Gray Codes
The codewords for consecutive integers differ in
only one bit position. There are a number of
possible solutions. One such solution is
displayed in the table below.
The advantage of using Gray Codes is that the
amount of switching is minimized and the
reliability of the switching circuitry is
improved.
10
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
11
Odd and Even Parity
Coded information can have one of the two types
of parity. For odd parity each word must have an
odd number of 1s. Likewise for even parity each
word must have an even number of 1s. In the
table on the right BCD codes with even parity
have been shown. The parity P is made 1 when
there are an odd number of 1s.
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
11
12
Alphanumeric and ASCII Codes
Alphanumeric Codes consists of the 26 letters of
English Alphabets, the 10 decimal digits, and
some special characters. See page 23-24 of
text. The American Standard Code for Information
Interchange (ASCII) is a 7-bit code. However,
modern day computers manipulate an 8-bit quantity
known as byte. See page 24-25 of text.
12
CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU
Write a Comment
User Comments (0)
About PowerShow.com