0% found this document useful (0 votes)
24 views84 pages

Xi Cs 1

The document provides an overview of computer systems, detailing components such as the CPU, memory, and input/output devices, and their functions in processing data. It explains the types of memory, including primary (RAM and ROM) and secondary memory, as well as the role of microprocessors and data management. Additionally, it covers data types, capturing, storage, retrieval, and the importance of hardware and software in computer operations.

Uploaded by

Spoidy Angel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views84 pages

Xi Cs 1

The document provides an overview of computer systems, detailing components such as the CPU, memory, and input/output devices, and their functions in processing data. It explains the types of memory, including primary (RAM and ROM) and secondary memory, as well as the role of microprocessors and data management. Additionally, it covers data types, capturing, storage, retrieval, and the importance of hardware and software in computer operations.

Uploaded by

Spoidy Angel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

CHAPTER 1: Computer System

Introduction to Computer System


A computer is an electronic device
that can be programmed to
accept input, process it and
generate result.

A computer along with hardware


and software together is called a
computer system.
Block diagram of a computer system
Input Unit

The input unit consists of input


devices that are attached to the
computer.

These devices take input and


convert it into binary language
that the computer understands.
E.g : keyboard, mouse, joystick,
scanner etc.
E.g. of Input Devices
• A computer system primarily
comprises a central processing
unit (CPU), memory,
input/output devices and
storage devices.

• All these components function


together as a single unit to
deliver the desired output.
The directed lines shown in diagram shows
the flow of data and signal between the
components.
Central Processing Unit (CPU)

• It carries out the actual processing and


usually referred as the brain of the
computer.
• It is commonly called processor also.
Physically, a CPU can be placed on one or
more microchips called integrated circuits
(IC). The Ics comprise semiconductor
materials.
• The CPU is given instructions and
data through programs. The CPU
then fetches the program and
data from the memory and
performs arithmetic and logic
operations as per the given
instructions and stores the result
back to memory.
• While processing, the CPU stores the
data as well as instructions in its local
memory called registers.

• Registers are part of the CPU chip


and they are limited in size and
number. Different registers are used
for storing data, instructions or
intermediate results.
CPU has two main components —
Arithmetic Logic Unit (ALU) and Control
Unit (CU).

ALU performs all the arithmetic and logic


operations that need to be done as per the
instruction in a program.

CU controls sequential instruction execution,


interprets instructions and guides data flow
through the computer’s memory, ALU and
input or output devices.
CPU is also popularly known as microprocessor
ALU

Arithmetic and Logic Unit (ALU)


• The ALU, as its name suggests
performs mathematical calculations
and takes logical decisions.
• Arithmetic calculations include
addition, subtraction, multiplication
and division.
• Logical decisions involve
comparison of two data items to
see which one is larger or smaller or
equal (Operators used : <,><=,>=,!=)
Control unit

• The Control unit coordinates and controls


the data flow in and out of CPU and also
controls all the operations of ALU,
memory registers and also input/output
units.

• It is also responsible for carrying out all the


instructions stored in the program. It
decodes the fetched instruction,
understands it and sends control signals
to input/output devices until the required
operation is done properly by ALU and
memory.
Memory

• Memory attached to the CPU is used for


storage of data and instructions and is
called internal memory. During processing,
it is the internal memory that holds the
data.

• The internal memory is divided into many


storage locations, each of which can store
data or instructions. The internal memory is
also called the Primary memory or Main
memory.
The time of access of data is independent
of its location in memory, therefore this
memory is also called Random Access
memory (RAM). Primary memory is volatile in
nature. That means when the power is
switched off, the data stored in this memory
is permanently erased.

That is why secondary memory is needed


to store data and information permanently
for later use. Some of the examples of
secondary storage devices are hard disk,
compact disks, pen drives etc.
Units of Memory
• A computer system uses binary
numbers to store and process data.
The binary digits 0 and 1, which are the
basic units of memory, are called bits.
• Further, these bits are grouped
together to form words.
• A 4-bit word is called a Nibble.
• Examples of nibble are 1001, 1010,
0010, etc.
• A two nibble word, i.e., 8-bit word is
called a byte, for example, 01000110,
01111100, 10000001, etc.
Types of Memory
Computers have two types of memory — primary
and secondary.

