Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

1

Computer Hardware
Computer: Computer is a programmable m/c that receives input, manipulates
data or information, provides and stores output in a useful format. It is
programmed device with a set of instructions to perform specific tasks and
generate results at a very high speed.

Components of a Computer System: Internal computer components are


designed to fit inside the computer system and they all carry out important roles.
The main components are the following:
 Input Unit
 Output Unit
 Storage Unit
 Central Processing Unit (CPU)
 Arithmetic and Logic Unit (ALU)
 Control Unit

Computer Fundamentals Module 01


2

The internal architectural design of computers differs from one system model to
another. However, the basic organization remains the same for all computer
systems. The following five units correspond to the five basic operations
performed by all computer systems.
1. Input Unit:
Data and instructions must enter the computer system before any computation
can be performed on the supplied data. The input unit that links the external
environment with the computer system performs this task. Data and instructions
enter input units in forms that depend upon the particular device used. For
example, data is entered from a keyboard in a manner similar to typing, and this
differs from the way in which data is entered through a mouse, which is another
type of input device. However, regardless of the form in which they receive their
inputs, all input devices must provide a computer with data that are transformed
into the binary codes that the primary memory of the computer is designed to
accept.
An input unit performs the following functions:
1. It accepts (or reads) the list of instructions and data from the outside world.
2. It converts these instructions and data in computer acceptable format.
3. It supplies the converted instructions and data to the computer system for
further processing.
2. Output Unit:
The job of an output unit is just the reverse of that of an input unit. It supplied
information and results of computation to the outside world. Thus it links the
computer with the external environment. As computers work with binary code,
the results produced are also in the binary form. Hence, before supplying the
results to the outside world, it must be converted to human acceptable (readable)
form. This task is accomplished by units called output interfaces.
In short, the following functions are performed by an output unit.
1. It accepts the results produced by the computer which are in coded
form and hence cannot be easily understood by us.
2. It converts these coded results to human acceptable (readable)
form.

Computer Fundamentals Module 01


3

3. It supplied the converted results to the outside world.


3. Storage Unit:
The data and instructions that are entered into the computer system through input
units have to be stored inside the computer before the actual processing starts.
Similarly, the results produced by the computer after processing must also be kept
somewhere inside the computer system before being passed on to the output units.
Moreover, the intermediate results produced by the computer must also be
preserved for ongoing processing. The Storage Unit or the primary / main
storage of a computer system is designed to do all these things. It provides space
for storing data and instructions, space for intermediate results and also space for
the final results.
In short, the specific functions of the storage unit are to store:
a. All the data to be processed and the instruction required for
processing (received from input devices).
b. Intermediate results of processing.
c. Final results of processing before these results are released to
an output device.

Computer Fundamentals Module 01


4

4. Central Processing Unit (CPU):


