Programming for Problem Solving

Sukhendra Singh
Sukhendra SinghB.Tech(IIIT Allahabad) M.Tech(BIT Ranchi) um JSS Academy of Technical Education
PROGRAMMING FOR PROBLEM
SOLVING (KCS101/201)
Unit-1 Lecture#1
By
Sukhendra Singh
Assistant Professor
JSS Academy of Technical Education Noida
sukhendrasingh@jssaten.ac.in
Topics Covered
• Introduction to Programming: Introduction to
components of a computer system: Memory,
processor, I/O Devices, storage, operating system,
Concept of assembler, compiler, interpreter, loader,
and linker.
Let us get into three syllables of title of the Course
Programming: Providing correct, unambiguous, easily understandable
instructions to perform a task.
Problem: Any computational Problem e.g. Searching, Sorting, Finding
maximum and minimum in a list, etc.
Solution: To find out correct, time efficient, memory efficient solution to a
given problem.
Even ,like a computer system, every human is also programmed since
childhood to perform common daily life’s tasks e.g. walking, running talking
etc.
Computer System
• A computer is a programmable electronic device designed to provide
various services. It stores retrieves and processes data efficiently. A
computer receives data and instructions through “Input Devices'' that get
processed in the Central Processing Unit (CPU) and the result is displayed
to “Output Devices.”
• The computer is a combination of Hardware and Software. Both Hardware
and Software are equally important for the functioning of Computers.
Computer System:
Desktop, Laptop, Tablet, Smart Phone, Embedded System
Hardware
• Hardware is a physical component of a computer like Processor, Memory,
Mouse, Keyboard, Printer, Monitor etc.
Components of Computer are:
• Input Devices
• Output Devices
• Processor / CPU (Central Processing Unit)
• Memory / RAM (Random Access Memory, Non-persistent storage)
• Storage or Auxiliary Memory (Persistent storage)
Introduction to components of a computer system
• Input Devices: These devices are used to input data and instructions into
the computer. E.g. Keyboard, Mouse etc.
•
CPU (Central Processing Unit): It is responsible for processing data and
instructions. It receives data from input devices. It processes the data
and stores the output or display to the output devices.
The Central Processing Unit is divided into three sections:
• ALU: It is responsible for performing various arithmetic operations like
addition, subtraction, division, multiplication etc.
• Control Unit : It is responsible for coordinating and controlling data in and
out of the CPU. It controls the ALU, Memory Registers and also Input /
Output Devices.
• Memory Registers: It is Non-persistent / temporary storage in the CPU.
These are used to store data that is directly used by the CPU.
• Output Devices: It is used to display the result to the user. The common
output devices are Monitor, Printer, etc.
• Memory / RAM: It is the memory attached to the CPU and is used to store
data and instructions. When a program is executed its data is loaded into
the internal memory and remains in the memory till the end. Memory is
also referred to as Main Memory, Primary Memory or RAM (Random
access memory).
Storage or Auxiliary Memory: It is the persistent storage of data in which
the data resides even if we switch off the computer. For example: Hard-
drives, CD, DVD etc.
Generation of Programming Language
• A First-generation (programming) language (1GL) is a machine-level
programming language that is used to program first-generation
computers.
• A Second-generation programming language (2GL) is Assembly
languages.
A Third-generation programming language (3GL) is much more machine-
independent and more programmer-friendly. The most popular general-
purpose languages today are 3GL, such as C, C++, C#, Java, BASIC, etc.
•
A Fourth-generation programming language (4GL) is such a language
whose statements are similar to the statements of the English language.
4GL languages are used to solve very specific problems. 4GL languages
may include support for Database management, report generation,
mathematical optimization, GUI development, or web development. E.g.
SQL, R, etc.
• A Fifth-generation programming language (5GL) is any
programming language to solve the problem based on constraints
and logic, rather than using an algorithm written by a
programmer. 5GL is designed to make the computer solve a given
problem without the programmer. E.g. OPS5, Mercury, etc.
Software
• The software consists of various types of programs that control the
operation of computers. The software is further divided into System
Software, Utility Software, and Application Software.
System Software
• System Software is the software that directly controls and utilizes
computer hardware. These programs help in running application
programs. System software directs the computer what to do, when to do
and how to do.
System software can be further categorized into:
• Operating System
• Device Driver
• Language Processors
Operating System
• An Operating system is a software that provides an interface to the user
to use computer hardware. It is a set of programs that control and
supervise the computer hardware, software resources and also provide
services to application software and the users. Process Management,
Memory Management, Device Management, and File management are
key functions of the Operating System. A computer system is of no use
without an Operating System. When a computer is switched on the
Operating System is the first program that is loaded to its memory.
•
Examples of Operating Systems used are Linux, Windows, Unix, etc.
•
Functions of Operating System:
• Processor Management: It deals with the management of the Central
Processing Unit or CPU. The operating system performs the allotment of
CPU time to various processes.
• Memory Management: The operating system loads a program into
memory when it needs to be executed and removes the program from
memory when it is no longer needed.
• Device Management: The operating system helps in communication
between various types of hardware.
• File Management: The operating system manages the files, folders, and
directory structures of the computer. The operating system file manager is
used to create, edit, copy, move, and delete files.
Device Driver
A device driver is a program that controls a particular device. Each device
like a keyboard, mouse, printer, etc. need their driver to work. The device
driver acts as a translator between the operating system and the device
connected to the computer.
Language Processors
The computer can understand only instructions in machine code, i.e. in
the form of 0s and 1s. It is very difficult to write computer programs
directly in machine code. The programs are written mostly in high-level
languages, i.e. C, C++, Python, etc. A program written in any high-level
programming language is called the Source Program or Source Code.
The source code cannot be executed directly by the computer. The source
code must be converted into machine language to be executed.
Language Processors are translator software that is used to translate the
program written in a high-level language (or Assembly language) into
machine level language. The language processors are of three types-
Assembler, Compiler, and Interpreter.
• Assembler
The Assembler is used to translate the program written in Assembly
language into machine level language or machine code. The input of
Assembler is a source program that contains assembly language
instructions. The output generated by the assembler is the machine code
that can be executed by the computer.
Compiler
The compiler is used to translate the high-level languages source program
as a whole into machine level language. Some of the examples are C and
C++ compilers. The source code is translated to object code successfully if
it is free of errors. If there are any errors in the source code, the compiler
specifies the errors at the end of compilation with line numbers. The
errors must be removed before the compiler can successfully recompile
the source code.
•
Difference between Assembler and Compiler.
Assembler Compiler
Assembler converts, assembly
language code into machine
code.
The compiler converts source
code written in higher-level
language into machine level
language.
Input is Assembly code Input is Source code in some
higher language.
GAS, GNU is an example of
Assembler
C, C++, Java compilers are
examples of compilers.
Linker
• A linker combines one or more object files and possibly some
library to create an executable.
Loader
• A loader reads the executable code into memory and tries to run
the program.
Programming for Problem Solving
Difference between Linker and Loader
Linker Loader
It generates executable files. It loads the executable file into the
main memory.
It takes input as object code and
generates executables.
It takes executable code generated
by linker as input.
It combines various object code into
one single executable.
It allocates the address to an
executable into the main memory.
• Stages of Compilation and Execution
 Preprocessor: C programs are passed to preprocessor to resolve