(A)Primary Memory

Primary memory is an essential component of


a computer system. Program and data are
loaded into the primary memory before
processing. The CPU interacts directly with
the primary memory to perform read or write
operation. It is of two types viz. (i) Random
Access Memory (RAM) and (ii) Read Only
Memory (ROM).
RAM

RAM is volatile, i.e., as long as the


power is supplied to the computer, it
retains the data in it. But as soon
as the power supply is turned off, all
the contents of RAM are wiped out. It
is used to store data temporarily
while the computer is working. RAM is
usually referred to as main memory
and it is faster than the secondary
memory or storage devices.
ROM

ROM is non-volatile, which means its


contents are not lost even when the
power is turned off. It is used as a
small but faster permanent storage
for the contents which are rarely
changed.
For example, the startup program
(boot loader) that loads
the operating system into primary
memory, is stored in ROM
Difference between RAM and ROM
RAM ROM
1) Full form is Random Access 1) Full form is Read only
Memory memory

2) Read as well as write 2) Only read operation can


operations can be performed be performed

3)RAM is volatile i.e. as soon 3) ROM is Non volatile which


as the power supply is turned means its contents are not
off, all the contents of RAM lost even when the power is
are erased. turned off
( B) Cache Memory :
To speed up the operations of the CPU, a
very high speed memory is placed
between the CPU and the primary memory
known as cache. It stores the copies of the
data from frequently accessed primary
memory locations, thus, reducing the
average time required to access data
from primary memory. When the CPU
needs some data, it first examines the
cache. In case the requirement is met, it is
read from the cache, otherwise the
primary memory is accessed.
C) Secondary Memory

Primary memory has limited storage capacity and is


either volatile (RAM) or read-only (ROM). Thus, a
computer system needs secondary memory to
permanently store the data for future use.
The secondary memory is non-volatile and has
larger storage capacity than primary memory.
It is slower and cheaper than the main memory.
But, it cannot be accessed directly by the CPU.
Contents of secondary storage need to be first
brought into the main memory for the CPU to
access.
Examples of secondary memory devices include
Hard Disk Drive (HDD), CD/DVD, Memory Card, etc.
Examples
of
secondary
storage
devices
Output Unit

The output unit consists of output


devices that are attached with
the computer. It converts the
binary data coming from CPU to
human understandable from. The
common output devices are
monitor, printer, plotter etc.
E.g. of Output Devices
COMPUTER EVOLUTION
Data Transfer between Memory and CPU
Data are transferred between different components
of a computer system using physical wires called
bus.
For example, bus is used for data transfer between
a USB port and hard disk or between a hard disk
and main memory. Bus is of three types —
(i) Data bus to transfer data between different
components,
(ii) Address bus to transfer addresses between CPU
and main memory.
The address of the memory location that the CPU
wants to read or write from is specified in the
address bus.
and (iii) Control bus to communicate
control signals between different
components of a computer. All these
three buses collectively make the
system bus, as shown in Figure
As the CPU interacts directly with main
memory, any data entered from input
device or the data to be accessed from
hard disk needs to be placed in the main
memory for further processing.
The data is then transferred between CPU
and main memory using bus.
The CPU places on the address bus, the
address of the main memory location from
which it wants to read data or to write
data. While executing the instructions,
the CPU specifies the read or write control
signal through the control bus.
As the CPU may require to read data from main
memory or write data to main memory, a data
bus is bidirectional. But the control bus and
address bus are unidirectional. To write data into
memory, the CPU places the data on the data
bus, which is then written to the specific address
provided through the address bus. In case of
read operation, the CPU specifies the address,
and the data is placed on the data bus by a
dedicated hardware, called memory controller.
The memory controller manages the flow of
data into and out of the computer's main
memory.
Microprocessors

