COA_Unit-2_Basic Computer Organization and Design
COA_Unit-2_Basic Computer Organization and Design
SEMESTER- 4
BRANCH- CSE/CSE[AIML]
GTU SYLLABUS
Sr. No. Content % Weightage
1 Computer Data Representation 4
Basic computer data types, Complements, Fixed point representation, Register
Transfer and Micro-operations:
Floating point representation, Register Transfer language, Register Transfer,
Bus and Memory Transfers (Tree-State Bus Buffers, Memory Transfer),
Arithmetic Micro-Operations, Logic Micro-Operations, Shift Micro-
Operations, Arithmetic logical shift unit
7 Computer Arithmetic 4
Introduction, Addition and subtraction, Multiplication Algorithms (Booth
Multiplication Algorithm), Division Algorithms, Floating Point Arithmetic
operations, Decimal Arithmetic Unit.
8 Input-Output Organization 4
Input-Output Interface, Asynchronous Data Transfer, Modes Of Transfer,
Priority Interrupt, DMA, Input-Output Processor (IOP), CPUIOP
Communication, Serial communication.
9 Memory Organization 6
10 Multiprocessors 4
Characteristics of Multiprocessors, Interconnection Structures, Inter-
processor Arbitration, Inter-processor Communication and Synchronization,
Cache Coherence, Shared Memory Multiprocessors.
• The simplest way to organize a computer is to have one processor register(AC) and
an instruction code format with two parts.
The first part specifies the operation (opcode) to be performed and the second
specifies an address (operand).
• The memory address tells the control where to find an operand in memory.
• This operand is read from memory and used as the data to be operated on together
with the data stored in the processor register.
Question: Explain the direct and indirect address with example and compare them.
Solution:
Direct & Indirect Addressing of Memory
• If the second part of an instruction format specifies the address of an operand, the
instruction is said to have a direct address.
• In Indirect address, the bits in the second part of the instruction designate an
address of a memory word in which the address of the operand is found.
• The Memory unit has a capacity of 4096 words, and each word contains 16 bits.
• The Data Register (DR) contains 16 bits which hold the operand read from the
memory location.
• The Memory Address Register (MAR) contains 12 bits which hold the address for
the memory location.
• The Program Counter (PC) also contains 12 bits which hold the address of the next
instruction to be read from memory after the current instruction is executed.
• The Accumulator (AC) register is a general purpose processing register.
• The instruction read from memory is placed in the Instruction register (IR).
• The Temporary Register (TR) is used for holding the temporary data during the
processing.
• The Input Registers (IR) holds the input characters given by the user.
• The Output Registers (OR) holds the output after processing the input data.
Basic computer registers connected to a common bus
The reason to choose the instructions in each category is fundamental for building fast,
efficient computers that optimize memory and processing resources. It specifies the
following supported capabilities:
• instructions
• data types
• processor registers
• main memory hardware
• input/output model
• addressing modes
It sets the rules for the hardware and software interface, defines what the CPU does and
ensures compatibility.
Question: Explain the following instructions 1) CLA 2) ISZ 3) INP
Solution:
1) CLA
• This instruction will perform operations on registers rather than memory addresses
• It will clear the accumulator
2) ISZ
• The Increment if Zero (ISZ) instruction increments the word determined by
effective address.
• If the incremented cost is zero, thus PC is incremented by 1. A negative value is
saved in the memory word through the programmer.
• It can influence the zero value after getting incremented repeatedly. Thus, the PC
is incremented and the next instruction is skipped.
3) INP
• The INP instruction transfers the input information from INPR into the eight least
significant bits of accumulator and clears the input flag to 0.
• SC is incremented with every positive clock transition, unless its CLR input is
active.
• This procedures the sequence of timing signals T0, T1, T2, T3 and T4 , and so on. If
SC is not cleared, the timing signals will continue with T5, T6, up to T15 and back
to T0.
• The last three waveforms shows how SC is cleared when D3T4 = 1.
• Output D3 from the operation decoder becomes active at the end of timing signal
T2.
• When timing signal T4 becomes active, the output of the AND gate that
implements the control function D3T4 becomes active.
• This signal is applied to the CLR input of SC.
• On the next positive clock transition the counter is cleared to 0.
• This causes the timing signal T0 to become active instead of T5 that would have
been active if SC were incremented instead of cleared.
Control Organization
Hardwired Control
• The control logic is implemented with gates, flips-flops, decoders and other digital
circuits.
• It can be optimized to produce a fast mode of operation.
• It requires changes in the wiring among the various components if the design has
to be modified or changed.
Microprogrammed Control
• The control information is stored in a control memory.
• The control memory is programmed to initiate the required sequence of micro-
operations.
• Any required changes or modifications can be done by updating the microprogram
in control memory.
TOPIC:5 Instruction Cycle
Question: Which are the different phases of Instruction Cycle? Describe Register
transfer for fetch phase with its diagram.
Solution:
A program residing in the memory unit of the computer consists of a sequence of
instructions. In the basic computer each instruction cycle consists of the following phases:
1. Fetch an instruction from memory.
2. Decode the instruction.
3. Read the effective address from memory if the instruction has an indirect address.
4. Execute the instruction.
• After step 4, the control goes back to step 1 to fetch, decode and execute the next
instruction.
• This process continues unless a HALT instruction is encountered.
Fetch & Decode
• PC is loaded with the address of the first instruction in the program.
• The micro-operations for fetch and decode phases are as follows:
1. Place the content of PC onto the bus by making the bus selection inputs
equal to 010.
2. Transfer the content of the bus to AR by enabling the LD input of AR.
It is necessary to use timing signal T1 to provide the following connections in the bus
system.
1. Enable the read input of memory.
2. Place the content of memory onto the bus by making S2SISo = Ill.
3. Transfer the content Of the bus to IR by enabling the LD input Of IR.
4. Increment PC by enabling the INR input of PC.
The three instruction types are subdivided into four separate paths. The selected
operation is activated with the clock transition associated with timing signal T3. This
can be symbolized as follows:
ADD: ADD to AC
• This instruction adds the content of the memory word specified by the effective
address to the value of AC. The sum is transferred into AC and the output carry
Cout is transferred to the E (extended accumulator) flip-flop.
LDA: Load to AC
• This instruction transfers the memory word specified by the effective address to
AC.
STA: Store AC
• This instruction stores the content of AC into the memory word specified by the
effective address.