introduction to computer science chapter 2
introduction to computer science chapter 2
Objectives:
2.1.1. Hardware
Computer hardware is the physical part of the computer that you see, you use to and the parts
you can touch.
Input is the process of giving or inserting data and instructions to the computer system.
An input device is any machine, which helps to input/feed data and instructions into a
computer.
Functions of input devices are:
- It accepts (read) instructions and data from the outside world
- It converts these instructions and data into computer acceptable form.
- It supplies the converted instructions and data to the computer system for further
processing.
Examples of input devices:-
• Keyboard (which is the most widely used input devices)
• Disk derives (floppy and hard-disk derives)
• Mouse
• Scanner
• Light pen
• Microphone
• Bar code reader
1
• Interpret instruction: the instruction must be decoded to determine what action is required
• Fetch data: the execution of an instruction may require reading of data from memory or an
I/O module.
• Process data: the execution of an instruction may require performing some arithmetic or
logical operation on data.
• Write data: The result of an execution may require writing data to memory or an I/O
module.
Two main parts of CPU are: the control unit and the arithmetic logic unit.
A. Control Unit
• As the name implies, it performs all the control functions of the computer.
• Translates those instructions into computer functions and sends signals to other
computer hardware units to carry out those functions.
• Registers are paths or conduits that connect the Arithmetic Logical Unit to the main
memory.
• When an instruction loaded from main memory, it is placed first in the register to wait
instructions from the control unit.
Registers- are temporary storage locations for managing instructions and data as they
are being processed in control & ALU.
3. Storage device
Every computer has a temporary storage area that is built into the computer hardware and
in which instructions and data of a program reside mainly when the program is being
executed by the CPU. This storage space is known as primary storage, or main memory,
or simply memory.
When we put in data into a computer, it is sent directly to the memory. Physically, this
memory consists of some chips either on the motherboard or on a small circuit board
attached to the motherboard of a computer system. This built-in memory allows the CPU
to store and retrieve data very quickly. The rate of data fetching from the main memory is
about 100 times faster than that from a high-speed secondary storage like disk.
The main memory has two parts.
- RAM
- ROM
RAM is the name for the chips that are used in primary storage. RAM is called by that
name because any location on the chip can be randomly selected to store data and
instructions, which can then be directly accessed and retrieved.
The representation of data and instructions within a RAM chip depends on the flow of
electric current. If the current is turned off or disrupted, the contents of the chip will be
lost. For this reason, RAM memory is said to be volatile.
In other words, when power or light is off, the RAM is empty. When it is on, RAM is
capable of receiving and holding data and instructions for processing. Therefore, RAM is
volatile.
It is possible both to read data from RAM and to write data on RAM. Also we can access
data randomly from RAM.
RAM is:
- Small in storage capacity
- Fast in processing speed
- Volatile
- Expensive price wise.
RAM chips are of two types- dynamic and static. A dynamic RAM (DRAM), uses an
external circuitry to periodically regenerate or refresh the storage charge to retain the
stored data. On the other hand, a static RAM (SRAM), does not need any special
regenerator circuits to retain the stored data. Since it takes more transistors and other
devices to store a bit in a static RAM, these chips are more complicated and take up more
space for a given storage capacity than do dynamic RAM. Moreover, a static RAM is
faster, costlier, and consumes more power than dynamic RAM. Due to these reasons,
large memories use dynamic RAM, and static RAM is used mainly onspecialized
applications. The main memory of most computers uses dynamic RAM.
ROM is a non-volatile memory chip in which data is stored permanently and can not be
altered by the programmer. The data stored in ROM chip can only be read and used- they
can not be changed. Since ROM chips are non-volatile, the data stored inside a ROM are
not lost when the power supply is switched off, unlike the case of the volatile RAM chip.
ROMs are mainly used to store programs and data which do not change and are
frequently used known as micro programs. A good example of micro program stored in a
ROM chip is the set of instructions that is needed to make the computer system ready for
use when its power is switched on. This micro program called ‘system boot program’,
contains a set of start-up instructions to check if the system hardware like memory, I/O
devices, etc. are functioning properly, and looks for an operating system and loads its
core part in the volatile RAM of the system to produce the initial display-screen prompt.
On the other hand, a user-programmed ROM is one in which the user can load and store
‘read only’ programs and data. It is possible for the user to customize a system by
converting his/her own programs to micro programs and storing them in a user-
programmed ROM chip. Such a ROM is commonly known as Programmable Read Only
Memory (PROM) because a user can program it.
Once information is stored in a ROM chip or a PROM chip, it can not be altered.
However, there is another type of memory chip called Erasable Programmable Read Only
Memory (EPROM) that overcomes this problem. As the name implies, it is possible to
erase information stored in an EPROM chip and the chip can be reprogrammed to store
new information. When an EPROM is in use, information stored in it can only be ‘read’
and the information remains in the chip until it is erased.
The primary storage (RAM) of the computer system has some limitations even though
they are fast for data access.
- They have limited storage capacity,
- They are expensive and
- They are volatile.
As a result, additional memory (Secondary memory) is used with most computer system.
Secondary storages:
Output device- is an electromechanical device that accepts data from a computer and
translates them into a form suitable for use by the user.
➢ Soft copy outputs are temporary in nature and vanish after use. E.g. outputs
displayed on a screen or spoken out by a voice response system.
➢ Hard copy outputs are permanent in nature and can be kept in paper files or
looked at a latter time. e.g. – outputs produced by printers or plotters on paper.
- Printers
- Monitors (screens)
- Plotters
- Speakers.
Bus
Bus is an electrical pathway through which bits are transmitted between the
Various computer components.
1. System software
❖ The I/O manager coordinates the computers communication with outside world, flow
of data to the display screen and other output devices (printers/ plotters) and from the
key board or other input devices.
❖ Handles the flow of data to and from the disk drives (file management).
❖ Handles the process of preparing a disk for use, the copying, renaming, erasing task
of a file.
8
❖ It interprets the commands or what you enter using the keyboard or other input
devices.
❖ If you write an internal command it carries out the function of that command if it is
external command or other executable file it searches for the corresponding file in the
default (current disk) or the user specified disk, loads the file into memory and
transfers control to that program. Once this program is terminated, control returns to
command.com and the program for that command or file is discarded from memory.
Types of Operating Systems
Operating systems can be classified by:
➢ The number of programs they can handle at a time and
➢ The number of users they serve at once at one or different stations (i.e. terminals
or micro-computers connected to a central computer).
With single tasking operating systems only one program can be run on a computer
at a time.
.In order to run another program, one must remove the first program loaded in the
computers main memory and load the other one(i.e. it can’t handle two or more programs
at a time)
➢ These types of operating systems are single user or can serve only one user at a time.
➢ .A real time is a system that is capable of processing data so quickly that the results
are available to influence the activity currently taking place.
Application Software
➢ Is software that is designed to perform tasks for the specific area or areas. But for use
in more than one installation.
➢ Are usually called application packages as they may include a number of programs
along with operating instruction, documentation and so forth.
➢ Depending on their function or task they are categorized in to the following.
10
- Allow you to store information on a computer, retrieve it when you need it and update it
when necessary.
- You can do this with index cards, but database management programs do them more
quickly and easily.
- Example: You can store large mailing list, inventory record or billing and collect
information in lists stored in files and manipulate this information, one file at a time with
database management program.
- You can record or create a database about employee information as
11