0% found this document useful (0 votes)
16 views

1. Basic Computer Architecture

Uploaded by

citecollege301
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

1. Basic Computer Architecture

Uploaded by

citecollege301
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Computer Architecture

Unit-1 Basic Computer Architecture


1.1 Introduction
Logical design of computer is called Computer Architecture.
Computer architecture is a specification detailing how a set of software and hardware
technology standards interact to form a computer system or platform.
Computer architectures represent the means of interconnectivity for a computer's
hardware components as well as the mode of data transfer and processing exhibited.
Different computer architecture configurations have been developed to speed up the
movement of data, allowing for increased data processing. The basic architecture has
the CPU at the core with a main memory and input/output system on either side of the
CPU.

 History of Computer Architecture

i. First Generation (1945-1958)

 ENIAC- 1945: Designed by Mauchly & Echert, built by US army


to calculate trajectories for ballistic shells during WWII, used
18000 vacuum tubes and 1500 relays, programmed by manually
setting switches
 UNIVAC – 1950: the first commercial computer.
 John Von Neumann architecture: Goldstine and Von Neumann
took the idea of ENIAC and developed concept of storing a
program in the memory.
 Features: - Electron emitting devices, Data and programs are stored
in a single read-write memory, Memory contents are addressable
by location, regardless of the content itself, Machine
language/Assemble language, Sequential execution, Use of drum
memory or magnetic core memory, 2 Kb memory.

ii. Second Generation (1959-1964)

 William Shockley, John Bardeen, and Walter Brattain invent the


transistor that reduce size of computers and improve reliability.
 First operating Systems: handled one program at a time and On-off
switches controlled by electricity.
 High level languages and Floating point arithmetic.
 Reduced the computational time from milliseconds to
microseconds.
iii. Third Generation (1965-1970)

 Microprocessor chips combines thousands of transistors, entire


circuit on one computer ship.
 Semiconductor memory and 2 Mb memory.
 Smaller computers that did not need a specialized room.
iv. Fourth a Generation (1971-1980.)

 Combines millions of IC .(VLSI )


 Single-chip processor and the single-board computer emerged.
 Creation of the Personal Computer (PC).
 Wide spread use of data communications.
 Massively parallel machine.
 Smallest in size because of the high component density.

v. Fifth Generation (1981-…)

 ULS IC.
 Artificial intelligence: Functions & logic predicates.
 Modern high-level languages like Python, R, C#, Java etc.

 Overview of Computer Organization

Computer Organization comes after the decide of Computer Architecture first.


Computer Organization is how operational attribute are linked together and
contribute to realize the architectural specification. Computer Organization
deals with structural relationship.

 Organization describes how it does it.


 Computer Organization deals with structural relationship while Computer
Architecture deals with functional behavior of computer system.
 Computer Organization consists of physical units like circuit designs,
peripherals and adders.
 Computer Organization handles the segments of the network in a system.
 Computer Organization is frequently called as micro architecture.
 Memory Hierarchy

The memory in a computer can be divided into four hierarchies based on the
speed as well as use. The processor can move from one level to another based
on its requirements. The four hierarchies in the memory are registers, cache,
main memory and Secondary Memory.

Characteristics of Memory Hierarchy

1) Capacity
It is the global volume of information the memory can store. As we move
from top to bottom in the Hierarchy, the capacity increases.

2) Access time
It is the time interval between the read/write request and the availability of
the data. As we move from top to bottom in the Hierarchy, the access time
increases.

3) Cost per bit


As we move from bottom to top in the Hierarchy, the cost per bit increases
i.e. Internal Memory is costlier than External Memory.

4) Performance
Earlier when the computer system was designed without Memory Hierarchy
design, the speed gap increases between the CPU registers and Main
Memory due to large difference in access time. This results in lower
performance of the system and thus, enhancement was required. This
enhancement was made in the form of Memory Hierarchy Design because
of which the performance of the system increases. One of the most
significant ways to increase system performance is minimizing how far down
the memory hierarchy one has to go to manipulate data.

Cache Memory:
Cache memory, also called cache, supplementary memory system that
temporarily stores frequently used instructions and data for quicker
processing by the central processing unit (CPU) of a computer.

Register Memory:
Register memory is the smallest and fastest memory in a computer. It is not
a part of the main memory and is located in the CPU in the form of registers,
which are the smallest data holding elements. A register temporarily holds
frequently used data, instructions, and memory address that are to be used
by CPU.

 External Memory

External memory which is sometimes called backing store or secondary


memory, allows the permanent storage of large quantities of data. At present, it
can measure the data in hundreds of megabytes or even in gigabytes. The
important property of external memory is that whenever the computer switches
off, then stored information will not be lost.

It can be categorized into four types.

1) Magnetic Disk

A magnetic disk is a circular plate constructed with metal or plastic coated


with magnetic material often both side of disk are used and several disk
stacked on one spindle which Read/write head available on each surface. All
disks rotate together at high speed. Bits are stored in magnetize surface in
spots along concentric circles called tracks. The tracks are commonly
divided into sections called sectors. After the read/write head are positioned
in specified track the system has to wait until the rotating disk reaches the
specified sector under read/write head. Information transfer is very fast once
the beginning of sector has been reached. Disk that are permanently attached
to the unit assembly and cannot be used by occasional user are called hard
disk drive with removal disk is called floppy disk.

2) RAID

The RAID is also known as a redundant array of independent disks. It is


a type of data virtualization technology, which is used to combine
components of multiple disks into a logical unit so that they can improve the
performance or create redundancy. If there are multiple disks/drives, it will
allow the employment of various techniques such as disk mirroring, parity,
and disk striping. We cannot consider RAID as a replacement for data
backup. If RAID is going through the critical data, it will be backed up to a
logical set of disks or other physical disks. When we make a connection with
RAID, we will normally use the following terms:

 Striping: In this, data will be split between more than one disk.
 Mirroring: In this, data will mirror between more than one disk.
 Parity: It can also be called checksum. It can be described as a
calculated value, which is used to mathematically rebuild the data.

Commonly RAID has 7 levels. In which levels 0, 1, and 3 are used for
high transfer rates. Levels 4, 5, and 6 are used for high transaction
rates.
3) Optical Memory

Optical memories perform their operations with the help of light beams, and
it also needs option drive for the operations. We can use optical memory to
store backup, audio, video, and also for caring data. The speed of a flash
drive and the hard drive is faster as compared to the read/write speed. There
are various examples of optical memory that are Compact disk (CD) and
Digital Versatile Disk (DVD).

4) Magnetic tape

Reading and writing techniques in the tape system is the same as the disk
system. In this, the medium is flexible polyester tape coated with
a magnetizable material. The tape's data can be structured as a number of
parallel tracks that will be run lengthwise. In this form, the recording of data
can be called a parallel recording. Instead of the parallel recording, most of
the modern system uses serial recording. The serial recording uses the
sequence of bits along with each track to lay of the data. It is done with the
help of a magnetic disk. In the serial recoding, the disk contains the physical
record on the tape, which can be described as the data which are read and
write in the contiguous blocks.
 Organization of Hard Disk

Hard disk drives are magnetic media that store and retrieve digital data. Its
architecture is rigid rapidly rotating disks, or platters, held in place by spindles.
The platters are not magnetic but are coated with magnetic material.
 The entire disk is divided into platters and each platter consists of
concentric circles called as tracks.
 These tracks are further divided into sectors which are the smallest
divisions in the disk.

 A cylinder is formed by combining the tracks at a given radius of a disk


pack.

 There exists a mechanical arm called as Read / Write head and it is used
to read from and write to the disk.
 Head has to reach at a particular track and then wait for the rotation of the
platter and the rotation causes the required sector of the track to come
under the head.
 Each platter has 2 surfaces- top and bottom and both the surfaces are used
to store the data and each surface has its own Read/write data.

1.2 Instruction Code


An instruction code is a group of bits that instruct the computer to perform a specific
operation. The operation code of an instruction is a group of bits that define operations
such as addition, subtraction, shift, complement, etc.
An instruction must also include one or more operands, which indicate the registers
and/or memory addresses from which data is taken or to which data is deposited.

 Stored Program Organization

 The simplest way to organize a computer is to have Processor


