Вы находитесь на странице: 1из 11

Basic Structure of Computers

Basic Structure of Computers


Computer is a fast electronic calculating machine that accepts digitized input
information, processes it according to a list of internally stored instructions, and
produces the resulting output information.
Types of Computer
There are four types of computer.
1. Personal or Desktop Computers:
This is found wide use in homes, schools and business offices. Personal
computers have processing and storage units, visual display and audio
output units and a keyboard that can all be located easily on a home or
office desk.
The storage media include hard disks, CD-ROMs and diskettes.
2. Notebook Computers:
These are compact version of the personal computer with all of the
components of personal computer packaged into a single unit of the size of
a thin briefcase.
3. Workstation:
These have high resolution graphics input/output capability, although still
retaining the dimensions of desktop computers. These have significantly
more computational power than personal computers. These are often used
in engineering applications, especially for interactive design work.
4. Enterprise systems and Servers:
These are a range of large and very powerful computer system. These are
used for business data processing in medium to large corporations that
require much more computing power and storage capacity than
workstation. Servers contain sizable database storage units and are capable
of handling large volumes of requests to access the data. Servers are widely
accessible to the education, business, and personal user communities. The
request and responses are usually transported over internet communication
facilities.
5. Super computers:
These are used for the large scale numerical calculations required in
applications such as weather forecasting and aircraft design and simulation.
In enterprise systems, servers and super computers, the functional units,
including multiple processors, may consist of a number of separate and
often large units.

I semester MCA
Pgm

Basic Structure of Computers

Functional Units
There are five basic independent functional units in a computer. Each
performs different functions.
The functional units are
1. Input unit
2. Memory unit.
3. Arithmetic and Logic unit
4. Control unit.
5. Output unit.
Input Unit:
Computer accepts coded information through input units which read the
data. Input units are keyboard, mouse and joystick and touch screen monitor.
When a key is pressed on the input key the corresponding letter is automatically
translated into its binary code and transmitted over cable to either memory or
control unit. Microphones can also be used as input unit which converts audio into
digital codes.
Memory Unit:
Memory unit is used to store programs or data or both for very short period
of time or permanent as permitted by the user.
There are two types of storage; they are Primary storage and Secondary storage
.
Primary storage is a fast memory that operates at electronic speeds. When
executing the programs must be stored in the memory up to certain time till the
program gets executed.
The memory unit is made up of semiconductor storage cells each capable of
storing one bit of information. These cells are rarely read or written as individual
cells but instead are processed in groups of fixed size called words. The number of
bits in each word is often referred to as the word length of the computer.
Memory in which any location can be reached in a short and fixed amount of time
after specifying its address is called random access memory (RAM). The time
required to access one word is called the memory access time. This time is
independent of the location of the word being accessed and is fixed.
Secondary storage is used to store large amount of data. Secondary storage
devices are magnetic disks, magnetic tapes and optical disks (CD-DVD-ROMs).
Using secondary storage we can transfer large amount of data from one computer
to the other computer.
Arithmetic and Logic Unit:
2

I semester MCA
Pgm

Basic Structure of Computers

The operations like addition, subtraction, multiplication and division and


other mathematical operations which take in computer are processed by Arithmetic
and Logic unit. When two numbers are to be multiplied or subtracted they are
brought to the ALU and the process is carried and then it is stored in the memory.
ALU is one of the fastest device connected the computer.
Control Unit:
Every operation which is carried out in the computer is controlled or
signaled by control unit. It can be called as the nerve centre of the computer. It
receives and sends appropriate signal from and to every unit of the computer. All
these are carried through timing signals. Timing signals are signals that determine
when a given action is to take place. A large set of control lines or wires carries the
signals used for timing and synchronization of events in all units.
Output Unit:
The function of the output unit is to send processed results to the outside in
the form of soft copy using monitor or hard copy using printer.
Output units are printers, monitors (graphic displays).
The total operations of the functional units are as follows:

The computer accepts information in the form of programs and data


through an input unit and stores it in the memory
Information stored in the memory is fetched, under program control,
into an arithmetic and logic unit, where it is processed.
Processed information leaves the computer through output unit.
All activities are monitored and controlled by the control unit.
Basic Operational Concepts
A program consist of instructions, these instructions are brought down to
the memory and from memory into the processor, where the execution takes place.
A typical instruction may be
Add LOCA,R0
This instruction adds the operand at memory location LOCA to the operand in a
register in the processor, R0, and places the sum into register R0. The original
contents of LOCA are preserved where as those of R0 are overwritten several
times.
Transfers between the memory and the processor are started by sending the
address of the memory location to be accessed to the memory unit and issuing the
appropriate control signals. The data are then transferred to or from the memory.
The figure below shows how the memory and the processor are connected. It also
shows the operational details of the processor.
3

