Input Systems Keyboard MouseTouch Screen Pen/Stylus Magnetic Ink INPUT Character Recognition MICR... Input Systems Keyboard MouseTouch Screen Pen/Stylus Magnetic Ink Bar Code INPUT... I
Trang 1An Introduction to Computer Systems
David Vernon
Trang 2A Computer
Trang 3Key Concepts
sounds, images)
Trang 4Types of Computer
Pre-programmed
Watches Traffic Signals Engine Management Televisions Telephones Navigation Devices
Special Purpose (embedded systems)
Can be adapted to many situations Personal Computers Workstations Mainframes Supercomputers
General Purpose (user-programmable) Computer
Trang 6» such as the letters of the alphabet,
» or integers or real numbers,
» or light in an image,
» for the tone of a violin
Trang 7Key Concepts
electronic components that perform a function
– Combinations of thousands of circuits built on tiny pieces of silicon called chips
Trang 8Key Concepts
– Data with two states – off & on
– low voltage & high voltage – 0v & 5v
Trang 9Key Concepts
• Bit
– Single Binary Digit – Can have value 0 or 1, and nothing else – A bit is the smallest possible unit of information in
a computer
Trang 10Key Concepts
information
– 1 bit - 2 alternatives – 2 bits - 4 alternatives – 3 bits - 8 alternatives – 4 bits - 16 alternatives – n bits - 2n alternativies – 8bits - 28= 256 alternatives – a group of 8 bits is called a byte
Trang 14Key Concepts
– Two and usually more communication devices connected together
– Many connection topologies
Trang 15Key Concepts
– The physical (electronic and mechanical) parts of
a computer or information system
– The programs that control the operation of the computer system
Trang 16Components of Computer Systems
Trang 17Components of Computer Systems
Trang 18Key Components
– Input – Output – Storage – Processor
Trang 20Input Systems Keyboard Mouse
INPUT
» Cursor manipulation device
» Trackball
Trang 21Input Systems Keyboard Mouse
Touch Screen
INPUT
Trang 22Input Systems Keyboard Mouse
INPUT
Trang 23Input Systems Keyboard Mouse
Touch Screen Pen/Stylus Magnetic Ink
INPUT
Character Recognition
(MICR)
Trang 24Input Systems Keyboard Mouse
Touch Screen Pen/Stylus Magnetic Ink Bar Code
INPUT
Trang 25Input Systems Keyboard Mouse
Optical Character Recognition
INPUT
systems
handwritten block capital
Trang 26Input Systems Keyboard Mouse
Optical Character Recognition
Sensors
INPUT
– Digital thermometers – Accelerometers
– Strain gauges (weighing scales) –
Trang 27Input Systems Keyboard Mouse
Touch Screen Pen/Stylus
Magnetic Ink Bar Code
Optical Character Recognition
Trang 28Input Systems Keyboard Mouse
Touch Screen Pen/Stylus
Magnetic Ink Bar Code
Optical Character Recognition
Trang 30Output Systems
OUTPUT
Trang 31» LCD (Liquid Crystal Display)
OUTPUT
Trang 32Output Systems
– Modulator-Demodulator – Allows computers to communicate over telephone lines
OUTPUT
Trang 33OUTPUT
Trang 34Output Systems
Voice CRT Flat Panel
Soft Copy Modem Disk or Tape
Plotters Microfilm Non-impact
Printers
Impact Printers Hard Copy
OUTPUT
Trang 35Output Systems
Voice CRT Flat Panel
Soft Copy Modem Disk or Tape
Plotters Microfilm Non-impact
Printers
Impact Printers Hard Copy
OUTPUT
Trang 36Output Systems
Voice CRT Flat Panel
Soft Copy Modem Disk or Tape
Plotters Microfilm
Laser Magnetic Thermal Transfer Thermal and Electrostatic
Non-impact Printers
Impact Printers Hard Copy
OUTPUT
Trang 37Output Systems
Voice CRT Flat Panel
Soft Copy Modem Disk or Tape
Plotters Microfilm Non-impact
Printers
Dot matrix Line Printer
Impact Printers Hard Copy
OUTPUT
Trang 39Permanent MASS STORAGE
STORAGE
Trang 40» Won’t disappear when power is off
– RAM - Random Access Memory
Permanent MASS STORAGE
STORAGE
Trang 41Storage Systems
– 15,000 tracks per inch
– Digital code read by laser
– 650 Mbytes in a 4.75” plastic platter
– CD ROM; WORM; Erasable Disks
ROM RAM
Temporary MEMORY
Optical Magnetic
Permanent MASS STORAGE
STORAGE
Trang 42Optical Magnetic
Permanent MASS STORAGE
STORAGE
Trang 43– Lasers read and write inofrmation
– Also use a magnetic material
– To write: a laser beam heats a tiny spot and a magnetic field is
applied to reverse the magnetic polarity
ROM RAM
Temporary MEMORY
Optical Magnetic
Permanent MASS STORAGE
STORAGE
Trang 44STORAGE
Trang 45STORAGE
Trang 46ROM RAM
Temporary MEMORY
Trang 47The Processor:
Hardware & Software
Trang 48Components of Computer Systems
Trang 50Microprocessor
Memory Interface ICs
Trang 51Microprocessor
Memory Interface ICs
Trang 52Operating
Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 53Operating Systems
– Software which is responsible for passing
information to and from the person using the program (the user)
– Communicates with and controls the computer
– Three types of user interface:
» Graphic user interfaces
» Menu driven interfaces
» Command driven interfaces
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 54Operating Systems
– Pictures, graphic symbols (icons), to represent
commands – Windows: a way of ‘looking in’ on several
applications at once
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 55Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 56Operating Systems
– A (system) prompt
– User types in single letter, word, line which is translated into
an instruction for the computer – For example: cp source destination
– Need to be very familiar with the syntax (grammar) of the
command language
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 57Operating
Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 58Operating Systems
the overall operation of the computer system
Trang 59– Software which ties the hardware to the software, and
– manages the flow of information to and from disks, printers, keyboards,
Shell Network I/F Task
Scheduler
Kernel
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 60Operating Systems
– Collection of information (stored on disk) – Disks need to be formatted to allow them to store information
– OS manages location of files on disk – OS performs I/O to disk
– OS checks and corrects errors on disk I/O
Trang 61Operating Systems
– Programs which handle the various hardware devices, e.g., mouse, keyboard, CD, video, etc.
– For example, an application wants to print a document
» It call the operating system
» which sends the information to the device driver together with instructions
» and the printer driver handles all the control of the printer
Trang 63Operating Systems
– Single-tasking – Command-driven – Huge number of applications written for DOS – Does not require powerful computer
– No network services – No multimedia extensions – Designed for the Intel 80x86 processor
Trang 64Operating Systems
– GUI – Can run DOS programs – Has network services – Has multimedia extensions – Requires large amounts of memory, disk space, powerful processor
– Designed for the Intel 80X86 processors
Trang 65Operating Systems
– Multi-tasking – GUI called finder – Very easy to use – Very graphically oriented – Has network services
– Has multimedia extensions – Designed for the Motorola and PowerPC
Trang 66Application Software
– Payroll – Accounting – Book-Keeping – Entertainment – Statistical Analysis
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 67Application Software
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
– Word Processing (e.g MS Word) – Desktop Publishing (e.g Quark Xpress) – Spreadsheets (e.g MS Excel)
– Databases (e.g MS Access) – Graphics (e.g MS Powerpoint) – E-mail (e.g MS Mail)
Trang 68Application Software
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
Trang 69Application Software
Operating Systems
Programming Languages
System Software
General Purpose
Special Purpose Application Software Software
– Object Linking & Embedding (OLE) – Information is stored in one location only – Reference is made to it from another application – This reference is known as a link
– Don’t actually make a copy (cf hypertext, multimedia, WWW)
Trang 70Application Software
Trang 71Operation of Processor and Memory
Trang 72The Processor
and carries out instructions
Trang 73The Processor
set
is called machine language
Trang 75The Processor
memory, then the operand is called an address
• num1 could be a number or it could be the
address of a number in memory (i.e where the number is stored)
Trang 76Program Control branching, subroutines
Data Movement Move, load, store
Input/Output Read, Write
Trang 77The Processor
– retrieve instructions from memory – retrieve data (operands) from memory – perform the operation
– (maybe store the result in memory) – retrieve the next instruction
Trang 78The Processor
and over at speeds measured in millionths of
a second
must wait until the clock ‘ticks’ to begin
ticks 300 000 000 times a second
Trang 79The Components of a Processor
MEMORY
CPU
Control Unit
Trang 80The Control Unit
components
Trang 81The Control Unit
– is a signal – which tells the control unit to suspend execution of its present sequence of instructions (A)
– and to transfer to another sequence (B) – resuming the original sequence (A) when finished with (B)
Trang 82: : Instruction Bn
EXECUTE instructions
Trang 83The Control Unit
individual actions (more on this later)
computer
Trang 84The Arithmetic & Logic Unit
Trang 85The Arithmetic & Logic Unit
– addition, subtraction, multiplication, division
– make a comparison (CMP a, b) – and take action as a result (BEQ same)
Trang 86– store data items
Trang 87– Size of the operand register – Also used to describe the size of the pathways to and from the processor and between the
components of the processor
processor are 32 bits wide (long!)
Trang 88Specialized Processors
– Image processing; sound, speech
– Real number arithmetic
Circuits
– Microwave contoller
– Engine management controller
Trang 89The Operation of the Processor
A Simple Accumulator-Based CPU
(Von Neumann Computer)
Trang 90The Components of a Processor
MEMORY
CPU
Control Unit
Trang 91Main Components
– Coordinates all other units in the computer – Organizes movement of data from/to I/O, memory, registers.
– Directs ALU, specifically to indicate the operations
to be performed – The control unit operates according to the stored program, receiving and executing its instructions one at a time
Trang 92The Components of a Processor
MEMORY
CPU
Control Unit
Trang 93Main Components
– All computations are performed in this unit – ALU comprises adders, counters, and registers – Numerical operations (+ - / x)
– Logical operations (AND, OR, program branching)
Trang 94– Receives data from two or more sources, performs the
arithmetic, and sends the results to a register
– Counts the number of times an operation is performed
Trang 95The Components of a Processor
MEMORY
Control Unit
Trang 96Some Key Points
binary digits
digits
allows these codes to be stored
Trang 97The Operation of a Processor
assignment statement?
A := B + C
Trang 98The Operation of a Processor
(because it’s not written in a way which matches the structure of the computer’s physical architecture)
of instructions which the does match the computer architecture
Trang 99The Operation of a Processor
architecture (i.e a machine)
or assembly language)– machine language when it’s written as a binary code
– assembly language when it’s written symbolically.
Trang 100The Components of a Processor
MEMORY
Control Unit
Trang 101The Components of a Processor
MEMORY CPU
DR AR
AC PC
IR Control
DR
Trang 102The Components of a Processor
Trang 103The Components of a Processor
MEMORY CPU
DR AR
AC PC
IR Control
DR
Trang 104The Components of a Processor
MEMORY CPU
DR AR
AC Arithmetic
PC IR
Control
Circuits
DR
Trang 105The Components of a Processor
MEMORY CPU
DR AR
AC PC
IR Control
DR
Trang 106The Components of a Processor
MEMORY CPU
DR AR
AC Arithmetic
PC IR
Control
Circuits
DR
Trang 107The Components of a Processor
MEMORY CPU
DR AR
AC PC
IR Control
DR
Trang 108Instruction Format
general, one would expect– opcode/operand
– opcode/address (which may vary in size)
Trang 111AC PC
IR Control
DR
00000001 B
01001100
C A
Trang 112AC Arithmetic
PC IR
Control
Circuits
DR
00000001 B
01001101
C A
Trang 113AC PC
IR Control
DR
00000001 B
01001101
C A
Trang 114But
Trang 115AC PC
IR Control
Load B Add C Store A
Trang 116So
Trang 118AC Arithmetic
PC IR
Load B Add C Store A
Load B
Trang 119AC PC
IR Control
DR
00000001 B
01001100
C A
Load B Add C Store A
Load B
Trang 120AC Arithmetic
PC IR
Load B Add C Store A
Add C
01001100
Trang 121AC PC
IR Control
DR
00000001 B
01001101
C A
Load B Add C Store A
Add C
Trang 122AC Arithmetic
PC IR
Load B Add C Store A
Store A
01001101
Trang 123AC PC
IR Control
DR
00000001 B
01001101
C A
Load B Add C Store A
Store A
Trang 124AC Arithmetic
PC IR
Load B Add C Store A
Trang 125Operation of the Processor
execute sequences of instructions stored in main memory
– Fetch Cycle – Execute Cycle
Trang 127Instruction Cycle
micro-operations each of which involves a transfer of data to/from registers
Trang 128Instruction Cycle
supervises other system component usually via special control lines
(either directly or indirectly)
devices are usually ignored until they actively request service from the CPU via an interrupt
Trang 129: : Instruction Bn
EXECUTE instructions Interrupt is activated by
an electronic signal
Trang 130Instruction Cycle
START
Instruction Awaiting
Execution?
Fetch next instruction
Execute next instruction
Trang 131AC PC
IR Control
DR
00000001 B
11111111 01001100 C
A Load B
Add C
Store A
Output
OP1 OP1 OP1
Main Program Subroutine A
Output
OP1 OP1 OP1
Interrupt Handler
Trang 132Register Transfer Language
referred to by an acronym
– Accumulator; main operand register of ALU
Trang 133Register Transfer Language
Trang 134Register Transfer Language
– Program Counter – Stores address of the next instruction to be executed
• IR
– Instruction Register – Holds the opcode of the current instruction
Trang 135Register Transfer Language
– Address Register – Holds the memory address of an operand
Trang 136Register Transfer Language
Trang 137CPU Activated?
AR ← PC
NO YES
Trang 139Evaluate an Assignment
– Load B – Add C – Store A
Trang 143AC PC
IR Control
Load B Add C Store A
Trang 144AC Arithmetic
PC IR
Load B Add C Store A
Load B DR ← M(AR)
Load B
Trang 145AC PC
IR Control
Load B Add C Store A
Load B IR ← DR(opcode)
Load B
Trang 146AC Arithmetic
PC IR
Load B Add C Store A
Load B Increment PC
Load B
Trang 147AC PC
IR Control
Load B Add C Store A
Load B Decode Instruction
Load B
Trang 148AC Arithmetic
PC IR
Load B Add C Store A
Load B AR ← DR(address)
Load B B
Trang 149AC PC
IR Control
Load B Add C Store A
Load B DR ← M(AR)
Trang 150AC Arithmetic
PC IR
Load B Add C Store A
Load B AC ← DR
B
01001100 01001100
Trang 151Extensions to the Basic Organizationand
Binary Number Representations
Trang 152operands and addresses
called a General Register Organization
provided for the purpose of memory address
Trang 153extended to include multiplication and division
numbers as well as integers
storing instructions (instruction buffer)
Trang 154transfer to subroutines or interrupt handling programs and recovery of original status of interrupted program on returning from
interrup handler
e.g the use of a ‘push-down stack’ implies that we need only a special-purpose ‘stack pointer’ register
Trang 155Simultaneous processing of two or more distinct instructions or data streams
Trang 156Information Representation
– Text – Numbers
» Integers
» Reals (floating point numbers)
Trang 157– A-Z, a-z, 1-9, ,¬!”£$$%^&*()_+
– Special unprintable characters such as the ENTER key (CR for carriage return)
Trang 158negative (-), then an n-bit binary word can represent integers in the range
-2n-1
Trang 159represent integers in the range
Trang 1600 0 0 0 0 0 0 1 1 0 0 1 1 1 1 1
Trang 162positive or negative numbers(1 for negative; 0 for positive)
+9 = 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1-9 = 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
Trang 1631 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0