Ca Short Notes 2nd Sem Bca
Ca Short Notes 2nd Sem Bca
Computer Architecture:
Instruction Code:
The collection of bits that instruct the computer to perform a specific operation is called
an instruction code. It is divided into two parts operation (op code) and address part.
Op code part tells which operation is to be performed while address part tell on which
it is to be performed.
Buses are the set of wires which is used to carry signals from one place to other place.
Three types of buses can exist in a computer system Data Bus, Address and Control
Bus.
Registers:
Registers are the temporary storage elements during the execution of instructions. When
operands are brought into the processor, they are stored in the following registers.
Computer Instruction:
Instruction cycle:
Any program is executed by going through a cycle for each instruction. In the basic
computer each instruction cycle has the following parts:
3. Read the effective address from memory if the instruction has an indirect address.
Memory word:
The natural unit of organization of memory is word. The size of word is different for
different machine such as 16 bits, 32 bits, etc.
In memory reference instruction at first memory reference is given to read data from
memory and transfer it to a register where they can be operated on with logic circuits.
Following Memory Reference Instructions can exist in a computer.
Instruction Work
AND This instruction performs the AND logic operation on pairs of bits in AC and
the memory word
ADD This instruction performs the ADD operation on pairs of bits in AC and the
memory word
LDA This instruction is used to transfers the memory word to accumulator.
STA This Instruction is used to store the content of accumulator into the memory
word
BUN This instruction is used to transfer the program to the instruction located at the
effective address.
BSA This is a useful instruction for branching to a portion of the program called a
subroutine.
ISZ At that time to skip the next instruction PC is incremented by one in order.
Microinstruction format:
3 3 3 2 2 7
F1 F2 F3 CD BR AD
The three fields F1, F2, and F3 specify micro operations for the computer. The CD field
selects status bit conditions. The BR field specifies the type of branch to be used. The
AD field contains a branch address.
The basic components of a micro-programmed control unit are the control memory and
the circuits that
select the next address. The address selection part is called a micro-program sequencer.
Processor clock:
No of basic operation that processor can perform per unit time are controlled by a
regular stream of pulses called bears or ticks issued by system or processor clock.
The speed of clock is called its frequency measured in million per second.
When the control signals are generated by h/w using conventional logic design
techniques such as gates, flip-flops, decoders and other digital circuit called hardwired
control. Hardwired control comes under RISC.
A master clock generator controls the timing for all registers in the basic computer. The
clock pulses are
applied to all flip-flops and registers in the system and in the control unit. The clock
transition does not
change the state of a register unless the register is enabled by a control signal.
CPU organization:
3. Stack organization.
General register organization uses only two or three address fields . Each address field
may specify a processor register or a memory word.
Stack organization:
Stack is a temporary storage during the execution for the processing of instructions. Its
follow LIFO rule. Two types of stack exist register and memory stack. If stack is
constituted in memory(RAM) attached to cpu called memory stack. If stack is organised
as a collection of a finite No of memory words register stack.
Control word:
The microinstruction contains a control word that specifies one or more micro-
operations for the data processor.
Instruction format:
One address: One-address instructions use an implied accumulator (AC) register for
all data manipulation.
Two address: In two address instruction format each address field can specify either a
processor register or memory word.
Three address instructions: Three-address instruction formats can use each address
field to specify either a processor register or a memory operand.
Instruction Fields:
Mode field : Determines how the address field is to be interpreted (to get effective
address or the operand).
Instruction sets:
Addressing modes:
Specifies a rule for interpreting or modifying the address field of the instruction (before
the operand is actually referenced).
Parallel processing:
A Parallel processing is a term used to denote a large class of techniques that are used
to provide simultaneous data-processing tasks for the purpose of increasing the
computational speed of a computer system. Pipeline processing, vector processing and
array processing is the example of parallel processing.
This is a diagram that shows the segment utilization as a function of time. Usually the
behaviour of a pipeline can be illustrated with a space time diagram.
Pipelining:
Type of Pipelining:
Instruction pipeline:
Arithmetic pipeline:
They are employed to implement floating point operations, multiplication of fixed point
numbers and similar computations encountered in scientific problems.
Speedup ratio:
The speedup ratio of pipeline processing over an equivalent non pipeline processing is
define by the ratio given below:
Pipeline conflicts:
pipeline conflicts are the difficulties that can cause the instruction pipeline to deviate
from its normal operation can be divided into three types.
Resource Conflict:
Branch Difficulties:
Arise from branch and other instructions that change the value of PC.
If the registers in the interface share a common clock with the cpu registers, the transfer
between two units is said to be synchronous. If internal timing of each unit is
independent from each other and uses its own private clock for internal registers then
two units are said to be asynchronous to each other. Strobe control and handshaking are
the method of asynchronous data transfer.
Strobe Control:
Strobe control is the method of asynchronous data transfer. The strobe is a single control
line that informs the destination unit when a valid data word is available in the bus, it
is activated either by source unit or destination unit.
Handshaking:
In handshaking method, One control line is in the same direction as the data flow in the
bus from the source to the destination. It is used by the source unit to inform the
destination unit whether there are valid data in the bus. The other control line is in the
other direction from the destination to the source. It is used by the destination unit to
inform the source whether it can accept data.
Baud Rate:
The baud rate is defined as the rate at which serial information is transmitted and is
equivalent to the data transfer in bits per second.
Interrupt:
Interrupt are the signals generated by any device to alert or inform other devices.
Modes of Transfer:
Data transfer between the central computer and I/O devices may be handled in either
of three possible modes.
1. Programmed I/O : In program initiated I/0 each data item transfer is initiated by an
instruction in the program.
3. Direct memory access (DMA): In DMA, the interface transfers data into and out of
memory unit through the memory bus.
Priority Interrupt:
Polling:
A polling procedure is used to identify the highest priority source by s/w means. In
polling there is one common branch address for all interrupts. The program that takes
care of interrupts begins at the branch address and polls the interrupt sources in
sequence.
Daisy chain Priority: It is a h/w method consists of a serial connection of all the
devices that request an interrupt. In daisy chain the device with highest priority is placed
in the first position, followed by lower priority devices up to the device with the lowest
priority.
Priority encoder:
The priority encoder is a circuit that implements the priority function such as if two or
more inputs arrive at the same time, the input having the highest priority should be taken
precedence.
DMA:
DMA is a technique that remove the CPU from the path and letting the peripheral
device manage the memory buses directly for increasing the speed of data transfer
among storage devices/memory.
DMA Controller:
A DMA Controller takes over the buses to manage the transfer directly between the i/o
device and memory due to idle CPU.
Access Modes: the access mode in which the information is accessed from the memory.
The information from memory devices can be accessed in the following ways:
Random Access;
Sequential Access;
Direct Access.
Access Time:
The access time is the time required between the request made for a read or write
operation till the time the data is made available or written at the requested location.
Cycle Time:
It is defined as the minimum time elapsed between two consecutive read requests.
a second is termed as data transfer rate or bandwidth. Usually it is measured in bits per
second.
Memory Management:
1. A facility for dynamic storage relocation that maps logical memory references into
physical memory addresses.
RAM:
A ROM is basically a hardwired combinational circuit, can be used for storing Micro
programs, Systems Programs, and subroutines. It can be categorised into Programmable
ROM (PROM), EPROMs (Erasable PROMs) and EEPROMS (Electrically Erasable
ROMs).
Magnetic disk:
It is also a storage device have high speed rotational surfaces coated with magnetic
material and accessed through read write mechanism.
Magnetic tapes:
Magnetic tape is a storage device with sequential access through read write mechanism.
CACHE MEMORY
These are small fast memories placed between the processor and the main memory to
increase the overall speed of memory references using mapping processes. Mapping
can be done by three ways.
1. Associative mapping.
2. Direct Mapping.
3. Set associative mapping.
Associative Memories
In associative memories any stored item can be accessed directly by assigning the
contents of the item in question, such as name of a person, account
number, number etc., as an address. associative memories are
also known as content addressable memories (CAMS). The entity
chosen to address the memory is known as the key.
Virtual Memory:
Virtual memory increases the available memory of computer has by enlarging the
"address space," or places in memory where data can be stored by using hard disk space
for additional memory allocation. It must be mapped back to real memory in order to
be used.