With advancement in technology, the physical size


of CPU has reduced and it is now possible to place
a CPU on a single microchip only.
A processor (CPU) which is implemented on a single
microchip is called microprocessor. Nowadays,
almost all the CPUs are microprocessors.
Microprocessor is a small-sized electronic
component inside a computer that carries out
various tasks involved in data processing as well as
arithmetic and logical operations. These days, a
microprocessor is built over an integrated circuit
comprising millions of small components like
resistors, transistors and diodes.
Microprocessor Specifications :

Microprocessors are classified on the


basis of different features which
include
1) chip type
2) word size
3) Memory size
4) clock speed,
5) Cores etc.
Data and Information

A computer is primarily for processing


data. A computer system considers
everything as data, be it instructions,
pictures, songs, videos, documents,
etc. Data can also be raw and
unorganised facts that are processed
to get meaningful information.
Data and Its Types :

provide it with raw data in the form of facts,


concepts, instructions, etc., Internally everything is
stored in binary form (0 and 1), but externally,
data can be input to a computer in the text form
consisting of English alphabets A–Z, a–z, numerals 0 – 9
and special symbols like @, #, etc. Data can be input
in other languages too or it can be read from the files.
The input data may be from different sources,
hence it may be in different formats. For example,
an image is a collection of Red, Green, Blue (RGB)
pixels, a video is made up of frames, and a fee
receipt is made of numeric and non-numeric
characters. Primarily, there are three types of data.
A) Structured Data

Data which follows a strict record


structure and is easy to comprehend is
called structured data.
Such data with pre-specified tabular
format may be stored in a data file to
access in the future.

Example: Monthly attendance of


students maintained
by the school.
Structured data is organised in
row/column format and is easily
understandable. Structured data
may be sorted in ascending or
descending order.

Example:
Other examples of structured
data include sales transactions, online
railway ticket bookings, ATM
transactions, etc.
B) Unstructured Data

Data which are not organised in a


pre-defined record format is called
unstructured data. Examples include
audio and video files, graphics, text
documents, social media posts,
satellite images. Such data are
unstructured as they consist
of textual contents as well as graphics,
which do not follow a specific format.
C) Semi-structured Data

Data which have no well-defined


structure but maintains internal tags or
markings to separate data elements
are called semi-structured data.
Examples include email document,
HTML page, comma separated values
(csv file)
Data Capturing, Storage and Retrieval :

(A)Data Capturing

It involves the process of gathering data from


Different sources in the digital form. This
capturing may vary from simple instruments
like keyboard, barcode readers used at
shopping outlets comments or
posts over social media, remote sensors on
an earth orbiting satellite, etc.
(B) Data Storage

It is the process of storing the captured data


for processing later.
In large organisations, computers with larger
and faster storage called data servers are
deployed to store vast amount of data.
Such dedicated computers help in
processing data efficiently. However, the
cost (both hardware and software) of setting
up a data server as well as its maintenance is
high.
(C) Data Retrieval

It involves fetching data from the storage


devices, for its processing as per the user
requirement Minimising data access time is
crucial for faster data processing.
Data Deletion and Recovery

One of the biggest threats associated with


digital data is its deletion. The storage
devices can malfunction or crash
down resulting in the deletion of data stored.
Users can accidentally erase data from
storage devices, or a hacker or malware can
delete the digital data intentionally.
Deleting digitally stored data means
changing the details of data at bit
level, which can be very time
consuming.
Therefore, when any data is simply
deleted, its address entry is marked
as free, and that much space is
shown as empty to the user, without
actually deleting the data.
Data Recovery:

In case data gets deleted accidentally or