preprocessor directives and include files in the program.
 Compiler: Compiler converts C program into machine language. In this
step, an object file is created.
 Linker: Linker combines various object files and libraries to form an
executable.
 Loader: Loader loads the executable file into the main memory.
• Utility Software
Utility software provides certain tasks that help to manage, maintain, and
control computer resources. The utility software is used to keep the
computer system running smoothly. Examples of utility programs are
antivirus software, backup software, etc. Antivirus software helps to
protect computers from viruses and other harmful programs. Backup
software helps in the creation of backup of the files on your computer.
Hard-drives are used for storage; they are robust but can fail or crash. So
backup software is used to create copies of the most important files in
some external drive.
Application Software
• Application software is used to solve a particular problem or perform
some specific task.
Few examples of application software:
• Microsoft Office
• Photoshop
• Music Players
• Games
• Thank You
1 von 25

Recomendados

1 introduction to problem solving and programming von
1 introduction to problem solving and programming1 introduction to problem solving and programming
1 introduction to problem solving and programmingRheigh Henley Calderon
16.3K views4 Folien
Programming Fundamentals lecture 1 von
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1REHAN IJAZ
2.5K views22 Folien
Algorithms Lecture 1: Introduction to Algorithms von
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsBenha University
3.3K views31 Folien
Asymptotic Notation von
Asymptotic NotationAsymptotic Notation
Asymptotic NotationProtap Mondal
4.3K views23 Folien
Algorithm and flowchart von
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartRabin BK
10.8K views17 Folien
Lecture 5 - Structured Programming Language von
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Md. Imran Hossain Showrov
899 views14 Folien