Register and instruction code with two parts. The first part specifies the
operation to be performed and second specifies an address. The memory
address tells where the operand in memory will be found.
 Instructions are stored in one section of memory and data in another.
 For a memory unit with 4096 words we need 12 bits to specify an address
since 2^12 = 4096. If we store each instruction code in one 16-bit memory
word, we have available four bits for the operation code (abbreviated
opcode) to specify one out of 16 possible operations, and 12 bits to
specify the address of an operand. The control reads a 16-bit instruction
from the program portion of memory. It uses the 12-bit address part of
the instruction to read a 16-bit operand from the data portion of memory.
It then executes the operation specified by the operation code.
 Computers that have a single-processor register usually assign to it the
name accumulator and label it AC. The operation is performed with the
memory operand and the content of AC.
 Computer Register

Registers are a type of computer memory used to quickly accept, store, and
transfer data and instructions that are being used immediately by the CPU. The
registers used by the CPU are often termed as Processor registers.

The transfer of new information into a register is referred to as loading the


register. If all the bits of register are loaded simultaneously with a common
clock pulse than the loading is said to be done in parallel.

Following are some commonly use Register.

 Accumulator: This is the most common register, used to store data taken
out from the memory.
 General Purpose Registers: This is used to store data intermediate results
during program execution. It can be accessed via assembly programming.
 Special Purpose Registers: Users do not access these registers. These
registers are for Computer system,
o MAR: Memory Address Register are those registers that holds the
address for memory unit.
o MBR: Memory Buffer Register stores instruction and data
received from the memory and sent from the memory.
o PC: Program Counter points to the next instruction to be executed.
o IR: Instruction Register holds the instruction to be executed.

 Common Bus System

 A basic computer has 8 registers, memory unit and a control unit. The
diagram of the common bus system is as shown below.

 Connection: The outputs of all the registers except the OUTR (output
register) are connected to the common bus. The output selected depends
upon the binary value of variables S2, S1 and S0. The lines from common
bus are connected to the inputs of the registers and memory. A register
receives the information from the bus when its LD (load) input is
activated while in case of memory the Write input must be enabled to
receive the information. The contents of memory are placed onto the bus
when its Read input is activated.

 Various Register: 4 registers DR, AC, IR and TR have 16 bits and 2


registers AR and PC have 12 bits. The INPR and OUTR have 8 bits each.
The INPR receives character from input device and delivers it to the AC
while the OUTR receives character from AC and transfers it to the output
device. 5 registers have 3 control inputs LD (load), INR (increment) and
CLR (clear). These types of registers are similar to a binary counter.

 Computer Instruction

Computer instructions are a set of machine language instructions that a


particular processor understands and executes. A computer performs tasks on
the basis of the instruction provided.
An instruction comprises of groups called fields. These fields include:
 The Operation code (Opcode) field which specifies the operation to be
performed.
 The Address field which contains the location of the operand, i.e., register
or memory location.
 The Mode field which specifies how the operand will be located.

A basic computer has three instruction code formats. i.e.

1. Memory-Reference instruction

In Memory-reference instruction, 12 bits of memory is used to specify an


address and one bit to specify the addressing mode 'I'.

Example:
IR register contains = 0001XXXXXXXXXXXX, i.e. ADD after fetching
and decoding of instruction we find out that it is a memory reference
instruction for ADD operation.
Hence, DR ← M[AR]
AC ← AC + DR, SC ← 0

2. Register-Reference instruction

The Register-reference instructions are represented by the Opcode 111 with


a 0 in the leftmost bit (bit 15) of the instruction.
A Register-reference instruction specifies an operation on or a test of the AC
(Accumulator) register.

Example:

IR register contains = 0111001000000000, i.e. CMA after fetch and decode


cycle we find out that it is a register reference instruction for complement
accumulator.

Hence, AC ← ~AC

3. Input-Output instruction

Just like the Register-reference instruction, an Input-Output instruction does