The main unit inside the computer is the CPU. This unit is responsible for all
events inside the computer. It controls all internal and external devices,
performs arithmetic and logical operations. The operations a Microprocessor
performs are called instruction set of this processor. The instruction set is hard
wired in the CPU and determines the machine language for the CPU. The more
complicated the instruction set is, the slower the CPU works. Processors differed
from one another by the instruction set. If the same program can run on two
different computer brands they are said to be compatible. Programs written for
IBM compatible computers will not run on Apple computers because these two
architectures are not compatible.
The control Unit and the Arithmetic and Logic unit of a computer system are
jointly known as the Central Processing Unit (CPU). The CPU is the brain of any
computer system. In a human body, all major decisions are taken by the brain and
the other parts of the body function as directed by the brain. Similarly, in a
computer system, all major calculations and comparisons are made inside the
CPU and the CPU is also responsible for activating and controlling the operations
of other units of a computer system.
5. Arithmetic And Logic Unit (ALU):
The arithmetic and logic unit (ALU) of a computer system is the place where the
actual execution of the instructions take place during the processing operations.
The data and instructions, stored in the primary storage prior to processing are
transferred as and when needed to the ALU where processing takes place. No
processing is done in the primary storage unit. Intermediate results generated in
the ALU are temporarily transferred back to the primary storage until needed at
a later time. Data may thus move from primary storage to ALU and back again
as storage many times before the processing is over. After the completion of
processing, the final results which are stored in the storage unit are released to an
output device.
The arithmetic and logic unit (ALU) is the part where actual computations take
place. It consists of circuits that perform arithmetic operations (e.g. addition,
subtraction, multiplication, division over data received from memory and capable
to compare numbers (less than, equal to, or greater than).
While performing these operations the ALU takes data from the temporary
storage are inside the CPU named registers. Registers are a group of cells used

Computer Fundamentals Module 01


5

for memory addressing, data manipulation and processing. Some of the registers
are general purpose and some are reserved for certain functions. It is a high-speed
memory which holds only data from immediate processing and results of this
processing. If these results are not needed for the next instruction, they are sent
back to the main memory and registers are occupied by the new data used in the
next instruction.
6. Control Unit:
The control unit directs and controls the activities of the internal and external
devices. It interprets the instructions fetched into the computer, determines what
data are needed, where it is stored, where to store the results of the operation, and
sends the control signals to the devices involved in the execution of the
instructions. By selecting, interpreting, and seeing to the execution of the program
instructions, the control unit is able to maintain order and directs the operation of
the entire system. It manages and coordinates the entire computer system. It
obtains instructions from the program stored in main memory, interprets the
instructions, and issues signals that cause other units of the system to execute
them.
Memory Organization: A memory unit is the collection of storage units or
devices together. The memory unit stores the binary information in the form of
bits. Generally, memory/storage is classified into 2 categories:
 Volatile Memory: This loses its data, when power is switched off.
 Non-Volatile Memory: This is a permanent storage and does not
lose any data when power is switched off.

Computer Fundamentals Module 01


6

The total memory capacity of a computer can be visualized by hierarchy of


components. The memory hierarchy system consists of all storage devices
contained in a computer system from the slow Auxiliary Memory to fast Main
Memory and to smaller Cache memory.
 Auxiliary memory access time is generally 1000 times that of the main
memory, hence it is at the bottom of the hierarchy.
 The main memory occupies the central position because it is equipped to
communicate directly with the CPU and with auxiliary memory devices
through Input/output processor (I/O).
 When the program not residing in main memory is needed by the CPU, they
are brought in from auxiliary memory. Programs not currently needed in main
memory are transferred into auxiliary memory to provide space in main
memory for other programs that are currently in use.
 The cache memory is used to store program data which is currently being
executed in the CPU. Approximate access time ratio between cache memory
and main memory is about 1 to 7~10.
Memory Capacity:
Memory capacity is the amount of memory that can be used for an electronic
device such as a computer, laptop, smartphone or other smart device. Every
hardware device or computer has a minimum and maximum amount of memory.
The performance of a device and the efficiency of its input/output operations is
dependent on memory capacity.
a) Binary: the digital language of computers. This language is composed of
an alphabet containing only 2 “letters” known as bits. Any work done on a
modern computer from word processing to digital audio is translated to this
language.

b) Bit: the smallest form of information in the language of computers. It is


represented as a zero or a one. A bit can be considered a letter in the digital
language of binary.

c) Byte: a “word” of information in binary. 8 bits is usually = 1 byte on


modern computers.

Computer Fundamentals Module 01


7

Types of primary storage:


There are two types of primary storage-
a. Random Access Memory (RAM)
b. Read-only memory (ROM)
Random Access Memory: Random access memory (RAM) is the best known
form of computer memory. RAM is considered "random access" because it can
be accessed any memory cell directly by knowing the row and column that
intersect at that cell. The content of RAM is generally volatile and is lost when
power is removed.

Read-only memory: ROM is used for storing programs that are permanently
resident in the computer and for tables of constants that do not change in value
once the production of the computer is completed.

Computer Fundamentals Module 01


8

There are five basic ROM types:


 ROM - Read Only Memory
 PROM - Programmable Read Only Memory
 EPROM - Erasable Programmable Read Only Memory
 EEPROM - Electrically Erasable Programmable Read Only Memory
 Flash EEPROM memory