Más contenido relacionado

Was ist angesagt?

Algorithm and flowchart von
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartElizabeth de Leon Aler
87.3K views9 Folien
Introduction to c programming von
Introduction to c programmingIntroduction to c programming
Introduction to c programmingABHISHEK fulwadhwa
4.6K views74 Folien
Introduction to c++ ppt 1 von
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1Prof. Dr. K. Adisesha
2.8K views65 Folien
Introduction to programming von
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
4.3K views18 Folien
Programming languages von
Programming languagesProgramming languages
Programming languageswww.myassignmenthelp.net
6.4K views30 Folien
Lect 1. introduction to programming languages von
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
235.3K views33 Folien

Was ist angesagt?(20)

Introduction to programming von Neeru Mittal
Introduction to programmingIntroduction to programming
Introduction to programming
Neeru Mittal4.3K views
Lect 1. introduction to programming languages von Varun Garg
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
Varun Garg235.3K views
Introduction to data structures and Algorithm von Dhaval Kaneria
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
Dhaval Kaneria45.7K views
1. over view and history of c von Harish Kumawat
1. over view and history of c1. over view and history of c
1. over view and history of c
Harish Kumawat10.4K views
Flowcharts and algorithms von Student
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
Student5.9K views
structured programming von Ahmad54321
structured programmingstructured programming
structured programming
Ahmad5432111.2K views
C++ ppt von parpan34
C++ pptC++ ppt
C++ ppt
parpan3445.7K views
Operators and expressions in C++ von Neeru Mittal
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal4.8K views
What is an algorithm? von Angela DeHart
What is an algorithm?What is an algorithm?
What is an algorithm?
Angela DeHart18.5K views
Presentation on C++ Programming Language von satvirsandhu9
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
satvirsandhu927.6K views

Similar a Programming for Problem Solving

Unit 1.pptx von
Unit 1.pptxUnit 1.pptx
Unit 1.pptxDeepalShah123
9 views26 Folien
Interaction With Computers FIT von
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FITRaj vardhan
46 views13 Folien
Computer Software von
Computer SoftwareComputer Software
Computer SoftwareRoshanMaharjan13
330 views32 Folien
introductiontocomputerprogramming.pptx von
introductiontocomputerprogramming.pptxintroductiontocomputerprogramming.pptx
introductiontocomputerprogramming.pptxHazardRhenz1
5 views18 Folien
c and data structures first unit notes (jntuh syllabus) von
c and data structures first unit notes (jntuh syllabus)c and data structures first unit notes (jntuh syllabus)
c and data structures first unit notes (jntuh syllabus)Acad
3K views31 Folien
Unit i von
Unit iUnit i
Unit iDurga Devi
388 views59 Folien

Similar a Programming for Problem Solving(20)