corrupted, there arises a need to recover the
data. Recovery of the data is possible only if
the contents or memory space marked as
deleted have not been overwritten by some
other data. Data recovery is a process of
retrieving deleted, corrupted and lost data
from secondary storage devices.
There are usually two security concerns
associated with data. One is its
deletion by some unauthorised person
or software. These concerns can be
avoided by limiting access to the
computer system and using passwords
for user accounts and files, wherever
possible. There is also an option of
encrypting files to protect them from
unwanted modification.
The other concern is related to unwanted
recovery of data by unauthorised user or
software. Many a times, we discard our old,
broken or malfunctioning storage devices
without taking care to delete data. We assume
that the contents of deleted files are
permanently removed. However, if these
storage devices fall into the hands of mischief-
mongers, they can easily recover data from
such devices; this poses a threat to data
confidentiality. This concern can be mitigated
by using proper tools to delete or shred data
before disposing off any old or faulty storage
device.
Hardware and Software

Hardware :

Hardware refers to the physical components


of the computer system which can be seen and
touched. For example, RAM, keyboard, printer,
monitor, CPU,etc.

Software :

Software is a general term used for computer


programs that control the operations of the
computer.
A program is a sequence of instructions that
perform a particular task. A set of programs form
a software.
Some examples of software are:

operating systems like Ubuntu or Windows


7/10, word processing tool like LibreOffice
or Microsoft Word, video player like
VLC Player, photo editors like GIMP and
LibreOffice draw.

A document or image stored on the hard


disk or pen drive is referred to as a soft-
copy.
Once printed, the document or an image is
called a hard-copy.
Need of Software

A software knows how to make different


hardware components of a computer
work and communicate with each other as
well as with the end-user. Software acts as an
interface between human users and the
hardware.
Depending on the mode of interaction with
hardware and functions to be performed, the
software can be broadly classified into three
categories viz.
(i) System software,
(ii) Programming tools and
(iii) Application software.
System Software

System Software is the software that is directly related


to coordinating computer operations and performs
tasks associated with controlling and utilizing
computer hardware.
These programs assist in running application programs
and are designed to control the operation of a
computer system. System software directs the
computer what to do, when to do and how to do.
System software can be further categorized into
• Operating System
• Language Translators
Examples of system software include operating
systems, system utilities, device drivers, etc.
operating system:

operating system is a system software that


operates the computer. An operating
system is the most basic system software,
without which other software cannot work.
The operating system manages other
application programs and provides access
and security to the users of the system.
Some of the popular operating systems are
Windows, Linux, Macintosh, Ubuntu, Fedora,
Android, iOS, etc.
Need for an Operating System:

• Operating system provides a platform, on


top of which, other programs, called
application programs can run.

• It acts as an interface between the


computer and the user. It is designed in
such a manner that it operates, controls
and executes various applications on the
computer. It also allows the computer to
manage its own resources such as
memory, monitor, keyboard, printer etc.
Functions of Operating System:
• It manages all hardware and software,
input, output and processing activities within
the computer system, the flow of information
to and from the processor, sets priorities for
handling different tasks.
• Without operating system a computer cannot
do anything useful. When a computer is
switched on, the operating system is the first
program that is loaded onto its memory. A user
cannot communicate directly with the
computer hardware.
• so the operating system acts as an interface
between the user and the computer
hardware.
Some more Functions of Operating System :
• Operating system is called resource manager as
it manages different resources like main memory,
CPU, I/O devices, so that each resource is used
optimally and system performance does not
deteriorate.
• Process Management
• Memory Management
• File Management
• Device Management
Types of Operating System:

• Single User operating system.


• Multiuser operating system.

A single user operating system allows only one


user to work at any time but a multiuser
operating system allows two or more users to
use a powerful computer at the same
time.
For example Windows 7 is a single user
operating system while Linux is a
multiuser operating system.
Objectives of Operating System:
• The first is to provide services for building and
running application programs. When an application
program needs to be run, it is the operating system
which loads that program into memory and
allocates it to the CPU for execution. When multiple
application programs need to be run, the operating
system decides the order of the execution.

• The second objective of an operating system is to


provide an interface to the user through which the
user can interact with the computer. A user
interface is a software component which is a part of
the operating system and whose job is to take
commands or inputs from a user for the operating
system to process.
OS User Interface

Commonly used interfaces are:


Types of User
Interface of
Operating System

