Central Processing Unit (CPU) Memory, Communication between Various Units of a Computer System, The Instruction Format, Instruction Set, Processor Speed, Multiprocessor Systems, Multicomputer System
1. Basic Computer System
SWETA KUMARI BARNWAL 1
CONTROL PROCESSING UNIT
Computers require input hardware, processing hardware and output hardware. The hardware
that defines a computer is the CPU and memory. Without these a computer could not function.
Central Processing Unit (CPU) consists of the following features −
• CPU is considered as the brain of the computer.
• CPU performs all types of data processing operations.
• It stores data, intermediate results, and instructions (program).
• It controls the operation of all parts of the computer.
CPU itself has following three components.
• Memory or Storage Unit
• Control Unit
• ALU (Arithmetic Logic Unit)
2. Basic Computer System
SWETA KUMARI BARNWAL 2
Memory or Storage Unit
This unit can store instructions, data, and intermediate results. This unit supplies information
to other units of the computer when needed. It is also known as internal storage unit or the
main memory or the primary storage or Random Access Memory (RAM).
Its size affects speed, power, and capability. Primary memory and secondary memory are two
types of memories in the computer. Functions of the memory unit are −
• It stores all the data and the instructions required for processing.
• It stores intermediate results of processing.
• It stores the final results of processing before these results are released to an output
device.
• All inputs and outputs are transmitted through the main memory.
Control Unit
This unit controls the operations of all parts of the computer but does not carry out any actual
data processing operations.
Functions of this unit are −
• It is responsible for controlling the transfer of data and instructions among other units
of a computer.
• It manages and coordinates all the units of the computer.
• It obtains the instructions from the memory, interprets them, and directs the operation
of the computer.
• It communicates with Input/Output devices for transfer of data or results from storage.
• It does not process or store data.
ALU (Arithmetic Logic Unit)
This unit consists of two subsections namely,
• Arithmetic Section
• Logic Section
Arithmetic Section: Function of arithmetic section is to perform arithmetic operations like
addition, subtraction, multiplication, and division. All complex operations are done by making
repetitive use of the above operations.
Logic Section: Function of logic section is to perform logic operations such as comparing,
selecting, matching, and merging of data.
MEMORY
A memory is just like a human brain. It is used to store data and instructions. Computer
memory is the storage space in the computer, where data is to be processed and instructions
3. Basic Computer System
SWETA KUMARI BARNWAL 3
required for processing are stored. The memory is divided into large number of small parts
called cells. Each location or cell has a unique address, which varies from zero to memory
size minus one. For example, if the computer has 64k words, then this memory unit has 64 *
1024 = 65536 memory locations. The address of these locations varies from 0 to 65535.
Memory is primarily of three types −
• Cache Memory
• Primary Memory/Main Memory
• Secondary Memory
Cache Memory
Cache memory is a very high-speed semiconductor memory which can speed up the CPU. It
acts as a buffer between the CPU and the main memory. It is used to hold those parts of data
and program which are most frequently used by the CPU. The parts of data and programs are
transferred from the disk to cache memory by the operating system, from where the CPU can
access them.
Advantages
The advantages of cache memory are as follows −
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.
Disadvantages
The disadvantages of cache memory are as follows −
4. Basic Computer System
SWETA KUMARI BARNWAL 4
• Cache memory has limited capacity.
• It is very expensive.
Primary Memory (Main Memory)
Primary memory holds only those data and instructions on which the computer is currently
working. It has a limited capacity and data is lost when power is switched off. It is generally
made up of semiconductor device. These memories are not as fast as registers. The data and
instruction required to be processed resides in the main memory. It is divided into two
subcategories RAM and ROM.
Characteristics of Main Memory
• These are semiconductor memories.
• It is known as the main memory.
• Usually volatile memory.
• Data is lost in case power is switched off.
• It is the working memory of the computer.
• Faster than secondary memories.
• A computer cannot run without the primary memory.
Secondary Memory
This type of memory is also known as external memory or non-volatile. It is slower than the
main memory. These are used for storing data/information permanently. CPU directly does
not access these memories, instead they are accessed via input-output routines. The contents
of secondary memories are first transferred to the main memory, and then the CPU can access
it. For example, disk, CD-ROM, DVD, etc.
5. Basic Computer System
SWETA KUMARI BARNWAL 5
Characteristics of Secondary Memory
• These are magnetic and optical memories.
• It is known as the backup memory.
• It is a non-volatile memory.
• Data is permanently stored even if power is switched off.
• It is used for storage of data in a computer.
• Computer may run without the secondary memory.
• Slower than primary memories.
Communication Between Various Units of a Computer System
A computer consists of five functionally independent main parts input, memory, arithmetic
logic unit (ALU), output and control unit.
6. Basic Computer System
SWETA KUMARI BARNWAL 6
Computer systems consist of three components as shown in below image: Central Processing
Unit, Input devices and Output devices. Input devices provide data input to processor,
which processes data and generates useful information that’s displayed to the user through
output devices. This is stored in computer’s memory.
Central Processing Unit
The Central Processing Unit (CPU) is called "the brain of computer" as it controls operation
of all parts of computer. It consists of two components: Arithmetic Logic Unit (ALU), and
Control Unit.
Arithmetic Logic Unit (ALU)
Data entered into computer is sent to RAM, from where it is then sent to ALU, where rest of
data processing takes place. All types of processing, such as comparisons, decision-making
and processing of non-numeric information takes place here and once again data is moved to
RAM.
Control Unit
As name indicates, this part of CPU extracts instructions, performs execution, maintains and
directs operations of entire system.
Functions of Control Unit
Control unit performs following functions −
• It controls all activities of computer
• Supervises flow of data within CPU
• Directs flow of data within CPU
7. Basic Computer System
SWETA KUMARI BARNWAL 7
• Transfers data to Arithmetic and Logic Unit
• Transfers results to memory
• Fetches results from memory to output devices
Memory Unit
This is unit in which data and instructions given to computer as well as results given by
computer are stored. Unit of memory is "Byte".
1 Byte = 8 Bits
The Instruction Format:
A computer performs a task based on the instruction provided. Instruction in computers
comprises groups called fields. These fields contain different information as for computers
everything is in 0 and 1 so each field has different significance based on which a CPU decides
what to perform. The most common fields are:
• Operation field specifies the operation to be performed like addition.
• Address field which contains the location of the operand, i.e., register or memory
location.
• Mode field which specifies how operand is to be founded.
Instruction is of variable length depending upon the number of addresses it contains.
Generally, CPU organization is of three types based on the number of address fields:
1. Single Accumulator organization
2. General register organization
3. Stack organization
In the first organization, the operation is done involving a special register called the
accumulator. In second on multiple registers are used for the computation purpose. In the
third organization the work on stack basis operation due to which it does not contain any
address field. Only a single organization doesn’t need to be applied, a blend of various
organizations is mostly what we see generally.
Based on the number of address, instructions are classified as:
Note that we will use X = (A+B)*(C+D) expression to showcase the procedure.
1. Zero Address Instructions –
8. Basic Computer System
SWETA KUMARI BARNWAL 8
A stack-based computer does not use the address field in the instruction. To evaluate an
expression first it is converted to reverse Polish Notation i.e. Postfix Notation.
Expression: X = (A+B)*(C+D)
Postfixed : X = AB+CD+*
TOP means top of stack
M[X] is any memory location
PUSH A TOP = A
PUSH B TOP = B
ADD TOP = A+B
PUSH C TOP = C
PUSH D TOP = D
ADD TOP = C+D
MUL TOP = (C+D)*(A+B)
POP X M[X] = TOP
2 .One Address Instructions – This uses an implied ACCUMULATOR register for data
manipulation. One operand is in the accumulator and the other is in the register or memory
location. Implied means that the CPU already knows that one operand is in the accumulator
so there is no need to specify it.
9. Basic Computer System
SWETA KUMARI BARNWAL 9
Expression: X = (A+B)*(C+D)
AC is accumulator
M[] is any memory location
M[T] is temporary location
LOAD A AC = M[A]
ADD B AC = AC + M[B]
STORE T M[T] = AC
LOAD C AC = M[C]
ADD D AC = AC + M[D]
MUL T AC = AC * M[T]
STORE X M[X] = AC
3.Two Address Instructions – This is common in commercial computers. Here two
addresses can be specified in the instruction. Unlike earlier in one address instruction, the
result was stored in the accumulator, here the result can be stored at different locations rather
than just accumulators, but require more number of bit to represent address.
Here destination address can also contain operand.
Expression: X = (A+B)*(C+D)
R1, R2 are registers
M[] is any memory location
10. Basic Computer System
SWETA KUMARI BARNWAL 10
MOV R1, A R1 = M[A]
ADD R1, B R1 = R1 + M[B]
MOV R2, C R2 = C
ADD R2, D R2 = R2 + D
MUL R1, R2 R1 = R1 * R2
MOV X, R1 M[X] = R1
4.Three Address Instructions – This has three address field to specify a register or a
memory location. Program created are much short in size but number of bits per instruction
increase. These instructions make creation of program much easier but it does not mean that
program will run much faster because now instruction only contain more information but
each micro operation (changing content of register, loading address in address bus etc.) will
be performed in one cycle only.
Expression: X = (A+B)*(C+D)
R1, R2 are registers
M[] is any memory location
ADD R1, A, B R1 = M[A] + M[B]
ADD R2, C, D R2 = M[C] + M[D]
MUL X, R1, R2 M[X] = R1 * R2
11. Basic Computer System
SWETA KUMARI BARNWAL 11
Instruction Set:
An instruction set is a group of commands for a CPU in machine language. The term can refer
to all possible instructions for a CPU or a subset of instructions to enhance its performance in
certain situations.
All CPUs have instruction sets that enable commands to the processor directing the CPU to
switch the relevant transistors. Some instructions are simple read, write and move commands
that direct data to different hardware.
There are various popular instruction sets that are used in the industry and are of theoretical
importance. Each one has its own usage and advantages. Following are the instruction set
architectures:
• Reduced Instruction Set Computer (RISC)
• Complex Instruction Set Computer (CISC)
• Minimal instruction set computers (MISC)
• Very long instruction word (VLIW)
• Explicitly parallel instruction computing (EPIC)
• One instruction set computer (OISC)
• Zero instruction set computer (ZISC)
Reduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) is an instruction set architecture (ISA) which has
fewer cycles per instruction (CPI) than a complex instruction set computer (CISC). RISC
processors are also used in supercomputers such as Summit, which, as of November 2018, is
the world's fastest supercomputer as ranked by the TOP500 project.
Complex Instruction Set Computer (CISC)
Complex Instruction Set Computer (CISC) is an instruction set architecture (ISA) which has
fewer instructions per program than a Reduced instruction set computer (RISC).
Minimal instruction set computers (MISC)
Minimal instruction set computers (MISC) is a processor architecture with a very small number
of basic instruction operations and corresponding opcodes. As a result of this is a smaller
instruction set, a smaller and faster instruction set decode unit, and faster operation of
individual instructions. The disadvantage is that smaller instruction set always have more
sequential dependencies, reducing instruction-level parallelism.
Very long instruction word (VLIW)
Very long instruction word (VLIW) is an instruction set architectures designed to exploit
instruction level parallelism (ILP). Central processing units (CPU, processor) mostly allow
programs to specify instructions to execute in sequence only, a VLIW processor allows
12. Basic Computer System
SWETA KUMARI BARNWAL 12
programs to explicitly specify instructions to execute in parallel. This design is intended to
allow higher performance without the complexity inherent in some other designs.
Explicitly parallel instruction computing (EPIC)
Explicitly parallel instruction computing (EPIC) is an instruction set that permits
microprocessors to execute software instructions in parallel by using the compiler, rather
than complex on-die circuitry, to control parallel instruction execution. This was intended to
allow simple performance scaling without resorting to higher clock frequencies.
One instruction set computer (OISC)
One instruction set computer (OISC) is an abstract machine that uses only one instruction
obviating the need for a machine language opcode. OISCs have been recommended as guides
in teaching computer architecture and have been used as computational models in structural
computing research.
Zero instruction set computer (ZISC)
Zero instruction set computer (ZISC) is a computer architecture based on pattern matching and
absence of (micro-)instructions in the classical sense. These chips are known for being thought
of as comparable to the neural networks being marketed for the number of "synapses" and
"neurons"
Processor Speed
Computer processor speed (CPU speed) is one of the most important elements to consider when
comparing computers. The CPU is often referred to as “the brain” of your computer, so
ensuring it’s working properly is very important to the longevity and functionality of your
computer. Understanding what makes a good processor speed starts with understanding what
exactly a processor does - and what its components do to improve the functionality of your
computer.
A central processing unit, or CPU, is a piece of hardware that enables your computer to interact
with all of the applications and programs installed. A CPU interprets the program’s instructions
and creates the output that you interface with when you’re using a computer.
A processor is made up of hardware that works together to deliver information, allowing your
computer to complete the tasks that you request when you open an application or make changes
to a file. Whether it processes quickly or painfully slowly can make a big impact on your
computing experience.
Processor cores and clock speeds determine how much information can be received at a time,
and how quickly that information can be processed on your computer. The speed at which your
computer’s cores and clock speed work together is considered its processing speed.
Multiprocessor Systems:
13. Basic Computer System
SWETA KUMARI BARNWAL 13
Multiprocessor:
A Multiprocessor is a computer system with two or more central processing units (CPUs)
share full access to a common RAM. The main objective of using a multiprocessor is to boost
the system’s execution speed, with other objectives being fault tolerance and application
matching.
There are two types of multiprocessors, one is called shared memory multiprocessor and
another is distributed memory multiprocessor. In shared memory multiprocessors, all the
CPUs shares the common memory but in a distributed memory multiprocessor, every CPU
has its own private memory.
Applications of Multiprocessor –
1. As a uniprocessor, such as single instruction, single data stream (SISD).
2. As a multiprocessor, such as single instruction, multiple data stream (SIMD),
which is usually used for vector processing.
3. Multiple series of instructions in a single perspective, such as multiple instruction,
single data stream (MISD), which is used for describing hyper-threading or
pipelined processors.
4. Inside a single system for executing multiple, individual series of instructions in
multiple perspectives, such as multiple instruction, multiple data stream (MIMD).
Benefits of using a Multiprocessor –
• Enhanced performance.
• Multiple applications.
• Multi-tasking inside an application.
• High throughput and responsiveness.
• Hardware sharing among CPUs.
Multicomputer:
A multicomputer system is a computer system with multiple processors that are connected
together to solve a problem. Each processor has its own memory and it is accessible by that
particular processor and those processors can communicate with each other via an
interconnection network.
14. Basic Computer System
SWETA KUMARI BARNWAL 14
As the multicomputer is capable of messages passing between the processors, it is possible
to divide the task between the processors to complete the task. Hence, a multicomputer can
be used for distributed computing. It is cost effective and easier to build a multicomputer
than a multiprocessor.
Difference between multiprocessor and Multicomputer:
1. Multiprocessor is a system with two or more central processing units (CPUs) that
is capable of performing multiple tasks where as a multicomputer is a system with
multiple processors that are attached via an interconnection network to perform a
computation task.
2. A multiprocessor system is a single computer that operates with multiple CPUs
where as a multicomputer system is a cluster of computers that operate as a
singular computer.
3. Construction of multicomputer is easier and cost effective than a multiprocessor.
4. In multiprocessor system, program tends to be easier where as in multicomputer
system, program tends to be more difficult.
5. Multiprocessor supports parallel computing, Multicomputer supports distributed
computing.