I semester MCA
Pgm

Basic Structure of Computers

The processor contains a number of registers used for different purposes.


The instruction register (IR) holds the instruction that is currently being
executed.
The program counter (PC) is a specialized register which keeps the track of
the execution of a program. It contains the memory address of the next
instruction which is to be fetched and executed.
The memory address register (MAR) holds the address of the location to be
accessed.
The memory data register (MDR) contains the data to be written into or
read out of the addressed location.
There are n general purpose registers which stores the contents.

Execution of the program starts when the PC is set to the point to the first
instruction of the program. The contents of the PC are transferred to MAR and
a read signal is sent to the memory and the contents are loaded into the MDR.
Now the contents of MDR are transferred to IR where the instruction is ready
to be decoded and executed. If this instruction involves an operation to be
performed by the ALU, its required operands are fetched by sending its address
to MAR and initiating a read cycle. Now the operand has been read from the
memory into the MDR and transferred to ALU to perform desired operation.
Now the result of this operation is sent to MDR and stored in the memory. The
address of the location where the result is to be stored is sent the MAR and a
4

I semester MCA
Pgm

Basic Structure of Computers

write cycle is initiated. During the execution of these instructions at some point
of time the PC points to the next instruction to be executed. Thus as soon as the
current instruction is completed a new instruction fetch may be started. The
process is repeated until the program gets terminated.
Bus Structures
A group of lines that serves as a connecting path for several devices is
called a bus. When a word of data is transferred between units, all its bits are
transferred in parallel i.e. bits are transferred simultaneously over many wires
or lines, one bit per second.
The simplest interconnection between functional units is done by using single
bus.
Here all units are connected to a single bus because of which the bus can be
used for one transfer at a time i.e. only two units can actively use the bus at any
given time.
Single bus structure is vastly used because of its low cost and its flexibility for
attaching peripheral devices.
Multiple bus structure systems achieve more concurrency in operations by
allowing two or more transfers to be carried out at the same time which leads
to better performance at an increased cost.

The single bus structure is as shown above. Consider the transfer of an encoded
character from processor to a character printer.
The processor sends character over the bus to the printer buffer.
Buffer is an electronic register which holds the information during
the transfer of data.
After the buffer gets loaded the printer can start printing without
future intervention by the processor
The bus and the processor are no longer needed and can be released
for other activity.
The printer continues printing the encoded character which is in the
buffer.
The printer in not available for further transfers until the previous
task is completed.
5

I semester MCA
Pgm

Basic Structure of Computers

During this time the processor can go for any other instruction with
other devices.
The system bus has three parts.
Data bus: This is used to carry data from input devices or memory
to the processor and vice versa to output device. Hence it is called
bi-directional.
Address bus: The processor uses this bus to access the memory or
any I/O device connected to it.
Control bus: These lines are needed to conduct various activities
like read, write, reset etc.
Software
Software is a collection of programs that are executed as needed to perform
and manage some functions such as
Receiving and interpreting user commands
Entering and editing application programs and storing them as files
in secondary storage devices.
Managing the storage and retrieval of files in secondary storage
devices.
Running standard application programs such as word processor,
spreadsheets or games, data supplied by the user.
Controlling I/O units to receive input information and produce
output results.
Translating programs from source from prepared by user into object
form consisting of machine instructions
Linking and running user-written application programs with existing
standard library routines, such as numerical computation packages.
The basic operation of an operating system is to manage time. Let us consider a
system with a processor, a disk and a printer. Now let us discuss how a document
is printed and role played by operating system in this process.
First the program is complied from a high level language into
machine level language and stored in the disk.
Now the file is transferred to primary memory.
Now the execution of the program is started which involves reading
a data file from the disk into the memory, performing some
computation on the data and print the result.
6

I semester MCA
Pgm

Basic Structure of Computers

When the execution reaches the point where the data file is needed,
the program requests the operating system to transfer the data file
from the disk to the memory.
The OS performs this task and passes execution control back to the
application program, which then proceeds to perform the required
computation.
After the computation is completed the result is ready to be printed.
The application program sends a request to the operating system and
a OS routine is executed to cause the printer to print the results.