Interaction With Computers FIT von Raj vardhan
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FIT
Raj vardhan46 views
introductiontocomputerprogramming.pptx von HazardRhenz1
introductiontocomputerprogramming.pptxintroductiontocomputerprogramming.pptx
introductiontocomputerprogramming.pptx
HazardRhenz15 views
c and data structures first unit notes (jntuh syllabus) von Acad
c and data structures first unit notes (jntuh syllabus)c and data structures first unit notes (jntuh syllabus)
c and data structures first unit notes (jntuh syllabus)
Acad3K views
Programming Fundamentals and Programming Languages Concepts von imtiazalijoono
Programming Fundamentals and Programming Languages ConceptsProgramming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono178 views
PPS UNIT 1- R18.docx von Uzma1102
PPS UNIT 1- R18.docxPPS UNIT 1- R18.docx
PPS UNIT 1- R18.docx
Uzma110291 views
Understanding Computer Systems von Ar Kyu Dee
Understanding Computer SystemsUnderstanding Computer Systems
Understanding Computer Systems
Ar Kyu Dee105 views
Computer Hardware and Software Elements von Adetula Bunmi
Computer Hardware and Software ElementsComputer Hardware and Software Elements
Computer Hardware and Software Elements
Adetula Bunmi17.7K views
Problem Solving and Program Design in C_1.pdf von jlu08167
Problem Solving and Program Design in C_1.pdfProblem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdf
jlu081675 views
Introductiontocomputerprogramming 140713205433-phpapp02 von Lanie Plecerda
Introductiontocomputerprogramming 140713205433-phpapp02Introductiontocomputerprogramming 140713205433-phpapp02
Introductiontocomputerprogramming 140713205433-phpapp02
Lanie Plecerda79 views
Vskills c developer sample material von Vskills
Vskills c developer sample materialVskills c developer sample material
Vskills c developer sample material
Vskills63 views
Introduction to Computers Lecture # 11 von Sehrish Rafiq
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11
Sehrish Rafiq315 views
Vskills c++ developer sample material von Vskills
Vskills c++ developer sample materialVskills c++ developer sample material
Vskills c++ developer sample material
Vskills41 views
Computer Notes von EHSAN KHAN
Computer NotesComputer Notes
Computer Notes
EHSAN KHAN376 views
system software and application software, compiler, interpreter & assembler von chetan birla
system software  and application software, compiler, interpreter & assemblersystem software  and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
chetan birla41.7K views

Último

Robotics in construction enterprise von
Robotics in construction enterpriseRobotics in construction enterprise
Robotics in construction enterpriseKhalid Abdel Naser Abdel Rahim
5 views1 Folie
Automated Remote sensing GPS satellite system for managing resources and moni... von
Automated Remote sensing GPS satellite system for managing resources and moni...Automated Remote sensing GPS satellite system for managing resources and moni...
Automated Remote sensing GPS satellite system for managing resources and moni...Khalid Abdel Naser Abdel Rahim
5 views1 Folie
Plant Design Report-Oil Refinery.pdf von
Plant Design Report-Oil Refinery.pdfPlant Design Report-Oil Refinery.pdf
Plant Design Report-Oil Refinery.pdfSafeen Yaseen Ja'far
9 views10 Folien
IRJET-Productivity Enhancement Using Method Study.pdf von
IRJET-Productivity Enhancement Using Method Study.pdfIRJET-Productivity Enhancement Using Method Study.pdf
IRJET-Productivity Enhancement Using Method Study.pdfSahilBavdhankar
10 views4 Folien
CPM Schedule Float.pptx von
CPM Schedule Float.pptxCPM Schedule Float.pptx
CPM Schedule Float.pptxMathew Joseph
6 views5 Folien
Renewal Projects in Seismic Construction von
Renewal Projects in Seismic ConstructionRenewal Projects in Seismic Construction
Renewal Projects in Seismic ConstructionEngineering & Seismic Construction
6 views8 Folien

Último(20)

IRJET-Productivity Enhancement Using Method Study.pdf von SahilBavdhankar
IRJET-Productivity Enhancement Using Method Study.pdfIRJET-Productivity Enhancement Using Method Study.pdf
IRJET-Productivity Enhancement Using Method Study.pdf
SahilBavdhankar10 views
Basic Design Flow for Field Programmable Gate Arrays von Usha Mehta
Basic Design Flow for Field Programmable Gate ArraysBasic Design Flow for Field Programmable Gate Arrays
Basic Design Flow for Field Programmable Gate Arrays
Usha Mehta5 views
Unlocking Research Visibility.pdf von KhatirNaima
Unlocking Research Visibility.pdfUnlocking Research Visibility.pdf
Unlocking Research Visibility.pdf
KhatirNaima11 views
REACTJS.pdf von ArthyR3
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
ArthyR337 views
Ansari: Practical experiences with an LLM-based Islamic Assistant von M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous11 views
AWS Certified Solutions Architect Associate Exam Guide_published .pdf von Kiran Kumar Malik
AWS Certified Solutions Architect Associate Exam Guide_published .pdfAWS Certified Solutions Architect Associate Exam Guide_published .pdf
AWS Certified Solutions Architect Associate Exam Guide_published .pdf
Integrating Sustainable Development Goals (SDGs) in School Education von SheetalTank1
Integrating Sustainable Development Goals (SDGs) in School EducationIntegrating Sustainable Development Goals (SDGs) in School Education
Integrating Sustainable Development Goals (SDGs) in School Education
SheetalTank111 views
GDSC Mikroskil Members Onboarding 2023.pdf von gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil68 views
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R... von IJCNCJournal
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...
IJCNCJournal5 views
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx von lwang78
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
lwang78188 views

