SlideShare a Scribd company logo
Introduction Chapter 1 S. Dandamudi
Outline A user’s view of computer systems What is assembly language? Relationship to machine language Advantages of high-level languages Faster program development Easier maintenance Portability Why program in assembly language? Time-efficiency Space-efficiency Accessibility to hardware Typical applications Why learn assembly language? Performance: C versus assembly language Multiplication example
A User’s View of Computer Systems Depends on the degree of abstraction provided by the underlying software We consider a hierarchy of five levels Moving to the top of hierarchy shields the user from the lower-level details The top two levels are  system independent The lower four levels are  system dependent Assembly and machine languages are specific to a particular processor One-to-one correspondence between assembly language and machine language
A User’s View of Computer Systems (cont’d)
What Is Assembly Language? Low-level language Each instruction performs a much lower-level task compared to a high-level language instruction One-to-one correspondence between assembly language and machine language instructions For most assembly language instructions, there is a machine language equivalent Assembler  translates assembly language instructions to machine language instructions Directly influenced by the instruction set and architecture of the processor (CPU)
What Is Assembly Language? (Cont’d) Some example assembly language instructions: inc  result mov  class_size,45 and  mask1,128 add  marks,10 Some points to note: Assembly language instructions are cryptic Mnemonics are used for operations inc  for increment,  mov  for move (i.e., copy)  Assembly language instructions are low level Cannot write instructions such as mov  marks, value MIPS Examples andi  $t2,$t1,15 addu  $t3,$t1,$t2 move  $t2,$t1
What Is Assembly Language? (Cont’d) Some simple high-level language instructions can be expressed by a single assembly instruction Assembly Language   C inc  result result++; mov  class_size,45 class_size = 45; and  mask1,128 mask1 &= 128; add  marks,10 marks += 10;
What Is Assembly Language? (Cont’d) Most high-level language instructions need more than one assembly instruction C     Assembly Language size = value; mov  AX,value mov  size,AX sum += x + y + z; mov  AX,sum add  AX,x add  AX,y add  AX,z mov  sum,AX
What Is Assembly Language? (Cont’d) Readability of assembly language instructions is much better than the machine language instructions Machine language instructions are a sequence of 1s and 0s Assembly Language     Machine Language   (in Hex) inc  result   FF060A00 mov  class_size,45   C7060C002D00 and  mask,128   80260E0080 add  marks,10   83060F000A
What Is Assembly Language? (Cont’d) MIPS examples Assembly Language     Machine Language   (in Hex) nop  00000000 move  $t2,$t15  000A2021 andi  $t2,$t1,15  312A000F addu  $t3,$t1,$t2  012A5821
Advantages of High-level Languages Program development is faster High-level instructions Fewer instructions to code Programs maintenance is easier For the same reasons as above Programs are portable Contain few machine-dependent details Can be used with little or no modifications on different types of machines Compiler translates to the target machine language Assembly language programs are not portable
Why Program in Assembly Language? Two main reasons: Efficiency Space-efficiency Time-efficiency Accessibility to system hardware Space-efficiency Assembly code tends to be compact Time-efficiency Assembly language programs tend to run faster Only a well-written assembly language program runs faster Easy to write an assembly program that runs slower than its high-level language equivalent
Typical Applications Application that need one of the three advantages of the assembly language Time-efficiency Time-convenience Good to have but not required for functional correctness Graphics Time-critical Necessary to satisfy functionality Real-time applications Aircraft navigational systems Process control systems Robot control software Missile control software
Typical Applications (cont’d) Accessibility to system hardware System software typically requires direct control of the system hardware devices Assemblers, linkers, compilers Network interfaces, device drivers Video games Space-efficiency Not a big plus point for most applications Code compactness is important in some cases Portable and hand-held device software Spacecraft control software
Why Learn Assembly Language? Some applications require programming in assembly language Typically only a small part of an application is coded in assembly language (rest written in a high-level language) Such programs are called  mixed mode   programs Assembly language can be used as a tool to learn computer organization You will know more about the organization and internal workings of a computer system Personal satisfaction of learning something something complicated and useful
Performance: C versus Assembly Language Last slide

More Related Content

PPT
Computer Programming - Lecture 1
PPTX
Introduction to Programming Concepts By Aamir Saleem Ansari
PPTX
Programming Fundamentals and Programming Languages Concepts
PPT
Compilers and interpreters
PDF
Computer Fundamentals Chapter 12 cl
PPTX
Cpu (Coumputer languages)
PPTX
Cf&oa
PPTX
Computer programming
Computer Programming - Lecture 1
Introduction to Programming Concepts By Aamir Saleem Ansari
Programming Fundamentals and Programming Languages Concepts
Compilers and interpreters
Computer Fundamentals Chapter 12 cl
Cpu (Coumputer languages)
Cf&oa
Computer programming