During the time period t0 to t1 an OS routine loading the application program from
the disk to memory is carried out. A similar activity occurs during the period t2 to
t3 and during the period t4 to t5 the result gets printed. When the result gets
printed during the time period t4 to t5, the period t0 and t1 and period t2 to t3 is
made use of the execution of other program by an OS routine. This pattern is
called multitasking or multiprogramming which is carried and managed by
operating system.
Performance
Performance is the time taken by the system to execute a program.
The parameters which affect the performance are processor clock speed, type of
instruction, memory access time, power dissipation in the system etc.
The performance is also influenced by the number and type of I/O devices
connected, data transfer capacity of the bus etc.
7

I semester MCA
Pgm

Basic Structure of Computers

The performance of a system by calculated by the formula


T=NxS
R
Where T = Processor Time
N = Number of machine language instructions.
S = Average number of basic steps required to execute one machine
instruction
R = Processor clock rate in cycles per second.
Performance can be improved by reducing the memory access time of the CPU.
This can be done by placing high speed memories to store data. Such a memory is
called cache memory which is built within processor (L1 cache) or can be placed
between memory and the CPU (L2 cache). The size of cache memory is small
compared to primary and secondary memory. This can store only instructions and
data which are required by the processor in the immediate next sequence. As the
execution proceeds new set of programs can be loaded into the cache by swapping
the previous contents back into the main memory. Here the CPU fetches the
instructions and data directly from cache instead of accessing main memory every
time.
CISC and RISC
Some processor may have large number of instructions which are executed
in small number of steps. Individual instructions perform more complex
operations than fewer instructions. This leads to lower value of N and large value
of S. According to the instruction set, computers can be generally classified into
two categories: CISC and RISC.
CISC: Complex Instruction Set Computers.
Use Micro programmed control
Goal is to provide a single machine instruction for each statement
written in HLL.
Direct manipulation of operands residing in memory.
Frequent memory access.
Variable length instruction formats.
Variety of addressing modes.
Instruction cycles are different.
No need for specialized compiler design
Complex decoding circuit is necessary.
RISC: Reduced Instruction Set Computers.
8

I semester MCA
Pgm

Basic Structure of Computers

Use Hardwired control.


Goal is to have faster execution.
All Operations done on the CPU registers.
Memory access is not frequent and is limited to Load and Store
instructions
Fixed length instruction formats which are easily decodable.
Few addressing modes.
Single cycle instruction execution, hence faster.
Efficient and optimized compiler design required.
Small chip area needed for instruction decoding and sequencing
control.

Memory Addresses
Every information we store in the computer is stored in memory unit.
Memory is organized such that a group of n-bits can be stored or retrieved in a
single operation. Hence n is called a word length and group of n-bits is referred to
as word of information. Word length can vary from 8 to 64 bits. If the word length
is 32-bits, then a memory word can store a 32-bit signed integer or four ASCII
characters.
Accessing the memory for reading or writing an item requires distinct addresses
for each location. If k is the number of address lines, then 2k addresses constitute
the address space of the computer
If k=20, we require an address space of 220 = 1M (1 mega) and if k=30, the address
space is 230 = 1G (1 giga) locations.
Representation of memory is shown below.

I semester MCA
Pgm

Basic Structure of Computers

Byte Addressability
Memory is arranged in such a way that successive addresses refer to
successive byte locations. Each location contains one byte of information which is
called byte addressability. If the word length is 32 bits, then they are divided into 4
bytes and stored in 4 consecutive address locations. Successive words are located
at addresses 0, 4, 8. with each word having 4 bytes.
Memory Assignment
Byte addresses are arranged in two ways, 1. Big-endian assignment.
2. Little-endian assignment.
Big-endian assignment: Here the byte of data is stored at lower address and low
byte of data at higher address. This is used in Motorola and Power PC processor.

10

I semester MCA
Pgm

Basic Structure of Computers

Little-endian assignment: Here lower addresses contain low order bytes of data.
This is used in Intel processors.

To access a number in memory, its word address is specified.


To access character string of variable length, the beginning of the string is
indicated by giving the address of the first character. The length of the string in
bytes can be saved in a memory location processor register. Length of the string
can also found by using special control character as the last character in the string
with the meaning end of string.

11

I semester MCA
Pgm

Вам также может понравиться