Programming for Problem Solving

  • 1. PROGRAMMING FOR PROBLEM SOLVING (KCS101/201) Unit-1 Lecture#1 By Sukhendra Singh Assistant Professor JSS Academy of Technical Education Noida sukhendrasingh@jssaten.ac.in
  • 2. Topics Covered • Introduction to Programming: Introduction to components of a computer system: Memory, processor, I/O Devices, storage, operating system, Concept of assembler, compiler, interpreter, loader, and linker.
  • 3. Let us get into three syllables of title of the Course Programming: Providing correct, unambiguous, easily understandable instructions to perform a task. Problem: Any computational Problem e.g. Searching, Sorting, Finding maximum and minimum in a list, etc. Solution: To find out correct, time efficient, memory efficient solution to a given problem. Even ,like a computer system, every human is also programmed since childhood to perform common daily life’s tasks e.g. walking, running talking etc.
  • 4. Computer System • A computer is a programmable electronic device designed to provide various services. It stores retrieves and processes data efficiently. A computer receives data and instructions through “Input Devices'' that get processed in the Central Processing Unit (CPU) and the result is displayed to “Output Devices.” • The computer is a combination of Hardware and Software. Both Hardware and Software are equally important for the functioning of Computers.
  • 5. Computer System: Desktop, Laptop, Tablet, Smart Phone, Embedded System
  • 6. Hardware • Hardware is a physical component of a computer like Processor, Memory, Mouse, Keyboard, Printer, Monitor etc. Components of Computer are: • Input Devices • Output Devices • Processor / CPU (Central Processing Unit) • Memory / RAM (Random Access Memory, Non-persistent storage) • Storage or Auxiliary Memory (Persistent storage)
  • 7. Introduction to components of a computer system
  • 8. • Input Devices: These devices are used to input data and instructions into the computer. E.g. Keyboard, Mouse etc. • CPU (Central Processing Unit): It is responsible for processing data and instructions. It receives data from input devices. It processes the data and stores the output or display to the output devices. The Central Processing Unit is divided into three sections: • ALU: It is responsible for performing various arithmetic operations like addition, subtraction, division, multiplication etc. • Control Unit : It is responsible for coordinating and controlling data in and out of the CPU. It controls the ALU, Memory Registers and also Input / Output Devices. • Memory Registers: It is Non-persistent / temporary storage in the CPU. These are used to store data that is directly used by the CPU.
  • 9. • Output Devices: It is used to display the result to the user. The common output devices are Monitor, Printer, etc. • Memory / RAM: It is the memory attached to the CPU and is used to store data and instructions. When a program is executed its data is loaded into the internal memory and remains in the memory till the end. Memory is also referred to as Main Memory, Primary Memory or RAM (Random access memory). Storage or Auxiliary Memory: It is the persistent storage of data in which the data resides even if we switch off the computer. For example: Hard- drives, CD, DVD etc.
  • 10. Generation of Programming Language • A First-generation (programming) language (1GL) is a machine-level programming language that is used to program first-generation computers. • A Second-generation programming language (2GL) is Assembly languages. A Third-generation programming language (3GL) is much more machine- independent and more programmer-friendly. The most popular general- purpose languages today are 3GL, such as C, C++, C#, Java, BASIC, etc. • A Fourth-generation programming language (4GL) is such a language whose statements are similar to the statements of the English language. 4GL languages are used to solve very specific problems. 4GL languages may include support for Database management, report generation, mathematical optimization, GUI development, or web development. E.g. SQL, R, etc.
  • 11. • A Fifth-generation programming language (5GL) is any programming language to solve the problem based on constraints and logic, rather than using an algorithm written by a programmer. 5GL is designed to make the computer solve a given problem without the programmer. E.g. OPS5, Mercury, etc.
  • 12. Software • The software consists of various types of programs that control the operation of computers. The software is further divided into System Software, Utility Software, and Application Software. System Software • System Software is the software that directly controls and utilizes computer hardware. These programs help in running application programs. System software directs the computer what to do, when to do and how to do. System software can be further categorized into: • Operating System • Device Driver • Language Processors
  • 13. Operating System • An Operating system is a software that provides an interface to the user to use computer hardware. It is a set of programs that control and supervise the computer hardware, software resources and also provide services to application software and the users. Process Management, Memory Management, Device Management, and File management are key functions of the Operating System. A computer system is of no use without an Operating System. When a computer is switched on the Operating System is the first program that is loaded to its memory. • Examples of Operating Systems used are Linux, Windows, Unix, etc.
  • 14.
  • 15. Functions of Operating System: • Processor Management: It deals with the management of the Central Processing Unit or CPU. The operating system performs the allotment of CPU time to various processes. • Memory Management: The operating system loads a program into memory when it needs to be executed and removes the program from memory when it is no longer needed. • Device Management: The operating system helps in communication between various types of hardware. • File Management: The operating system manages the files, folders, and directory structures of the computer. The operating system file manager is used to create, edit, copy, move, and delete files.
  • 16. Device Driver A device driver is a program that controls a particular device. Each device like a keyboard, mouse, printer, etc. need their driver to work. The device driver acts as a translator between the operating system and the device connected to the computer. Language Processors The computer can understand only instructions in machine code, i.e. in the form of 0s and 1s. It is very difficult to write computer programs directly in machine code. The programs are written mostly in high-level languages, i.e. C, C++, Python, etc. A program written in any high-level programming language is called the Source Program or Source Code. The source code cannot be executed directly by the computer. The source code must be converted into machine language to be executed. Language Processors are translator software that is used to translate the program written in a high-level language (or Assembly language) into machine level language. The language processors are of three types- Assembler, Compiler, and Interpreter.
  • 17. • Assembler The Assembler is used to translate the program written in Assembly language into machine level language or machine code. The input of Assembler is a source program that contains assembly language instructions. The output generated by the assembler is the machine code that can be executed by the computer. Compiler The compiler is used to translate the high-level languages source program as a whole into machine level language. Some of the examples are C and C++ compilers. The source code is translated to object code successfully if it is free of errors. If there are any errors in the source code, the compiler specifies the errors at the end of compilation with line numbers. The errors must be removed before the compiler can successfully recompile the source code. •
  • 18. Difference between Assembler and Compiler. Assembler Compiler Assembler converts, assembly language code into machine code. The compiler converts source code written in higher-level language into machine level language. Input is Assembly code Input is Source code in some higher language. GAS, GNU is an example of Assembler C, C++, Java compilers are examples of compilers.
  • 19. Linker • A linker combines one or more object files and possibly some library to create an executable. Loader • A loader reads the executable code into memory and tries to run the program.
  • 21. Difference between Linker and Loader Linker Loader It generates executable files. It loads the executable file into the main memory. It takes input as object code and generates executables. It takes executable code generated by linker as input. It combines various object code into one single executable. It allocates the address to an executable into the main memory.
  • 22. • Stages of Compilation and Execution  Preprocessor: C programs are passed to preprocessor to resolve preprocessor directives and include files in the program.  Compiler: Compiler converts C program into machine language. In this step, an object file is created.  Linker: Linker combines various object files and libraries to form an executable.  Loader: Loader loads the executable file into the main memory.
  • 23. • Utility Software Utility software provides certain tasks that help to manage, maintain, and control computer resources. The utility software is used to keep the computer system running smoothly. Examples of utility programs are antivirus software, backup software, etc. Antivirus software helps to protect computers from viruses and other harmful programs. Backup software helps in the creation of backup of the files on your computer. Hard-drives are used for storage; they are robust but can fail or crash. So backup software is used to create copies of the most important files in some external drive.
  • 24. Application Software • Application software is used to solve a particular problem or perform some specific task. Few examples of application software: • Microsoft Office • Photoshop • Music Players • Games