PROM-programmable read-only memory (PROM): PROMs are inexpensive and
are great for prototyping the data for a ROM. Blank PROM chips can coded by
anyone with a special tool called a programmer. PROMs can only be programmed
once.
EPROM- Erasable programmable read-only memory (EPROM:. Working with
ROMs and PROMs can be a wasteful business because they can be programmed
only once. EPROM chips can be rewritten many times. Erasing an EPROM
requires a special tool that emits a certain frequency of ultraviolet (UV) light.
EEPROM- Electrically erasable programmable read-only memory:
EEPROM chips remove the biggest drawbacks of EPROMs.
 The chip does not have to remove to be rewritten.
 The entire chip does not have to be completely erased to change a specific
portion of it.
 Changing the contents does not require additional dedicated equipment.
Types of Secondary memory:
Secondary storage is nonvolatile that is information stored in it is not lost when
power is turned off. It is slow, less costly and possesses high capacity.
 Magnetic storage device: Magnetic Tape, Cassette and cartridge are one of
the popular secondary storages. It is simple and cheap. But speed is low
and read and write sequentially.

Computer Fundamentals Module 01


9

 Floppy Disk Drives: Capacity is 1.44 to 2.0 megabytes (MB or millions of


bytes). These are storage device with the smallest capacity and most
portable storage media where data can be accessed directly.
 Hard Disk: Its capacity is measured in gigabytes (GB or billions of bytes)
and typically permanently installed. It is used to store operating system,
application software, utilities and data.

 Optical storage: Optical Disks- CD-ROM and DVD


CD-ROM (Compact Disk - Read Only Memory)
By its definition, CD-ROM is Read Only.

Cache Memory: The data or contents of the main memory that are used again and
again by CPU, are stored in the cache memory so that we can easily access that
data in shorter time.
Whenever the CPU needs to access memory, it first checks the cache memory. If
the data is not found in cache memory then the CPU moves onto the main
memory. It also transfers block of recent data into the cache and keeps on deleting
the old data in cache to accommodate the new one.

Computer Fundamentals Module 01


10

Memory Access Methods:


Each memory type, is a collection of numerous memory locations. To access data
from any memory, first it must be located and then the data is read from the
memory location. Following are the methods to access information from memory
locations:
1. Random Access: Main memories are random access memories, in which
each memory location has a unique address. Using this unique address any
memory location can be reached in the same amount of time in any order.
2. Sequential Access: This methods allows memory access in a sequence or
in order.

Computer Fundamentals Module 01


11

Computer Software
Software: Computer software is a collection of computer programs and related
data that provide the instructions for telling a computer what to do and how to do
it. In other words, software is a conceptual entity which is a set of computer
programs, procedures, and associated documentation concerned with the
operation of a data processing system. Software is a set of programs, procedures,
algorithms and its documentation.
Examples of software programs or applications would be the:
 Operating System (DOS, Windows, UNIX, MacOS and various others),
 Word processor (typing letters),
 Spreadsheet (financial info),
 Database (inventory control and address book),
 Graphics program, Internet Browser,
 Email and many others.
Types of Software: Basically there are two types of software.
 System software
 Application software
System Software: System software is a set of one or more programs, designed
to control the operation and extend the processing capability of a computer
system.
It includes a combination of the following:
a. Device drivers
b. Operating systems
c. Servers
d. Utilities
e. Window systems
Function of system software:
1. Supports the development of other application software.
2. Supports the execution of application software.
3. Communicates with and controls the operation of peripheral devices such
as printer, disk, tape etc.

Computer Fundamentals Module 01


12

Types of System software:


1. Operating System: When a program wants the hardware to do something, it
communicates through the operating system. An operating system is software,
consisting of programs and data that runs on computers and manages the
computer hardware and provides common services for efficient execution of
various application software.

2. Programming language translator: It transform the instructions prepared by


programmers in a programming language, into a form, which can be
interpreted and executed by a computer system. Programming software
usually provides tools to assist a programmer in writing computer programs,
and software using different programming languages in a more convenient
way.

Computer Fundamentals Module 01


13

3. Communication software: In a network environment, communications


software enables transfer data and programs from one computer system to
other.

4. Utility programs: It help users in system maintenance tasks, and in performing


tasks of routine nature.
 Disk defragmenters
 Disk space analyzers
 Disk partitions
 Formatting of hard disk or floppy disk etc.

Computer Fundamentals Module 01


14

Application software: Application software is a set of one or more programs,


designed to solve a specific problem or do a specific task.
It includes a combination of the following:
1. Word processing software
2. Graphics software
3. Education software
4. Entertainment software
5. Database software

Concept of Machine Language


Machine language: Machine language is a collection of binary digits or bits that
the computer reads and interprets. Machine language is the only language a
computer is capable of understanding.

Example of machine
language (binary) for the
Text "Hello World".
01001000 01100101
01101100 01101100
01101111 00100000
01010111 01101111
01110010 01101100
01100100

A computer cannot directly understand the programming languages used to create


computer programs, so the program code must be compiled. Once a program's
code is compiled, the computer can understand it because the program's code has
been turned into machine language.

Computer Fundamentals Module 01


15

High level language: High level programming language is a language that allows
you to tell a computer to do something, but in a syntax that is easy and intuitive
for you to understand. It is a totally different language from what a computer
understands.
Advantages of High level language:
1. High level languages are programmer friendly. They are easy to write,
debug and maintain.
2. It provides higher level of abstraction from machine languages.
3. It is machine independent language.
4. Easy to learn.
5. Less error prone, easy to find and debug errors.
6. High level programming results in better programming productivity.
Disadvantages of High level language:
1. It takes additional translation times to translate the source to machine
code.
2. High level programs are comparatively slower than low level programs.
3. Compared to low level programs, they are generally less memory
efficient.
4. Cannot communicate directly with the hardware.
Low level language: Low level programming language is only a slight
abstraction from machine code (if any abstraction at all). It’s much less human
readable, yet easier and faster for the computer to understand.
Advantages of low level languages:
1. Programs developed using low level languages are fast and memory
efficient.
2. Programmers can utilize processor and memory in better way using a low
level language.
3. There is no need of any compiler or interpreters to translate the source to
machine code. Thus, cuts the compilation and interpretation time.
4. Low level languages provide direct manipulation of computer registers
and storage.
5. It can directly communicate with hardware devices.

Computer Fundamentals Module 01


16

Disadvantages of low level languages:


1. Programs developed using low level languages are machine dependent
and are not portable.
2. It is difficult to develop, debug and maintain.
3. Low level programs are more error prone.
4. Low level programming usually results in poor programming
productivity.
5. Programmer must have additional knowledge of the computer
architecture of particular machine, for programming in low level
language.

 Differences between low level and high level programming language:


Low level language High level language

They are faster than high level They are comparatively slower.
language.

Low level languages are memory High level languages are not memory
efficient. efficient.

Low level languages are difficult to High level languages are easy to learn.
learn.

Programming in low level requires Programming in high level does not


additional knowledge of the require any additional knowledge of the
computer architecture. computer architecture.

They are machine dependent and are They are machine independent and
not portable. portable.

They are more error prone. They are less error prone.

Debugging and maintenance is Debugging and maintenance is


difficult. comparatively easier.

Computer Fundamentals Module 01


17

Comparison Chart of Compiler and Interpreter:


BASIS FOR COMPILER INTERPRETER
COMPARISON

Input It takes an entire It takes a single line of code


program at a time. or instruction at a time.

Output It generates intermediate It does not produce any


object code. intermediate object code.

Working mechanism The compilation is done Compilation and execution


before execution. take place simultaneously.

Speed Comparatively faster Slower

Memory Memory requirement is It requires less memory as it


more due to the creation does not create intermediate
of object code. object code.

Errors Display all errors after Displays error of each line


compilation, all at the one by one.
same time.

Error detection Difficult Easier comparatively

Pertaining C, C++, C#, Scala, PHP, Perl, Python, Ruby


Programming typescript uses compiler. uses an interpreter.
languages

Computer Fundamentals Module 01


18

Reference Book:

1. Introduction to computer (Peter Norton)


2. Computer Fundamentals (Dr. M. Lutfar Rahman)
3. FORTRAN 77 (Ram Kumar)
4. FORTRAN 77 (Gordon B. Davis)
5. ANSI C (E Balagurusamy)

Computer Fundamentals Module 01

You might also like