Command
based
Interface

Graphical user
Interface

Touched-
based
Interface

Voice-based
Interface

Gesture-based
Interface
OS User Interface

Commonly used interfaces are:


A) Command-based Interface :
• It requires a user to enter the commands to
perform different tasks like creating, opening,
editing or deleting a file, etc. The user has to
remember the names of all such programs or
specific commands which the operating
system supports. The primary input device
used by the user for command based
interface is the keyboard.
• Command based interface is often less
interactive and usually allows a user to run a
single program at a time.
Examples of operating systems with command-
based interface include => MS-DOS and Unix.
(B) Graphical User Interface :

Graphical User Interface (GUI) lets users run


programs or give instructions to the computer in
the form of icons, menus and other visual options.
Icons usually represent files and programs stored on
the computer and windows represent running
programs that the user has launched through the
operating system.
The input devices used to interact with the GUI
commonly include the mouse and the keyboard.

Examples of operating systems with GUI interfaces


include Microsoft Windows, Ubuntu, Fedora and
Macintosh, among others.
(C) Touch-based Interface :
Smartphones, tablets and PCs allow users to
interact with the system simply using the touch input.
Using the touchscreen, a user provides inputs to the
operating system, which are interpreted by the OS
as commands like opening an app, closing an app,
dialing a number, scrolling across apps, etc.

Examples of popular operating systems with touch


based interfaces are Android and iOS. Windows 8.1
and 10 also support touch-based interfaces on
touchscreen devices.
(D) Voice-based Interface :
For users who cannot use the input devices like the
mouse, keyboard, and touchscreens, modern
operating systems provide other means of human-
computer interaction.

Users today can use voice-based commands to


make a computer work in the desired way.

Some operating systems which provide voice-


based control to users include iOS (Siri), Android
(Google Now or ―OK Google‖), Microsoft Windows
10 (Cortana) etc.
(E) Gesture-based Interface :

smartphones based on Android and iOS as


well as laptops let users interact with the
devices using gestures like waving, tilting,
eye motion and shaking.

This technology is evolving faster and it has


promising potential for application in
gaming, medicine and other areas.
(B) System Utilities

Software used for maintenance and configuration


of the computer system is called system utility.

Some system utilities are shipped with the operating


system for example disk defragmentation tool,
formatting utility, system restore utility, etc.

Another set of utilities are those which are not


shipped with the operating system but are required
to improve the performance of the system, for
example, anti-virus software, disk cleaner tool, disk
compression software, etc.
(C) Device Drivers

The purpose of a device driver is to ensure proper


functioning of a particular device.

The responsibility for overall control, operation and


management of a particular device at the hardware level
is delegated to
its device driver.

The device driver acts as an interface between the device


and the operating system.

It provides required services by hiding the details of


operations performed at the hardware level of the device.

Just like a language translator, a device driver acts as a


mediator between the operating system and the attached
device.
Programming Tools:

In order to get some work done by the


computer, we need to give instructions which
are applied on the input data to get the
desired outcome.
Computer languages are developed
for writing these instructions.
Humans are able to write programs in
high-level language, computers
understand machine language.

There is a continuous need for conversion


from high level to machine level
language, for which translators are
needed. Also, to write the instruction,
code editors (e.g., IDLE in Python) are
needed.
(A)Classification of Programming
Languages :
It is very difficult for a human being to
write instructions in the form of 1s and 0s.
So different types of computer
programming languages are developed
to simplify the coding. Two major
categories of computer programming
languages are low-level languages and
high-level languages.
Low-level language:
Low-level languages are machine dependent
languages and include machine language and
assembly language.
Machine language uses 1s and 0s to write instructions
which are directly understood and executed by the
computer.
But writing a code in machine language is difficult as
one has to remember all operation codes and machine
addresses. Also finding errors in the code written in
machine language is difficult.
To simplify the writing of code, assembly language
was developed that allowed usage of English-like words
and symbols instead of 1s and 0s. But one major
drawback of writing a code in this language is that the
code is computer specific,
High level languages:

