Lectures/Lect 1 - Course Overview

advertisement
Course Overview
First Material
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
1
Class 1 outline

Course Syllabus
Information Representation
Number Systems

Material from sections 1-1 and 1-2 of text

Personal course website ece.osu.edu/~degroat


9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
2
Information Representation

In the real world

Items that we want to measure are continuous,
i.e., they can have any value





9/15/09 - L1 Crs Ovrvw
Weight
Temperature
Pressure
Velocity
And many, many others
Copyright 2009 - Joanne DeGroat, ECE, OSU
3
But in a computer


The paradigm of a computer that we are
familiar with is electronic. But there have
been others like Babbage’s compute engine
and cash registers which were mechanical.
The electronics make it easy to represent two
states, on and off, or high voltage level and
low voltage level.
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
4
Realization


Result: representation of real world quantities
by a system that can only represent discrete
states, and thus discrete quantities.
Example


Use you fingers to represent temperature from
o
o
10 F to 100 F.
What values did you represent?
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
5
Realization


Result: representation of real world quantities by
a system that can only represent discrete states,
and thus discrete quantities.
Example



Use you fingers to represent temperature from 10oF
to 100oF.
What values did you represent?
Ans: partially depends on whether it was in 8 or 10
steps. So it was either in 10oF steps or 12.5oF steps.
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
6
Digital Systems

Digital electronics have progressed from 12V
logic elements to 1.2V logic elements.




Could use these values OR
Use a representation of 1 for a HIGH
And a representation of 0 for a LOW
In electronics we restrict ourselves to just
these two states to provide interpretation of a
range of voltages as HIGH or a 1 and another
range as LOW or a 0. Why?
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
7
The Digital Computer



“Virtually every aspect of digital system
design is encompassed in a computer design”
(Hill and Peterson)
“Computers are the most important type of
digital sytem”
Computers and digital systems have become
pervasive in our world

From cell phones to MP3 players to ……
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
8
Computers & digital systems today

There everywhere, there everywhere









PCs and Workstations
Cell phones
MP3 players
Cameras
Your automobile – an automobile will have 15 to 40
embedded processors
Microwaves
Stoves, Dishwashers, fautces (auto temp control)
Washers, Dryers, Vacuum cleaners
And on and on and on and on and ………….
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
9
The computer

Major components

The CPU – central processing unit – the datapath
combined with the control unit




Datapath – performs the actual arithmetic and logic
functions on the data
Control Unit – THE BRAIN – controls the flow of data and
instructions, decoding and executing instructions
MEMORY – Consists of both registers, main
memory and secondary memory
I/O or Input/Output – communication channels to get
information into and out of the computer
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
10
Computers and digital systems



Each of the components of “The Computer” is
a digital component
“The computer” consists of an interconnected
set of digital modules.
Most of the components is are designed with
not much more than the techniques of this
class.
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
11
Number Systems




In digital systems you can only represent 2
states.
A base 10 number systems is simply not
straightforward.
Will need a different number system.
Concepts across number systems are the
same.
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
12
General number systems



A number system has a base or radix, r
A number in base r contains digits 0,1,2,…,r-1
The value represented as a power series in r as




An-1rn-1 + An-2rn-2 + … + A1r1 + A0r0 +
A-1r-1 + A-2r-2 + … + A-mr-m
and is written
An-1 An-2 …A1 A0 . A-1 A-2 …A-m
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
13
General number systems (2)

The “ . “ is called the radix point.


In base 10 it is the decimal point
In base 2 it is the binary point
is referred to as the most significant digit


Referred to as the msb
is referred to as the least significant digit
Referred to as the lsb


Usually m=0 so
9/15/09 - L1 Crs Ovrvw
is the lsb
Copyright 2009 - Joanne DeGroat, ECE, OSU
14
For base 10 or radix 10


Example - book 724.5
421



From prior education may have referred to digits
as the units, tens and hundred positions
421 = 4.21 x 102 in scientific notation
421 = 4 x 102 + 2 x 101 + 1 x 100

(Recalling that anything to the 0 power is 1)
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
15
Something in base or radix 5

(123)5 What is it’s value?


(Note method of showing base of number)
Value



Val (123)5 = 1 x 52 + 2 x 51 + 3 x 50
= 25 + 10 + 3
= (38)10
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
16
Binary numbers – base or radix 2



Have binary digits 0 and 1
So all number represented in binary have only
digits 0 and 1
11010 would have value?




9/15/09 - L1 Crs Ovrvw
= 1 x 24 + 1 x 2 3 + 0 x 2 2 + 1 x 21 + 0 x 2 0 +
= 1 x 16 + 1 x 8 + 0 x 4 + 1 x 2 + 0 x 1
= 16+8+2
= (26)10
Copyright 2009 - Joanne DeGroat, ECE, OSU
17
Know the powers of two

The first 16 powers of two are in the
following table.
9/15/09 - L1 Crs Ovrvw
n
2^n
n
2^N
0
1
8
256
1
2
9
512
2
4
10
1024
3
8
11
2048
4
16
12
4096
5
32
13
8192
6
64
14
16384
7
128
15
32768
Copyright 2009 - Joanne DeGroat, ECE, OSU
18
Some common size terms

210 is commonly referred to as kilo or K
220 is commonly referred to as mega or M
230 is commonly referred to as giga or G
240 is commonly referred to as tera or T

So 4K is = 22 x 210 = 212 = 409610



9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
19
Base 10 to binary

One method



Subtract the largest power of two from the value
and repeat until done.
Text example 652
146




9/15/09 - L1 Crs Ovrvw
Largest if 128 or 27 leaving18
Then have 16 or 24 leaving just 2
Which is 21 giving value
10010010
Copyright 2009 - Joanne DeGroat, ECE, OSU
20
Fractional Parts

In base 10


Have xx.12 which is 1 x 10-1 + 2 x 10-2
In base 2





Have binary point
xxx.1 which is 1 x 2-1 or 0.5 (1/2)
And xxx.01 which is 1 x 2-2 or 0.25 (1/4)
And xxx.001 which is 1 x 2-3 or 0.125 (1/8)
And xxx.0001 which is 1 x 2-4 or 0.0625 (1/16)
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
21
In digital systems and computer


Have two other radix systems that are related
to binary or base 2 as they are powers of it.
Octal or base 8




Can get an octal representation by grouping a
binary number into groups of 3 digits.
Octal numbers use 8 distinct digits 0 through 7
110010 = 110 010 = (6 2)8 for example
And can use same general number systems
expansion shown earlier.
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
22
Hex




Hex or Hexadecimal is more common than
Octal representation today
Hex is base or radix 16
Thus group 4 binary digits
1111 0100 1011 would be?


F 4 B
For representation need 16 symbols

Use 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
23
Class 1 assignment


Read sections 1-1 and 1-2
Problems for hand in


Problems for practice


1-4, 1-8, 1-9
1-10, 1-11
Reading for next class sections 1-3 and 1-4
9/15/09 - L1 Crs Ovrvw
Copyright 2009 - Joanne DeGroat, ECE, OSU
24
Download