INTRODUCTION TO COMPUTER PROGRAMING
LECTURE NOTES
UNIT-TWO
Basic Computer Components
Computers come in many varieties, from the tiny computers built into household appliances,
to the astounding supercomputers that have helped scientists map the human genome. But no
matter how big it is or how it is used, every computer is part of a system. A complete computer
system consists of four parts:
1. Hardware
2. Software
3. Data
4. User
Hardware
The mechanical devices that make up the computer are called hardware. Hardware is any part
of the computer you can touch. A computer’s hardware consists of interconnected electronic
devices that you can use to control the computers’ operation, input, and output.
Essential Computer Hardware.
Computer hardware devices fall into one of four categories
1. Processor
2. Memory
3. Input and output
4. Storage
1
Processor
The procedure that transforms raw data into useful information is called processing. To
perform this transformation, the computer uses two components: the processor and memory.
The processor is like the brain of the computer; it organizes and caries out instructions that
come from cither the user or the software.
In a personal computer, the processor usually consists of one or more specialised chips, called
microprocessors, which are shivers of silicon or other material etched with many tiny
electronic circuits. To process data or complete an instruction from a user or a program, the
computer passes electricity through the circuits.
Memory
In a computer, memory is one or more sets of chips that is responsible for storing data and
instructions needed for processing, either temporarily or permanent and it enables the CPU to
execute programs efficiently and ensures smooth system operation.
Memory is classified into primary and secondary types based on speed, accessibility, and
volatility.
Primary Memory
Directly accessible by the CPU; fast but limited in capacity. This memory type is divided into
two; Random Access Memory (RAM) and Read-Only Memory (ROM). These two types of
memory work in very different ways and perform distinct functions.
Random Access Memory (RAM)
The most common type of memory is called Random Access Memory (RAM). RAM is a
volatile memory that temporarily stores data and/or instructions for faster access to enhance
better CPU performance. In other word, RAM is the computer’s main memory used for
temporary storage of active programs and data.
2
When a program is launched, it is loaded into memory for fast access. As new data is entered
into the computer, it is also stored in memory-but only temporarily. Data is both written to and
read from this memory and because of this operation RAM is also called read/write memory.
RAM is volatile which means it loses its content when the computer is shut off or if there is a
power failure. RAM needs a constant supply of power to hold data. For this reason, you should
save data files to a storage device frequently, to avoid losing them in a power failure.
RAM has a tremendous impact on the speed and power of a computer because the more RAM
a computer has, the more it can do and the faster it can perform tasks.
The most common measurement unit for describing a computers’ memory
Read-Only Memory (ROM)
ROM is non-volatile memory that stores essential instructions permanently. It holds system
firmware and boot instructions. ROM is a permanent form of storage. ROM stays active
regardless of whether the power supply to it is turned on or off. ROM devices do not allow
easy modification of data stored on them. Example, Bios Chip, firmware.
Input and output
A personal computer would be useless if you could not interact with it because the machine
could not receive instructions or deliver the results of its work. Input devices accept data and
instructions from the user or from another computer system. Output devices return processed
data to the user or to another computer system. Examples are, keyboard, touchpad, joystick,
monitor, scanner, microphone, speakers.
Communications devices are the most common types of devices that can perform both input
and output. These devices connect one computer to another through the process known as
networking. The most common kinds of communications devices are modems, which enable
3
computers to communicate through telephone lines or cable television systems, and network
interface cards (NICs), which let users connect a group of computes to share data and devices.
Storage or Secondary Memory
A computer can function with only processing, memory, input, and output devices. To be really
useful, however, a computer also needs place to keep program files and related data when they
are not in use. The purpose of storage is to hold Data permanently, even when the computer is
turned off and is not directly accessed by the CPU and is slower but larger in capacity.
Novice computer users often confuse storage with memory. Although the functions of storage
and memory are similar, they work in different ways. There are three major distinctions
between storage and memory:
▪ There is more room in storage than in memory, just as there is more room in a file
cabinet than there is on a tabletop.
▪ Contents are retained in storage when the computer is tuned off, whereas programs or
the data in memory disappear when you shut down the computer,
▪ Storage devices operate much slower than memory chips, bur storage is much cheaper
than memory.
Examples include, HDD (Hard Disk Drive), SSD (Solid State Drive), optical discs
(CD/DVD/Blu-ray), USB drives, flash cards, magnetic tapes, cloud storage.
Software
Software is a set of instructions that makes the computer perform tasks. A set of instructions
that drive a computer to perform specific tasks is called a program. These instructions tell the
machine's physical components what to do; without these instructions, a computer could not
do anything at all.
When a computer uses a particular program. it is said to be running or executing that program.
4
Some programs exist primarily for the computers’ use to help it perform task and manage its
own resources. Other types of programs exist for the user, enabling him or her to perform tasks
such as creating documents.
Although the array of available programs is vast and varied, most software falls into two major
categories:
▪ system software
▪ application software
System Software
System Software is 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.
Examples of system Software: Operating Systems, Language processors and Device Drivers
Characteristics of System Software
▪ Closer to the computer system.
▪ Written in a low-level language in general.
▪ Difficult to design and understand.
▪ Fast in speed (working speed).
▪ Less interactive for the users in comparison to application software.
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.
Characteristics of System Software
• Perform more specialized tasks like word processing, spreadsheets, email
5
• Mostly, the size of the software is big, so it requires more storage space.
• More interactive for the users, so it is easy to use and design.
• Easy to design and understand.
• Written in a high-level language in general.
Difference Between System Software and Application Software
System Software Application Software
It is designed to manage the resources of the It is designed to fulfill the requirements of the
computer system, like memory and process user for performing specific tasks.
management
Written in a low-level language. Written in a high-level language.
Less interactive for the users. More interactive for the users.
System software plays vital role for the Application software is not so important for
effective functioning of a system. the functioning of the system, as it is task
specific.
It is independent of the application software to It needs system software to run.
run.
Data
Data consist of individual facts or pieces of information that by themselves may not make
much sense to a person. A computers primary job is to process these tiny pieces of data in
various ways, converting them into useful information.
Users
People are the computer operators, also known as users. It can be argued that some computer
systems are complete without a person’s involvement; however, no computer is totally
6
autonomous. Even if a computer can do its job without a person sitting in front of it, people
still design, build, program, and repair computer systems
The Information Processing Cycle
Using all its parts together, a computer converts data into information by performing various
actions on the data. For example, a computer might perform a mathematical operation on two
numbers, then display the result. Or the computer might perform a logical operation such as
comparing two numbers, then display that result. These operations are part of a process called
the information processing cycle.
Therefore, the information processing cycle is defined as a set of steps the computer follows
to receive data, process the data according to instructions from a program, display the resulting
information to the user, and store the results.
The information processing cycle has four parts, and each part involves one or more specific
components of the computer:
▪ Input: During this part of the cycle, the computer accepts data from some source, such
as the user or a program for processing.
▪ Processing: during this part of the cycle, the computers’ processing components
perform actions on the data, based on instructions from the user or a program.
▪ Output: Here, the computer may be required to display the results of its processing.
Output is an optional step in the information processing cycle but may be ordered by
the user or program.
▪ Storage: in this step, the computer permanently stores the results of its processing on
a disk, tape, or some other kind of storage medium. Like output, storage is optional and
may not always be required by the user or program.
7
Software Installation
Software installation is the process of setting up and configuring a software program on a
computer or device.
Software Installation procedure
▪ Software installation involves:
▪ Copying the necessary files and folders from the installation media (such as a CD,
DVD, or downloaded file) to the appropriate location on the computer's hard drive.
▪ Check system requirements to make sure the computer meets hardware and
software requirements.
▪ Run setup file Double-click the setup file or run the installation program
▪ During the installation process, the user may be prompted to make choices or
provide information, such as selecting the installation location, agreeing to terms
and conditions, or entering a license key.
▪ Accept license: Read and accept the terms and conditions.
▪ Install software: The system copies files and configures settings.
▪ Verify installation: Once the installation is complete, Launch the software to ensure
it works properly. Then, the software is ready to be used.
Internet Service
The internet is a worldwide network of computers. The use of the internet has grown
tremendously over the past few years and become an important part of our everyday life. From
being a small network set up by the US department of defense to connect four computers at
different sites, the internet has come a long way.
The reason for the ever-growing use of the internet is the various services that it offers and
One of the most important advantages of the internet is that it allows you to easily access
8
information from anywhere and anytime as there is a huge amount of information available on
the internet on a wide range of topics such as research papers, news, books, products, technical
support, job vacancies and health care.
This information is stored in the form of text, pictures and videos on thousands of web servers.
The search engines on the internet help us to search and find information on any subject that
you need.
Search Engine
A search engine is software that searches webpages for information on a particular topic. The
topic on which information is required is specified in the form of keywords. The search results
are usually displayed as a list of links to the pages on which the keywords were found. Some
of the popular search engines are Google, Yahoo! Search, Bing and many others.
Email
Email (electronic mail), is one of the most widely used methods for exchanging messages on
the internet. To be able to use an email service, you need to have an email account. Every email
account is identified by an email address. An email address consists of a username and a
domain name of the server that provides the email facility. The username and the domain name
are separated by the symbol @.
Email is fast, cheap, convenient, and keeps a record, and reduces waste making it one of the
most efficient ways to communicate today, but it can have high security risk, it is highly
dependent on the internet, too many emails can be overwhelming, attachment and
communication limitations, and spam junk mails can flood inboxes which can be annoying.
Operating System
An operating system (OS) is a program that acts as an interface between the user and the
computer hardware and controls the execution of all kinds of programs. An operating system
9
(OS) can also be defined as a collection of software that manages a computer’s hardware and
applications by allocating resources and provides common services for computer programs.
Difference between 32-Bit vs. 64 Bit Operating System
32-bit Operating System 64-bit Operating System
Support 32-bit Processors (CPUs) Support 64-bit Processors (CPUs)
Support a maximum 4 GB memory (RAM) Can support more than 4 GB memory (RAM)
and up to TB depending on the Operating
System
Runs 32-bit software only Runs both 32-bit and 64-bit software
Slower with heavy applications Faster and better for large applications
32-bit applications require 32-bit OS and 64-bit applications require a 64-bit OS and
CPUs. CPU.
All versions of Windows 8, Windows 7, Windows XP Professional, Vista, 7, Mac OS X
Windows Vista, and Windows XP, Linux, etc. and Linux. Windows 10/11
Functions Performed by an Operating Systems
1. Booting: Booting is a process of starting the computer and loading the operating
system into memory. The OS kernel loads into the RAM and initializes drivers and
system services and makes the computer ready for user interaction.
2. Memory Management: Memory management module performs the task of allocation
and de-allocation of memory space to programs in need of the resource. Instructions
and data must be stored in memory so that a running program can reference it. Memory
cannot be managed without operating system and if there is no operating system, the
computer system will not work properly.
10
3. Loading and Execution: A program is loaded in the memory before it can be executed.
Operating system provides the facility to load programs in memory easily and then
execute it.
4. Data security: Data is an important part of computer system. The operating system
protects the data stored on the computer from illegal use, modification or deletion.
5. Disk Management: Operating system manages the disk space and all the file-related
activities. That means, it manages the stored files and folders in a proper way such as
organization, storage, retrieval, naming, sharing, and protection of files.
6. Process Management: CPU can perform one task at one time. if there are many tasks,
operating system decides which task should get the CPU.
7. Device Controlling: Operating system controls all devices attached to a computer. The
hardware devices are controlled with the help of small software called device drivers.
8. Providing interface: It is used in order that user interface acts with a computer
mutually. User interface controls how you input data and instruction and how
information is displayed on screen. The operating system offers two types of interfaces
to the user:
1. Graphical-line interface: It interacts with of visual environment to
communicate with the computer. It uses windows, icons, menus and other
graphical objects to issues commands.
2. Command-line interface: it provides an interface to communicate with the
computer by typing commands.
Types of Operating Systems
Operating systems can be categorized into several types based on their features, functionality
and compatibility with different hardware and software applications. They include:
11
▪ Embedded operating systems
▪ Distributed operating systems
▪ Real-time operating systems
▪ Network operating systems
▪ Cluster operating systems
Embedded operating systems
An embedded operating system is designed to manage hardware resources in specialized
devices like smartphones, automotive systems and household appliances. Unlike general-
purpose operating systems, embedded OSes are optimized for performance, efficiency and
reliability in resource-constrained environments. They are typically lightweight, with minimal
user interfaces, and they are built to run specific applications continuously or in real-time.
Distributed operating systems
A distributed operating system coordinates multiple independent computers to work together
as a unified system. It allows resources from different machines to be shared, providing a
single, transparent interface to the user and application programs. The OS manages
communication, data sharing and task synchronization across various nodes, ensuring that
users can interact with the system without worrying about the physical distribution of the
resources.
Google File System (GFS), for example, is part of Google’s distributed system architecture,
allowing data to be distributed across many servers and ensuring high availability and fault
tolerance.
Real-time operating systems
12
A real-time operating system (RTOS) is designed to handle time-sensitive tasks with precise
timing constraints. In an RTOS, the system guarantees that critical processes are completed
within a specific time frame, ensuring predictability and stability.
These operating systems are used in applications like industrial automation, robotics and
medical devices, which depend on control systems where delays or failures could have severe
consequences. Real-time operating systems such as VxWorks are commonly used in embedded
systems for aerospace and defence applications, where real-time responses are crucial for
safety and performance.
Network operating systems
A network operating system (NOS) is software that manages and coordinates the hardware and
software resources of multiple computers connected in a network. It enables communication
between devices, file sharing and resource management across the network.
A NOS typically includes features such as network security, user authentication and centralized
administration, allowing system administrators to control access and configure settings across
all connected devices. Examples of network operating systems include Microsoft Windows
Server, Cisco IOS and macOS Server.
Cluster operating systems
A cluster operating system manages a group of interconnected computers (nodes) that work
together to perform tasks like a single system. These systems are typically used in high-
performance computing (HPC) settings (for example, web hosting, scientific research) and
provide load balancing, fault tolerance and resource sharing among the nodes. Cluster
operating systems allow users to scale up computational power by combining multiple
machines, improving overall system reliability and performance.
13
Operating System (OS) Examples
There are plenty of OS available and the listed below are a few examples of them: Windows,
Linux, MacOs, iOS, Android, Solaris, VMS (Virtual Memory System, OS/400, AIX , z/OS,
etc.
14