High level languages are machine independent


and are simpler to write code into. Instructions are
using English like sentences and each high level
language follows a set of rules, similar to natural
languages.
However, these languages are not directly
understood by the computer. Hence, translators
are needed to translate high-level language codes
into machine language.
Examples of high level language include C++,
Java, Python, etc.
(B) Language Translators

As the computer can understand only machine


language, a translator is needed to convert
program written in assembly or high level language
to machine language. The program code written in
assembly or high-level language is called source
code.
The source code is converted by a translator into
the machine understandable form called object
(machine) code.

The three types of translators used in computing


systems are assembler, compiler and interpreter.
Assembler:

The translator used to convert the code


written in assembly language to machine
language is called assembler.

Each assembler can understand a specific


microprocessor instruction set only and
hence, the machine code is not portable.
Translator:

We also need translators to convert codes


written in high level language (source code) to
machine understandable form (machine code)
for execution by the computer.

Compiler converts the source code into


machine code. If the code follows all syntactic
rules of the language, then it is executed by the
computer.

Once translated, the compiler is not needed.


Interpreter:

An interpreter translates one line at a time


instead of the whole program at one go.

Interpreter takes one line, converts it into


executable code if the line is syntactically
correct, and then it repeats these steps for all
lines in the source code.

Hence, interpreter is always needed


whenever a source code is to be executed.
E.g. Python
(C) Program Development Tools

Whenever we decide to write a program, we need a


text editor. An editor is a software that allows us to
create a text file where we type instructions and store
the file as the source code.
Then an appropriate translator is used to get the object
code for execution. In order to simplify the program
development, there are software called Integrated
Development Environment (IDE) consisting of text editor,
building tools and debugger.
A program can be typed, compiled and debugged
from the IDE directly. Besides Python IDLE, Netbeans,
Eclipse, Atom, Lazarus are few other examples of IDEs.
Debugger, as the name implies, is the software to
detect and correct errors in the source code.
Application Software

This specific software that works on top of the


system software is termed as application
software.
There are again two broad categories of
application software —
general purpose and customized application
software.

Different users need the computer system for


different purposes depending upon their
requirements, application software fulfills
different requirements of the end user.
A computer system can work without
application software, but it cannot work
without system software.

For example,
we can use a computer even if no word
processing software is installed, but if no
operating system is installed, we cannot
work on the computer. In other words, the
use of computer is possible in the absence of
application software.
(A) General Purpose Software

The application software developed for


generic applications, to cater to a bigger
audience in general are called general
purpose software. Such ready-made
application software can be used by end
users as per their requirements.

For example, spreadsheet tool Calc of


LibreOffice can be used by any computer
user to do calculation or to create account
sheet. Adobe Photoshop, GIMP, Mozilla web
browser, iTunes, etc., fall in the category of
general purpose software.
(B) Customised Software

These are custom made application software, that


are developed to meet the requirements of a
specific organisation or an individual. They are
better suited to the needs of an individual or an
organisation, considering that they are designed as
per special requirements.

Some examples of user-defined software include :

websites, school management software,


accounting software, etc. It is similar to buying a
piece of cloth and getting a tailor-made garment
with the fitting, colour, and fabric of our choice.
Proprietary or Free and Open Source Software :

The developers of some application software


provide their source code as well as the software
freely to the public, with an aim to develop and
improve further with each other’s help. Such
software is known as Free and Open Source Software
(FOSS).
For example, the source code of operating system
Ubuntu is freely accessible for anyone with the
required knowledge to improve or add new
functionality.
More examples of FOSS include Python, Libreoffice,
Openoffice, Mozilla Firefox, etc.
Sometimes, software are freely available for use but
source code may not be available. Such software
are called freeware.

Examples of freeware are Skype, Adobe


Reader, etc. When the software to be used has to
be purchased from the vendor who has the
copyright of the software, then it is a proprietary
software.

Examples of proprietary software include Microsoft


Windows, Tally, Quickheal, etc.

You might also like