Coa 2018 S
Coa 2018 S
2. Write down the functionality of PC,MAR,MDR,IR, GPR(R0 to R n-1). Also explain how an
instruction SUB R0, LocA (meaning [R0]-[LocA]=[LocA] ) is executed by the processor with
neat diagram. [2+3]
Ans:
Functionality of PC,MAR,MDR,IR, GPR(R0 to R n-1) [2 Marks]
PC It is a counter.
It contains the address of the instruction which is being currently executed.
It keeps track of the execution of the program
MAR and MDR are two special registers to communicate with the memory.
MAR It holds the address of memory to or from which data has to be transferred.
MDRIt contains the data that is written into or read from memory.
IR The instruction is decoded here. So the processor comes to know what type operation required and
where from it gets the operand for the operation.
R0 to R(n-1) They are general purpose registers which are used to keep temporary results or used for
special purpose.
How an instruction SUB R0, LocA (meaning [R0]-[LocA]=[LocA] ) is executed by the processor
with neat diagram.[3 Marks]
Diagram:[1 Mark]
Memory
Processor
MDR
MAR CONTROL UNIT
R0
PC ALU
R1
IR
R n-1
4. An instruction is kept in memory at an address 300 and the memory address 301 occupies
the address field of the instruction which is shown below. The Opcode is used to add the
content of accumulator with an operand. The content of accumulator is 100 and the content
register R 500 is 400. Find out the content of accumulator and Effective address of operand if
the addressing mode is
(i) immediate (ii) direct (iii) register direct (iv) indirect (v) register indirect [5]
Address Instruction
300 Opcode Mode
301 500
400 700
500 600
600 800
Ans: [each mode carries 1 mark]
Given [Acc]=100
[R 500 ]=400
(i) Immediate mode
E.A= Not Required(Data is part of the instruction)
[Acc]= 100+500=600
(ii) Direct mode
E.A= 500
[Acc]= 100+600=700
(iii) Register direct mode
E.A= R 500
[Acc]= 100+400=500
(iv) Indirect mode
E.A= [500]=600
[Acc]= 100+800=900
(v) Register indirect mode
E.A= [R 500]=400
[Acc]= 100+700=800
5. Discuss the functionality of various parts of digital computer with neat diagram. [5]
Ans: [diagram with explanation carries 5 marks ]
A digital computer consists of five basic functional units. They are
(1)Input Unit
(2)Output Unit
(3)Memory
(4)ALU
(5) Control Unit I/O ALU+ Control
Block diagram Memory
6. Discuss the factors that affect the performance of the computer. If a 8GHz computer takes
7 clock cycles for ALU instructions, 11 clock cycles for branch instructions and 6 clock cycles
for data transfer instructions. Then Find the total time taken by the computer to execute the
program that consists of 10 ALU instructions, 5 branch instructions and 5 data transfer
instructions. [5]
Ans: [Factors must contain explanation]
The factors that affect the performance of the computer are as follows
a) Design of compiler which generates the object code
b) Design of instruction set of processor
c) Design of hardware like processor, disk, I/O devices
Processor frequency= 8GHz
Clock cycle time = 1/8GHz=1/8×10 9 = 0.125 nano second
program consists of 10 ALU instructions, 5 branch instructions and 5 branch
instructions.
For ALU instructions= 10 ×7= 70 clock cycles
For branch instructions=5×11=55 clock cycles
For data transfer instructions=5×6=30 clock cycles
Total cycles needed =70+55+30=155 clock cycles
Total Time= 155×0.125 nano second=19.375 nano second
Input
Memory Processor
Output
b) Big Endian v/s Little Endian Scheme[2.5 Marks]
Ans:
Big Endian (Student must give example)
The most significant byte is stored in the lowest byte address
Little Endian(Student must give example)
The least significant byte is stored in the lowest byte address
__________________________X______________________________