Unit - I CA
Unit - I CA
Computer Architecture is refers to the overall design of a computer system, including the hardware and software
components that make up the system and how they interact with each other.
Computer architecture provides the functional details and behavior of a computer system. It involves the design of
the instruction set, the microarchitecture, and the memory hierarchy, as well as the design of the hardware and
software components that make up the system.
Computer Architecture mainly deals with the functional behavior of a computer system and covers the "What to do?"
part. It gives the functional description of requirements, design, and implementation of the different parts of a
computer system.
In the designing process of a computer system, the computer architecture is to be defined before the computer
organization.
Computer Organization refers to the way in which the hardware components of a computer system are arranged
and interconnected. It implements the provided computer architecture and covers the "How to do?" part.
Computer Organization is to be defined after the decision of the computer architecture. It just provides information
that how operational attributes of a computer system are linked together and help in realizing the architectural
specification of the computer. It involves the design of the interconnections between the various hardware
components, as well as the design of the memory and I/O systems.
Computer Architecture Computer Organization
Computer architecture deals with high level Computer organization deals with low level
design. design.
The modern computer took its shape with the arrival of your time. It had been around 16th century when
the evolution of the computer started. The initial computer faced many changes, obviously for the
betterment. It continuously improved itself in terms of speed, accuracy, size, and price to urge the form of
the fashionable day computer. This long period is often conveniently divided into the subsequent phases
called computer generations:
● First Generation Computers (1940-1956)
● Second Generation Computers (1956-1963)
● Third Generation Computers (1964-1971)
● Fourth Generation Computers (1972-2010)
● Fifth Generation Computers (2010 - Present)
The technology behind the primary generation computers was a fragile glass device, which was called
vacuum tubes. These computers were very heavy and really large in size. These weren’t very reliable and
programming on them was a really tedious task as they used low-level programming language and used
no OS. First-generation computers were used for calculation, storage, and control purpose. They were
too bulky and large that they needed a full room and consume rot of electricity.
Main characteristics of first generation computers are:
Main electronic component
Vacuum tube.
Programming language
Machine language.
Main memory
Magnetic tapes and magnetic drums.
Input/output devices
Paper tape and punched cards.
Second-generation computers used the technology of transistors rather than bulky vacuum tubes.
Another feature was the core storage. A transistor may be a device composed of semiconductor material
that amplifies a sign or opens or closes a circuit.
Transistors were invented in Bell Labs. The use of transistors made it possible to perform powerfully and
with due speed. It reduced the dimensions and price and thankfully the warmth too, which was generated
by vacuum tubes. Central Processing Unit (CPU), memory, programming language and input, and output
units also came into the force within the second generation.
Programming language was shifted from high level to programming language and made programming
comparatively a simple task for programmers. Languages used for programming during this era were
FORTRAN (1956), ALGOL (1958), and COBOL (1959).
Main characteristics of second generation computers are:-
Main electronic
component
Transistor.
Programming
language
Machine language and assembly language.
Memory
Magnetic core and magnetic tape/disk.
Input/output devices
Magnetic tape and punched cards.
Smaller in size, low power consumption, and generated less heat (in
Power and size
comparison with the first generation computers).
PDP-8, IBM1400 series, IBM 7090 and 7094, UNIVAC 1107, CDC
Examples of second
generation
3600 etc.
Third Generation Computers: Integrated Circuits. (1964-1971)
During the third generation, technology envisaged a shift from huge transistors to integrated circuits, also
referred to as IC. Here a variety of transistors were placed on silicon chips, called semiconductors. The
most feature of this era’s computer was the speed and reliability. IC was made from silicon and also
called silicon chips.
A single IC, has many transistors, registers, and capacitors built on one thin slice of silicon. The value
size was reduced and memory space and dealing efficiency were increased during this generation.
Programming was now wiped out Higher level languages like BASIC (Beginners All-purpose Symbolic
Instruction Code). Minicomputers find their shape during this era.
Main characteristics of third generation computers are:
Programming language
High-level language
Memory
Large magnetic core, magnetic tape/disk
IBM 360, IBM 370, PDP-11, NCR 395, B6500, UNIVAC 1108,
Examples of third
generation
etc.
In 1971 First microprocessors were used, the large scale of integration LSI circuits built on one chip called
microprocessors. The most advantage of this technology is that one microprocessor can contain all the
circuits required to perform arithmetic, logic, and control functions on one chip.
The computers using microchips were called microcomputers. This generation provided the even smaller
size of computers, with larger capacities. That’s not enough, then Very Large Scale Integrated (VLSI)
circuits replaced LSI circuits. The Intel 4004chip, developed in 1971, located all the components of the pc
from the central processing unit and memory to input/ output controls on one chip and allowed the
dimensions to reduce drastically.
Technologies like multiprocessing, multiprogramming, time-sharing, operating speed, and virtual memory
made it a more user-friendly and customary device. The concept of private computers and computer
networks came into being within the fourth generation.
Main characteristics of fourth generation computers are:
Memory
semiconductor memory (such as RAM, ROM, etc.)
Input/output devices
pointing devices, optical scanning, keyboard, monitor, printer, etc.
Examples of fourth
generation
IBM PC, STAR 1000, APPLE II, Apple Macintosh, Alter 8800, etc.
The technology behind the fifth generation of computers is AI. It allows computers to behave like humans.
It is often seen in programs like voice recognition, area of medicines, and entertainment. Within the field
of games playing also it’s shown remarkable performance where computers are capable of beating
human competitors.
The speed is highest, size is that the smallest and area of use has remarkably increased within the fifth
generation computers. Though not a hundred percent AI has been achieved to date but keeping in sight
the present developments, it is often said that this dream also will become a reality very soon.
In order to summarize the features of varied generations of computers, it is often said that a big
improvement has been seen as far because the speed and accuracy of functioning care, but if we
mention the dimensions, it’s being small over the years. The value is additionally diminishing and
reliability is in fact increasing.
Main characteristics of fifth generation computers are:
Language
Understand natural language (human language).
Size
Portable and small in size.
Von-Neumann Model
Von-Neumann proposed his computer architecture design in 1945 which was later known as Von-Neumann
Architecture. It consisted of a Control Unit, Arithmetic, and Logical Memory Unit (ALU), Registers and Inputs/Outputs.
Von Neumann architecture is based on the stored-program computer concept, where instruction data and program data
are stored in the same memory. This design is still used in most computers produced today.
The Central Processing Unit can also be defined as an electric circuit responsible for executing the instructions of a
computer program.
The CPU performs a variety of functions dictated by the type of instructions that are incorporated in the computer.
The major components of CPU are Arithmetic and Logic Unit (ALU), Control Unit (CU) and a variety of registers.
The Arithmetic and Logic Unit (ALU) performs the required micro-operations for executing the instructions. In simple
words, ALU allows arithmetic (add, subtract, etc.) and logic (AND, OR, NOT, etc.) operations to be carried out.
Control Unit
The Control Unit of a computer system controls the operations of components like ALU, memory and input/output
devices.
The Control Unit consists of a program counter that contains the address of the instructions to be fetched and an
instruction register into which instructions are fetched from memory for execution.
Registers
Registers refer to high-speed storage areas in the CPU. The data processed by the CPU are fetched from the registers.
Following is the list of registers that plays a crucial role in data processing.
Registers Description
MAR (Memory Address This register holds the memory location of the data that needs to be
Register) accessed.
MDR (Memory Data Register) This register holds the data that is being transferred to or from memory.
AC (Accumulator) This register holds the intermediate arithmetic and logic results.
PC (Program Counter) This register contains the address of the next instruction to be executed.
CIR (Current Instruction This register contains the current instruction during processing
Register)
Buses
Buses are the means by which information is shared between the registers in a multiple-register configuration system.
A bus structure consists of a set of common lines, one for each bit of a register, through which binary information is
transferred one at a time. Control signals determine which register is selected by the bus during each particular register
transfer.
Von-Neumann Architecture comprised of three major bus systems for data transfer.
Bus Description
Address Address Bus carries the address of data (but not the data) between the processor and the
Bus memory.
Data Bus Data Bus carries data between the processor, the memory unit and the input/output devices.
Memory Unit
A memory unit is a collection of storage cells together with associated circuits needed to transfer information in and out
of the storage. The memory stores binary information in groups of bits called words. The internal structure of a memory
unit is specified by the number of words it contains and the number of bits in each word.
CPU Organization
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.
Mainly two types of operation are performed in a single accumulator based CPU organization:
1. Data transfer operation –
In this type of operation, the data is transferred from a source to a destination.
A register can hold the instruction, address location, or operands. Sometimes, the instruction has
register as a part of itself.
Types of Registers
As we have discussed above, registers can be organized into two main categories i.e.
the User-Visible Registers and the Control and Status Registers. Although we can’t separate the
registers in the processors clearly among these two categories.
This is because in some processors, a register may be user-visible and in some, the same may not
be user-visible.
User-Visible Registers
These registers are visible to the assembly or machine language programmers and they use them
effectively to minimize the memory references in the instructions. Well, these registers can only
be referenced using the machine or assembly language.
Well, the programmers can restrict some of the general-purpose registers to specific functions.
Like, some registers are specifically used for stack operations or for floating-point operations. The
general-purpose register can also be employed for the addressing functions.
2. Data Register
The term itself describes that these registers are employed to hold the data. But the
programmers can’t use these registers for calculating operand address.
3. Address Register
Now, the address registers contain the address of an operand or it can also act as
a general-purpose register. An address register may be dedicated to a certain addressing mode.
Let us understand this with the examples.
4. Condition Code
Condition codes are the flag bits which are the part of the control register. The condition codes are
set by the processor as a result of an operation and they are implicitly read through the machine
instruction.
The programmers are not allowed to alter the conditional codes. Generally, the condition codes are
tested during conditional branch operation.
1. Program Counter
The program counter is a processor register that holds the address of the instruction that has to
be executed next. It is a processor which updates the program counter with the address of the next
instruction to be fetched for execution.
2. Instruction Register
Instruction register has the instruction that is currently fetched. It helps in analysing the opcode
and operand present in the instruction.
The memory address registers (MAR) and memory buffer registers (MBR) are used to move the
data between processor and memory.
Register Organization
Register organization is the arrangement of the registers in the processor. The processor
designers decide the organization of the registers in a processor. Different processors may have
different register organization. Depending on the roles played by the registers they can be
categorized into two types, user-visible register and control and status register.
Here are the following types of registers in computer organization, such as:
3 Memory data MDR All the information that is supposed to be written or the
registers information that is supposed to be read from a certain memory
address is stored here
7 Condition code These have different flags that depict the status of operations.
registers These registers set the flags accordingly if the result of operation
caused zero or negative
11 Index registers BX We use this register to store values and numbers included in the
address information and transform them into effective addresses.
These are also called base registers.
These are used to change operand address at the time of
execution, also stated as BX
12 Memory buffer MBR MBR - Memory buffer registers are used to store data content or
register memory commands used to write on the disk. The basic
functionality of these is to save called data from memory.
MBR is very similar to MDR
13 Stack control SCR Stack is a set of location memory where data is stored and
registers retrieved in a certain order. Also called last in first out ( LIFO ), we
can only retrieve a stack at the second position only after
retrieving out the first one, and stack control registers are mainly
used to manage the stacks in the computer.
SP - BP is stack control registers. Also, we can use DI, SI, SP, and
BP as 2 byte or 4-byte registers.
EDI, ESI, ESP, and EBP are 4 - byte registers
14 Flag register FR Flag registers are used to indicate a particular condition. The size
of the registered flag is 1 - 2 bytes, and each registered flag is
furthermore compounded into 8 bits. Each registered flag defines
a condition or a flag.
The data that is stored is split into 8 separate bits.
Basic flag registers -
Zero flags
Carry flag
Parity flag
Sign flag
Overflow flag.
Most of the standard notations used for specifying operations on various registers are stated below.
1. R2 ← R1
o Typically, most of the users want the transfer to occur only in a predetermined control condition. This can be
shown by following if-then statement:
If (P=1) then (R2 ← R1); Here P is a control signal generated in the control section.
o It is more convenient to specify a control function (P) by separating the control variables from the register
transfer operation. For instance, the following statement defines the data transfer operation under a specific
control function (P).
1. P: R2 ← R1
The following image shows the block diagram that depicts the transfer of data from R1 to R2.
Here, the letter 'n' indicates the number of bits for the register. The 'n' outputs of the register R1 are connected to the 'n'
inputs of register R2.
A load input is activated by the control variable 'P' which is transferred to the register R2.
A bus consists of a set of common lines, one for each bit of register, through which binary information is transferred one
at a time. Control signals determine which register is selected by the bus during a particular register transfer.
The following block diagram shows a Bus system for four registers. It is constructed with the help of four 4 * 1
Multiplexers each having four data inputs (0 through 3) and two selection inputs (S1 and S2).
We have used labels to make it more convenient for you to understand the input-output configuration of a Bus system
for four registers. For instance, output 1 of register A is connected to input 0 of MUX1.
The two selection lines S1 and S2 are connected to the selection inputs of all four multiplexers. The selection lines choose
the four bits of one register and transfer them into the four-line common bus.
When both of the select lines are at low logic, i.e. S1S0 = 00, the 0 data inputs of all four multiplexers are selected and
applied to the outputs that forms the bus. This, in turn, causes the bus lines to receive the content of register A since the
outputs of this register are connected to the 0 data inputs of the multiplexers.
Similarly, when S1S0 = 01, register B is selected, and the bus lines will receive the content provided by register B.
The following function table shows the register that is selected by the bus for each of the four possible binary values of
the Selection lines.
Memory Transfer
Most of the standard notations used for specifying operations on memory transfer are stated below.
o The transfer of information from a memory unit to the user end is called a Read operation.
o The transfer of new information to be stored in the memory is called a Write operation.
o A memory word is designated by the letter M.
o We must specify the address of memory word while writing the memory transfer operations.
o The address register is designated by AR and the data register by DR.
o Thus, a read operation can be stated as: