Slide 1
Problem Solving
Through
Programming Using C
Slide 2
Computer
A computer is an electronic device
That accepts data as input
Performs operations
Displays results as output and
Stores the data or results as needed
Slide 3
Computer
A computer is
A combination of hardware and software resources
That integrate and provide various functionalities to the user
Hardware is
The physical components of a computer, such as
Processor, memory devices, monitor, keyboard, etc.
While software is
A set of programs or instructions that are
Required by the hardware resources to function properly
Slide 4
Components of a computer (Hardware)
Various components of a computer are
Input Unit
Central Processing Unit
Memory Unit
Control Unit
Arithmetic and Logic Unit
Output Unit
Slide 5
Input Unit
Captures data and instructions from users or external sources
Converts user input into binary signals that the computer can process
Common Devices
Keyboard, Mouse, Touchscreens
Scanners, Sensors, Stylus pens
Voice Assistants (e.g., Siri, Alexa)
Biometric devices (face/fingerprint recognition)
Iot-based inputs from smart devices
Slide 6
Central Processing Unit (CPU)
Also known as the Brain of the Computer
Executes instructions and controls all internal operations.
Components of CPU
Arithmetic Logic Unit (ALU)
Performs arithmetic operations (add, subtract, multiply, divide).
Handles logical operations (comparison, decision-making).
Control Unit (CU)
Directs the operations of all computer parts.
Decodes instructions and coordinates data flow.
Sends control signals to memory and I/O devices.
Registers
High-speed memory locations within the CPU
Temporarily store instructions, addresses, and intermediate data.
Slide 7
Memory / Storage Unit
Holds data and instructions before, during, and after processing.
Primary Memory (Main Memory)
RAM (Random Access Memory)
Temporarily stores data during execution.
ROM (Read-Only Memory)
Stores boot-up instructions and firmware.
Cache Memory
Ultra-fast memory between CPU and RAM
Secondary Storage:
Used for long-term data storage.
Examples: SSDs, HDDs, flash drives, and cloud storage.
Slide 8
Output Unit
Converts processed data (binary) into a form users can understand.
Examples
Monitors
Printers (Inkjet, Laser, 3D Printers)
Speakers, Headphones
Etc.
Slide 9
Components of a computer (Software)
A software is basically
A set of instructions or commands that tell a computer to do a specific task that serves its users
Not a physical thing like hardware, it rather makes the hardware work as per user requirements by
giving instructions
Examples of software
MS-Word, MS-Excel, PowerPoint and Web Browser
Slide 10
Components of a computer (Software)
Types of Software
Slide 11
System Software
System software is the software that
Directly operates the computer hardware and provides the basic functionality to the users as well as
to the other software to operate smoothly
Basically controls a computer’s internal functioning and also controls hardware devices such as
monitors, printers, and storage devices, etc.
Like an interface between hardware and user applications, it helps them to communicate with each
other because hardware understands machine language(i.e. 1 or 0)
Slide 12
Types of System Software
Various types of system software are
Operating System
When a computer system is switched ON, it is the first software that loads into the computer's
memory.
Basically, it manages all the resources such as computer memory, CPU, printer, hard disk, etc.,
and provides an interface to the user, which helps the user to interact with the computer system.
Examples: Windows, Linux
Language Processor
It converts the human-readable language into a machine language and vice versa. Examples:
Interpreter, Compiler
Device Driver
A program or software that controls a device and helps that device to perform its functions.
Slide 13
Difference between Compiler and Interpreter
Slide 14
Difference between Compiler and Interpreter
Slide 15
Application Software
Software that performs special functions or provides functions that are much more than the basic
operation of the computer is known as application software.
Application software is designed to perform a specific task for end-users. It is a product or a
program that is designed only to fulfill end-users' requirements.
Examples include word processors, spreadsheets, database management, inventory, payroll
programs, etc.
Slide 16
Types of Application Software
Different types of application software and those are
General Purpose Software
Not limited to perform a specific task but is used for a variety of tasks.
For example, MS-Word, MS-Excel, PowerPoint, etc.
Customized Software
Used or designed to perform specific tasks or functions or designed for specific organizations.
For example, railway reservation system, airline reservation system, invoice management system,
etc.
Utility Software
Used to support the computer infrastructure.
Designed to analyze, configure, optimize and maintains the system, and take care of its
requirements as well.
For example, antivirus, disk fragmenter, memory tester, disk repair, disk cleaners, registry cleaners,
disk space analyzer, etc.
Slide 17
Storage and Execution of a Program
Storage (Before Execution)
Programs are initially stored on non-volatile storage devices like HDDs, SSDs or flash drives
Loading into Memory for Execution
When a program is launched, it's loaded from the storage device into the computer's main memory
(RAM )
RAM is much faster than secondary storage, allowing for quicker access to program instructions
and data during execution
Slide 18
Storage and Execution of a Program
Execution by the CPU
The CPU fetches, decodes and executes the instructions
The CPU uses registers to temporarily hold data and instructions during processing
The CPU fetches instructions from RAM, one at a time, according to the program's logic
The fetched instructions are decoded by the CPU's control unit, which then directs the other
components of the CPU to perform the necessary actions
This process of fetching, decoding, and executing instructions continues until the program finishes
or encounters an error