Computer Organization and Assembly Language: Instructor: Asra Ashraf
Computer Organization and Assembly Language: Instructor: Asra Ashraf
Assembly Language
Instructor: Asra Ashraf
asra.ashraf@nu.edu.pk
Lecture 1
1
Outline
2
Course Information
• EE213 – Computer Organization and Assembly
Language (COAL)
• 3 + 1 Credit Hours
• 2 Lectures every week
• 3 hours of Lab work every week
• Pre Req. EE109 – CLD
3
Recommended Books
• Text Book(s)
– Assembly Language for x86 Processors by Kip R.
Irvine 6th edition
– Computer Organization and Architecture by
William Stallings 9th edition
• Reference Book(s)
– Fundamentals of Computer Organization and
Architecture by Mostafa Abd- El- Barr
– Any other reference material will be provided
through slate
4
Marks Distribution
5
Attendance Policy
• In order to appear in final exam, 80%
attendance is must, and there will be zero
tolerance on attendance
• Attendance will be called at the start of every
class and you will be marked as absent if you
are more than 10 minutes late
• Only excuses obtained officially are accepted.
Personal excuses are not accepted. No make-
up tests/quizzes/exams will be provided until
instructed by academic committee
6
General Guidelines
• Quizzes can be unannounced
• The environment of class will be friendly but
we have to respect the environment of the
class
• You are free to ask relevant questions during
the lecture
• Use of mobile phones/tablets/laptops is
strictly not allowed
• There will be no extension in the deadlines
7
Lets Start the Course
8
Why to Learn COAL?
• To Complete the Degree?
• There are many reasons and advantages to
learn COAL
• Significance of Computer Organization
– How exactly each instruction is executed at the
micro level
– Data flow
– Timing analysis
– Memory hierarchy
– Trade offs between execution cycles
– Hardware requirements/costs
9
– Software-hardware trade-offs
Why to Learn COAL?
• Significance of Assembly Language
– Accessibility to system hardware
• Assembly Language is useful for implementing system
software
• Also useful for small embedded system applications
– Space and time efficiency
• Understanding sources of program inefficiency
• Tuning program performance
• Writing compact code
– Writing a compiler for a high-level language 10
Difference between Computer
Organization & Computer Architecture
• Computer Architecture
– Computer Architecture is abstract model and are
those attributes that are visible to programmer
like instructions set, no of bits used for data,
addressing techniques
• Computer Organization
– A computer's organization expresses the realization of the
architecture. OR how features are implemented like these
registers ,those data paths or this connection to memory.
Contents of CO are ALU, CPU and memory organizations
11
Difference between Computer
Organization & Computer Architecture
• Computer Architecture • Computer Organization
• Interface between •Deals with components of
hardware and software connection in a system
• Abstract model and is •Expresses the realization of
programmer's view in terms architecture
of instructions, addressing •Describes how computer does
modes and registers a task
• While designing computer •Organization is done on the
system architecture is basis of architecture
considered first •Deals with low level design
• It deals with high level issues
design issues
12
A Hierarchy of Computer
Languages
• High Level Languages
• Assembly Language
• Machine Language
13
High Level Languages
• Called High Level because closer to human
language and farther from machine language
• Independent of a particular type of processor
• Easier to read, write and understand because
uses natural language elements
• Hides implementation details
• Must be translated to machine language
• C++, Jave, Python, Php etc
14
Assembly Language
• Low level programming language
• Used to interact with computer hardware
• Specific to a particular computer architecture
• Focuses on programming microprocessors
• Used to program
– Embedded system
– Device driver programming
– Computer viruses and boot loaders
15
Machine Language
• Lowest level programming language
• Sequence of 1s and 0s
• Easily understood by computers
• Almost impossible for humans to use
• Each CPU has its own unique machine
language
16
Low Level, High Level and Machine Languages
Application Programs
Machine specific
Low-Level Language
Assembly Language
Machine Language
Hardware
17
Conversion from High Level (HL) to
Low Level (LL) Language
• From Assembly to
Machine Language
– Assembler is used
• From High Level to
Machine Level Language
– Compiler converts High
Level Language to Object
Code
– Assembler is used to
convert Assembly Language
code to Machine Code 18
Compiler and Assembler
19
Translation Between Computer
Languages
• Add 2 and 4 and store the result in a variable “a”
High Level
Language
Assembly
Language
Machine
Language
20
Advantages of High Level Languages
Link
Source Object
Assembler Libraries
File File