• How components fit together to create working computer system • Includes physical aspects of computer systems. • Concerned with how computer hardware works[r]
Trang 1Computer Organization and
Assembly Language
CSC 221
Trang 2About Me
Dr Safdar Hussain Bouk
Assistant Professor
Department of Electrical Engineering COMSATS Institute of Information
Technology Islamabad.
bouk@comsats.edu.pk
Trang 3Course Outline Computer Organization
• Data Representation
• Integer Arithmetic
• Binary Representation
• Floating Point Representation
• Machine Instruction Characteristics
• Microporessor Bus Structure
• Memory Organization and Structure
• Addressing Modes
Trang 4Course Outline (Continued )
Assembly Language
Trang 5Course is About:
• What Computers consist of?
• How Computers work?
• How to represent information?
• How they are organized internally?
• How design affects programming and applications?
• Programming the machine: Assembly Language
Trang 6Course Objectives
After successfully completing the course, you will be able to:
its instruction set architecture and its basic fetch-execute cycle operation
Computer
programming including addressing modes, subroutines, interrupts, stacks, etc
programs
Trang 7Computing Machines
Ubiquitous ( = everywhere)
PDAs, etc
Mobile Phones, etc
players, industrial machinery, medical equipment, etc
Distinguishing Characteristics
• Cost
Trang 8Hardware
Electronics circuit boards
that provide
functionality of the system
Software
Program consists
of sets of instructions that control the system
Trang 9Inside the Computer
• Application software
• Written in high-level language
• System software
• Compiler: translates HLL code to machine code
• Operating System: service code
• Handling input/output
• Managing memory and storage
• Scheduling tasks & sharing resources
• Hardware
Trang 10Functions of a Computer
Functions of all Computers are:
Trang 11A Programmer’s View of a Computer
Application Programs High-Level Languages Assembly Language Machine Language
Microprogram Control Hardware
High-Level Languages Low-Level Language Machine-independent
Machine-Specifi
Trang 12Levels of Program Code
• High-level language
• Level of abstraction closer to
problem domain
• Provides productivity and
portability
• Assembly language
• Textual representation of
instructions
• Hardware representation
• Binary digits (bits)
• Encoded instructions and data
Trang 13Computer Organization and Architecture
COMPUTER ORGANIZATION
• How components fit together to create working computer system
• Includes physical aspects of computer systems
• Concerned with how computer hardware works
COMPUTER ARCHITECTURE
• Structure and behavior of computer system
• Logical aspects of system implementation as seen by programmer
• Concerned with how computer is designed
• Combination of hardware components with Instruction Set
Architecture (ISA): ISA is interface between software that runs on machine & hardware that executes it
Trang 14Moore’s Law
“The density of transistors in an integrated circuit
will double every year”
density of silicon chips every 18 months
10 years; advances in chip manufacturing processes have allowed the law to hold for 40 years, and it is expected to last for perhaps another 10
Trang 15Principle of Equivalence of Hardware and Software
• Anything that can be done with software can also be done with
hardware, and anything that can be done with hardware can also be done with software
• Modern computers are implementations of algorithms that execute other algorithms
Semantic Gap
• Open space between the physical components of a computer system and the high-level instructions of an application
• Semantic gap is bridged at each level of abstraction
Trang 16Abstraction Complete definition of abstraction includes the following:
• Suppression of detail
• Outline structure
• Division of responsibility
• Subdivision of system into smaller subsystems
Trang 17Abstraction and Computer Systems
a hierarchy of levels
• Each level has specific function
• Each level exists as a distinct hypothetical machine (or virtual machine)
set of instructions, calling upon machines at lower levels
to carry out tasks as necessary
Trang 18Abstraction and Computer Systems
computer programmers unless you are able to discuss low-level details.”
Donald E Knuth The Art of Computer Programming
http://en.wikipedia.org/wiki/Donald_Knuth
Trang 19Abstraction and Computer Systems
levels of abstraction in a computer system:
App7 HOL6 Asmb5 OS4 ISA3 Mc2 LG1
tasks performed by Computer
Trang 20Abstraction and Computer Systems
Level : APP7
programs designed to do specific kinds of
tasks for end users
programming language associated with it
(macros or shortcuts, e.g.)
with the actions and language(s)
associated with lower levels in the
abstraction hierarchy