What's hot (20)

PPTX
Computer languages
PDF
Languages in computer
PDF
Introduction to Computer Programming
PPTX
Interfacing With High Level Programming Language
PPT
Computer programming concepts
PPT
13 A Programing Languages (IT) Lecture Slide
PPTX
Programming languages,compiler,interpreter,softwares
PDF
Introduction to computer programming
PPTX
Lecture1 compilers
PPT
Introduction to computer programming
PPTX
Chapter 5
PPTX
Interpreter
PPTX
Computer programming project 15sec
PPTX
Programming Fundamental Slide No.1
PPTX
Fundamentals of programming final
PPT
Intro To Programming Concepts
PPTX
Algorithms - Introduction to computer programming
PPTX
Translators(compiler assembler interpretor).
PPTX
PPTX
Cmp2412 programming principles
Computer languages
Languages in computer
Introduction to Computer Programming
Interfacing With High Level Programming Language
Computer programming concepts
13 A Programing Languages (IT) Lecture Slide
Programming languages,compiler,interpreter,softwares
Introduction to computer programming
Lecture1 compilers
Introduction to computer programming
Chapter 5
Interpreter
Computer programming project 15sec
Programming Fundamental Slide No.1
Fundamentals of programming final
Intro To Programming Concepts
Algorithms - Introduction to computer programming
Translators(compiler assembler interpretor).
Cmp2412 programming principles
Ad

Similar to Al2ed chapter1 (20)

PPT
computer architecture and organization.ppt
PDF
a1.pptx.pdf
PDF
Introduction to Assembly Language What and Why.pdf
PPT
Lec 01 basic concepts
PDF
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
PPT
Assembly language
PPT
01-BasicConcepts__.ppt
PPT
Basic concept of computer System first slide
PDF
what is assembly language by faisal shahzad
PPT
Assembly
PDF
microprocesser-140306112352-phpapp01.pdf
PPTX
Computer programming, low level and high level languages
PDF
chapt_01.pdf
DOCX
introduction to assembly language.
DOCX
introduction to assembly language by Faisal Shehzad
PPTX
Embedded c c++ programming fundamentals master
PPTX
IT ppt (Computer Languages).ppt, computer languages
PPTX
Introduction-to-Systems-Programming_Unit-I.pptx
PPT
Lession 6
PDF
C_NOTES.pdf
computer architecture and organization.ppt
a1.pptx.pdf
Introduction to Assembly Language What and Why.pdf
Lec 01 basic concepts
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly language
01-BasicConcepts__.ppt
Basic concept of computer System first slide
what is assembly language by faisal shahzad
Assembly
microprocesser-140306112352-phpapp01.pdf
Computer programming, low level and high level languages
chapt_01.pdf
introduction to assembly language.
introduction to assembly language by Faisal Shehzad
Embedded c c++ programming fundamentals master
IT ppt (Computer Languages).ppt, computer languages
Introduction-to-Systems-Programming_Unit-I.pptx
Lession 6
C_NOTES.pdf
Ad

More from Abdullelah Al-Fahad (17)

PPT
Al2ed chapter17
PPT
Al2ed chapter16
PPT
Al2ed chapter15
PPT
Al2ed chapter14
PPT
Al2ed chapter13
PPT
Al2ed chapter12
PPT
Al2ed chapter11
PPT
Al2ed chapter10
PPT
Al2ed chapter9
PPT
Al2ed chapter8
PPT
Al2ed chapter7
PPT
Al2ed chapter6
PPT
Al2ed chapter5
PPT
Al2ed chapter4
PPT
Al2ed chapter3
PPT
Al2ed chapter2
PPT
Al2ed chapter18
Al2ed chapter17
Al2ed chapter16
Al2ed chapter15
Al2ed chapter14
Al2ed chapter13
Al2ed chapter12
Al2ed chapter11
Al2ed chapter10
Al2ed chapter9
Al2ed chapter8
Al2ed chapter7
Al2ed chapter6
Al2ed chapter5
Al2ed chapter4
Al2ed chapter3
Al2ed chapter2
Al2ed chapter18

Recently uploaded (20)

PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Hybrid model detection and classification of lung cancer
PPT
What is a Computer? Input Devices /output devices
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
STKI Israel Market Study 2025 version august
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
August Patch Tuesday
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Programs and apps: productivity, graphics, security and other tools
Group 1 Presentation -Planning and Decision Making .pptx
A novel scalable deep ensemble learning framework for big data classification...
NewMind AI Weekly Chronicles – August ’25 Week III
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Enhancing emotion recognition model for a student engagement use case through...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Chapter 5: Probability Theory and Statistics
Hybrid model detection and classification of lung cancer
What is a Computer? Input Devices /output devices
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Web App vs Mobile App What Should You Build First.pdf
Getting started with AI Agents and Multi-Agent Systems
STKI Israel Market Study 2025 version august
Developing a website for English-speaking practice to English as a foreign la...
August Patch Tuesday

Al2ed chapter1

  • 1. Introduction Chapter 1 S. Dandamudi
  • 2. Outline A user’s view of computer systems What is assembly language? Relationship to machine language Advantages of high-level languages Faster program development Easier maintenance Portability Why program in assembly language? Time-efficiency Space-efficiency Accessibility to hardware Typical applications Why learn assembly language? Performance: C versus assembly language Multiplication example
  • 3. A User’s View of Computer Systems Depends on the degree of abstraction provided by the underlying software We consider a hierarchy of five levels Moving to the top of hierarchy shields the user from the lower-level details The top two levels are system independent The lower four levels are system dependent Assembly and machine languages are specific to a particular processor One-to-one correspondence between assembly language and machine language
  • 4. A User’s View of Computer Systems (cont’d)
  • 5. What Is Assembly Language? Low-level language Each instruction performs a much lower-level task compared to a high-level language instruction One-to-one correspondence between assembly language and machine language instructions For most assembly language instructions, there is a machine language equivalent Assembler translates assembly language instructions to machine language instructions Directly influenced by the instruction set and architecture of the processor (CPU)
  • 6. What Is Assembly Language? (Cont’d) Some example assembly language instructions: inc result mov class_size,45 and mask1,128 add marks,10 Some points to note: Assembly language instructions are cryptic Mnemonics are used for operations inc for increment, mov for move (i.e., copy) Assembly language instructions are low level Cannot write instructions such as mov marks, value MIPS Examples andi $t2,$t1,15 addu $t3,$t1,$t2 move $t2,$t1
  • 7. What Is Assembly Language? (Cont’d) Some simple high-level language instructions can be expressed by a single assembly instruction Assembly Language C inc result result++; mov class_size,45 class_size = 45; and mask1,128 mask1 &= 128; add marks,10 marks += 10;
  • 8. What Is Assembly Language? (Cont’d) Most high-level language instructions need more than one assembly instruction C Assembly Language size = value; mov AX,value mov size,AX sum += x + y + z; mov AX,sum add AX,x add AX,y add AX,z mov sum,AX
  • 9. What Is Assembly Language? (Cont’d) Readability of assembly language instructions is much better than the machine language instructions Machine language instructions are a sequence of 1s and 0s Assembly Language Machine Language (in Hex) inc result FF060A00 mov class_size,45 C7060C002D00 and mask,128 80260E0080 add marks,10 83060F000A
  • 10. What Is Assembly Language? (Cont’d) MIPS examples Assembly Language Machine Language (in Hex) nop 00000000 move $t2,$t15 000A2021 andi $t2,$t1,15 312A000F addu $t3,$t1,$t2 012A5821
  • 11. Advantages of High-level Languages Program development is faster High-level instructions Fewer instructions to code Programs maintenance is easier For the same reasons as above Programs are portable Contain few machine-dependent details Can be used with little or no modifications on different types of machines Compiler translates to the target machine language Assembly language programs are not portable
  • 12. Why Program in Assembly Language? Two main reasons: Efficiency Space-efficiency Time-efficiency Accessibility to system hardware Space-efficiency Assembly code tends to be compact Time-efficiency Assembly language programs tend to run faster Only a well-written assembly language program runs faster Easy to write an assembly program that runs slower than its high-level language equivalent
  • 13. Typical Applications Application that need one of the three advantages of the assembly language Time-efficiency Time-convenience Good to have but not required for functional correctness Graphics Time-critical Necessary to satisfy functionality Real-time applications Aircraft navigational systems Process control systems Robot control software Missile control software
  • 14. Typical Applications (cont’d) Accessibility to system hardware System software typically requires direct control of the system hardware devices Assemblers, linkers, compilers Network interfaces, device drivers Video games Space-efficiency Not a big plus point for most applications Code compactness is important in some cases Portable and hand-held device software Spacecraft control software
  • 15. Why Learn Assembly Language? Some applications require programming in assembly language Typically only a small part of an application is coded in assembly language (rest written in a high-level language) Such programs are called mixed mode programs Assembly language can be used as a tool to learn computer organization You will know more about the organization and internal workings of a computer system Personal satisfaction of learning something something complicated and useful
  • 16. Performance: C versus Assembly Language Last slide