not need a reference to memory and is recognized by the operation code 111
with a 1 in the leftmost bit of the instruction. The remaining 12 bits are used
to specify the type of the input-output operation or test performed.
Example:

IR register contains = 1111100000000000, i.e. INP after fetch and decode


cycle we find out that it is an input/output instruction for inputing character.

 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.
Some instructions are simple read, write and move commands that direct data
to different hardware.
The instruction set provides commands to the processor, to tell it what it needs
to do. The instruction set consists of addressing modes, instructions, native data
types, registers, memory architecture, interrupt, and exception handling, and
external I/O.

Examples:
 ADD - Add two numbers together.
 IN - Input information from a device, e.g., keyboard.
 JUMP - Jump to designated RAM address.
 JUMP IF - Conditional statement that jumps to a designated RAM
address.
 LOAD - Load information from RAM to the CPU.
 OUT - Output information to device, e.g., monitor.
 STORE - Store information to RAM.

1.3 Timing and Control

The timing for all registers in the basic computer is controlled by a master clock
generator. The clock pulses are applied to all flip-flops and registers in the system,
including the flip-flops and registers in the control unit. The clock pulses do not change
the state of a register unless the register is enabled by a control signal. The control
signals are generated in the control unit and provide control inputs for the multiplexers
in the common bus, control inputs in processor registers, and micro operations for the
accumulator.
There are two major types of Control Organization.
 Hardwired Control

The control logic is implemented with gates, flip-flops, decoders, and other
digital circuits. It has the advantage that it can be optimized to produce a fast
mode of operation. In the microprogrammed organization, the control
information is stored in a control memory. The control memory is programmed
to initiate the required sequence of micro operations. A hardwired control, as
the name implies, requires changes in the wiring among the various components
if the design has to be modified or changed.

 Microprogrammed Control

In the microprogrammed control, any required changes or modifications can be


done by updating the microprogram in control memory.
A control unit whose binary control values are saved as words in memory is
called a microprogrammed control unit.
A controller results in the instructions to be implemented by constructing a
definite collection of signals at each system clock beat. Each of these output
signals generates one micro-operation including register transfer. Thus, the sets
of control signals are generated definite micro-operations that can be saved in
the memory.
Each bit that forms the microinstruction is linked to one control signal. When
the bit is set, the control signal is active. When it is cleared the control signal
turns inactive. These microinstructions in a sequence can be saved in the internal
’control’ memory. The control unit of a microprogram-controlled computer is a
computer inside a computer.
The following image shows the block diagram of a Microprogrammed Control
organization.
1.4 Instruction Cycle

The instruction cycle (also known as the fetch–decode–execute cycle, or simply


the fetch-execute cycle) is the cycle that the central processing unit (CPU) follows
from boot-up until the computer has shut down in order to process instructions.

 Fetch

The Control Unit sends a signal to the RAM in order to fetch the program and
data, which is then stored in one of the CPU’s register. To do so, the CPU makes
use of a vital hardware path called the ‘address bus’ along which the program
and data travels.
The Control Unit then increments the Program Counter (PC). The PC is an
important register that keeps track of the running order of the instructions and
shows which instruction in the program is due to be executed next .
The CPU then places the address of the next item to be fetched on to the address
bus. Data from this address then moves from main memory into the CPU by
travelling along another hardware path called the ‘data bus’.

 Decode

The ‘instruction set’ of the CPU is designed to understand a specific set of


commands, which serves to make sense of the instruction it has just
fetched. This process is called ‘decode’.
A single piece of program code might require several instructions. For example,
look at this Python code:
Area=length*Width
First, the computer needs to load in the value of the variable length into the
immediate access store (registers). Next it needs to load in the value of the
variable width.

1.5 Types of Instruction

There are different types of instruction in Computer architecture some of them were
discussed above remaining is
 Interrupt Instruction

An interrupt in computer architecture is a signal that requests the processor to


suspend its current execution and service the occurred interrupt. To service the
interrupt, the processor executes the corresponding interrupt service routine
(ISR). After the execution of the interrupt service routine, the processor resumes
the execution of the suspended program. Interrupts can be of two types of
hardware interrupts and software interrupts.

You might also like