Beruflich Dokumente
Kultur Dokumente
By:
B V Karthik [160718735002]
M S V Sai Praneeth [160718735015]
B.Sai Preeth [160718735041]
M Abhiram Sri Karthik Chowhan [160718735049]
Subject:
COA
Faculty:
Maharshi Sanand Yadav
PAGE NO 1 OF 31
B.E. 3/4 (E.C.E) I- Semester Examination,
December 2017
PART -A
PAGE NO 2 OF 31
2.Write the Basic Computer instruction formats for the memory,
register and I/O reference instructions.[3M]
A)
PAGE NO 3 OF 31
3. Differentiate between Single precision and Double precision
IEEE Standard floating point representations.[2M]
A) Basically, single precision floating point arithmetic deals with 32
bit floating point numbers whereas double precision deals with 64 bit.
The number of bits in double precision increases the maximum value
that can be stored as well as increasing the precision (ie the number
of significant digits).
PAGE NO 4 OF 31
5.A Stack is organized in such a way that SP always points at the
next empty location on the stack. List the micro-operations for the
push and Pop operations. Assume stack grows downward.[3M]
PAGE NO 5 OF 31
6. Mention the ways that computer buses can be used to
communicate with memory and IO.[3M]
PAGE NO 6 OF 31
8. What do you mean by a page fault? Which hardware is
responsible for detecting the page fault?[2M]
9. A non pipeline takes 50ns to process a task. The same task can
be processed in a six segment pipeline with a clock cycle of 10ns.
Determine the Speed up ratio of the pipeline for 100 tasks. What is
the maximum Speed up that can be achieved?[3M]
A)
The speed up ratio of the pipeline for 100 tasks is 4.76
Explanation:Total Number of tasks "n" = 100
Time taken by non pipeline "Tn" = 50
nsTime period of 100 tasks = ntn
= 100 x 50 = 5000 ns
Number of segment pipeline "K" = 6
Time period of 1 clock cycle = 10 ns
Total time required = ( k + n - 1)tp
= ( 6 + 100 - 1)10
= 1050
nsSpeed up ratio " S" = 5000/1050
= 4.76
Basic Theory:
The binary decrementer decreases the value stored in a register by ‘1’.
For this, we can simply add ‘1’ to the each bit of the existing value
stored in a register. This is basically the concept of two's complement
used for subtraction of '1' from given data. It is made by cascading ‘n’
full adders for ‘n’ number of bits i.e. the storage capacity of the register
to be decremented. Hence, a 4-bit binary decrementer requires 4
cascaded full adder circuits. As stated above we add '1111' to 4 bit data
in order to subtract '1' from it.
Observed Values:
Following set of values were obtained in observation.
1. 0011 => 0010
2. 1010 => 1001
3. 1101 => 1100
4. 0010 => 0001
5. 0000 => 1111
PAGE NO 8 OF 31
b) Draw and explain the flow chart for an interrupt cycle. Write
the sequence of micro operations for the same.[5M]
A) Interrupt Cycle:
An instruction cycle (sometimes called fetch-and-execute cycle,
fetch-decode-execute cycle, or FDX) is the basic operation cycle
of a computer. It is the process by which a computer retrieves a
program instruction from its memory, determines what actions the
instruction requires, and carries out those actions. This cycle is
repeated continuously by the central processing unit (CPU), from
bootupto when the computer is shut down.
PAGE NO 9 OF 31
after the interrupt routine finishes, the PC-save-address is used to
reset the value of PC and program execution can continue
PAGE NO 10 OF 31
12. a) Using Booth's multiplication algorithm, multiply (6) x (-
8)showing all the steps.[6M]
A)Booths law multiplication:(6)x(-8)
PAGE NO 11 OF 31
b) Compare and contrast between horizontal and vertical
approach of microinstruction.[4M]
A) horizontal and vertical approach of microinstruction
PAGE NO 12 OF 31
13. a) What is the purpose of micro program sequencer? Explain
with block Diagram, how the sequencer present addresses to
control memory.[5M]
1. The main memory This memory is available to the user for storing
programs. The user's program in main memory consists of machine
instructions and data.
PAGE NO 13 OF 31
Each instruction initiates a series of microinstructions in control
memory. These microinstructions generate the microoperations to:
1. Fetch the instruction from main memory.
2. Evaluate the effective address.
3. Execute the operation specified by the instruction.
4. Finally, return the control to the fetch phase in order to repeat the
cycle for the next instruction.
PAGE NO 14 OF 31
For this reason it is necessary to use some bits of the present
microinstruction to control the generation of the address of the next
microinstruction. The next address may also be a function of external
input conditions.
While the microoperations are being executed, the next address is
computed in the next address generator circuit and then transferred into
the control address register to read the next microinstruction. Thus a
microinstruction contains bits for initiating microoperations in the data
processor part and bits that determine the address sequence for the
control memory.
The control data register holds the present microinstruction while the
next address is computed and read from memory. The data register is
sometimes called a pipeline register.
PAGE NO 15 OF 31
The system can operate without the control data register by applying a
single-phase clock to the address register. The control word and next
address information are taken directly from the control memory.
PAGE NO 16 OF 31
instructions Logical and Bit manipulation instructions Shift
instructions.
Arithmetic Instructions::
Arithmetic Instructions: The four basic arithmetic operations are
addition, subtraction, multiplication & division. Some computers have
only addition &subtraction instruction .The multiplication & division
must then be generated by means of Software Subroutines (Self
contained sequence of instruction that perform a computational task).
A list of Typical arithmetic instruction are as follows:-
3. Addition (ADD)
4. Subtract (SUB)
5. Multiply (MUL)
6. Divide (DIV) These instructions may be available for different types
of data .it may be binary, decimal, floating-point data. The mnemonics
for three add instructions that specify different data types are shown
below:
ADDI:- Add two binary integer numbers. ADDF:-Add two floating-
point numbers. ADDD:-Add two decimal numbers in BCD.
PAGE NO 17 OF 31
7. Add with Carry (ADDC):- A special carry flip- flop is used to store
the carry from an operation. The instruction “add with carry” performs
the addition on two operands plus the value of the carry from the
previous computational.:
8. Subtract with borrow(SUBB):- subtracts two words and a borrow
which may have resulted from a previous subtract operation.
9. Negate (2’s complement):-the negate instruction forms the 2’s
complement of a number effectively.
Logical and Manipulation instructions:
Logical and Manipulation instructions They are useful for manipulating
individual bits or a group of bits that represent binary-coded
information. The logical instruction consider each bit of the operand
separately and treat it as a boolean variable. Logical and bit
manipulation instructions are as follows:
1.Clear(CLR):- the clear instruction causes the specified operand to be
replaced by 0’s.
2. Complement (COM):-the complement instruction produces the 1’s
complement by inverting all the bits of the operands.
3.AND(AND)
4.OR(OR)
5.Exclusive-OR(XOR) The AND,OR,XOR instructions produces the
corresponding logical operations on individual bits of the operands.
6.Clear Carry (CLRC):-
7. Set Carry (SETC):-
8. Complement Carry (COMC): Individual bits such as a carry can be
cleared, set,or complement with appropriate instructions.
PAGE NO 18 OF 31
9. Enable interrupts (EI):- 10.Disable interrupts (DI):- Flips flops that
controls the interrupts facility and is either enabled or disabled by
means of bit manipulation instructions.
Shift instructions:-:
Shift instructions:- Instructions to shift the content of an operand Shifts
are operations in which the bits of a word are moved to the left or right.
the bit shifted in an end of the word determines the type of shift used.
Shift instruction may specify either Logical shifts, Arithmetic shifts ,or
rotate –type operations. Instructions are as follows:
PAGE NO 19 OF 31
The data is sent as a series of bits. A shift register (in either hardware
or software) is used to serialise each information byte into the series of
bits which are then sent on the wire using an I/O port and a bus driver
to connect to the cable.
At the receiver, the remote system reassembles the series of bits to
form a byte and forwards the frame for processing by the link layer. A
clock (timing signal) is needed to identify the boundaries between the
bits (in practice it is preferable to identify the centre of the bit - since
this usually indicates the point of maximum signal power). There are
two systems used to providing timing:
1. Asynchronous Communication (independent transmit & receive
clocks)
Simple interface (limited data rate, typically < 64 kbps)
Used for connecting: Printer, Terminal, Modem, home
connections to the Internet
No clock sent (Tx & Rx have own clocks)
Requires start and stop bits which provides byte timing and
increases overhead
Parity often used to validate correct reception
PAGE NO 20 OF 31
The interesting factor of the system would be the way it handles the
transfer of information among processor, memory and I/O devices.
Usually, processors control all the process of transferring data, right
from initiating the transfer to the storage of data at the destination.
This adds load on the processor and most of the time it stays in the
ideal state, thus decreasing the efficiency of the system.
To speed up the transfer of data between I/O devices and memory,
DMA controller acts as station master. DMA controller transfers data
with minimal intervention of the processor.
DMA Controller:
The term DMA stands for direct memory access. The hardware device
used for direct memory access is called the DMA controller. DMA
controller is a control unit, part of I/O device’s interface circuit, which
can transfer blocks of data between I/O devices and main memory with
minimal intervention from the processor.
DMA Controller Diagram in Computer Architecture
DMA controller provides an interface between the bus and the input-
output devices. Although it transfers data without intervention of
processor, it is controlled by the processor. The processor initiates the
DMA controller by sending the starting address, Number of words in
the data block and direction of transfer of data .i.e. from I/O devices to
the memory or from main memory to I/O devices. More than one
external device can be connected to the DMA controller.
PAGE NO 21 OF 31
DMA controller contains an address unit, for generating addresses and
selecting I/O device for transfer. It also contains the control unit and
data count for keeping counts of the number of blocks transferred and
indicating the direction of transfer of data.
PAGE NO 22 OF 31
15. a) Why page-table is required in a virtual memory system?
Explain different ways of organizing a page – table.[5M]
- The page table can be organized in two ways namely in the R/W
memory and by using associative logic.
PAGE NO 23 OF 31
b) What do you mean by memory hierarchy? Describe in detail.
[5M]
PAGE NO 24 OF 31
Properties of the technologies in the memory hierarchy
Adding complexity slows down the memory hierarchy.
CMOx memory technology stretches the Flash space in the
memory hierarchy
One of the main ways to increase system performance is
minimising how far down the memory hierarchy one has to go to
manipulate data.
Latency and bandwidth are two metrics associated with caches.
Neither of them is uniform, but is specific to a particular
component of the memory hierarchy.
Predicting where in the memory hierarchy the data resides is
difficult.
The location in the memory hierarchy dictates the time required
for the prefetch to occur.
PAGE NO 25 OF 31
16. a) Discuss SMID processor organization.[4M]
A) SIMD
SIMD stands for 'Single Instruction and Multiple Data Stream'. It
represents an organization that includes many processing units under
the supervision of a common control unit.
All processors receive the same instruction from the control unit but
operate on different items of data.
The shared memory unit must contain multiple modules so that it can
communicate with all the processors simultaneously.
PAGE NO 26 OF 31
b) Explain 4 possible hardware schemes that can be used in an
instruction pipeline in order to minimize the performance
degradation caused by instruction branching.[6M]
PAGE NO 27 OF 31
3. Execute
4. Memory access
5. Register write back
Processors with pipelining consist internally of stages (modules) which
can semi-independently work on separate microinstructions. Each stage
is linked by flipflops to the next stage (like a "chain") so that the stage's
output is an input to another stage until the job of processing
instructions is done. Such organization of processor internal modules
reduces the instruction's overall processing time.
A non-pipeline architecture is not as efficient because some CPU
modules are idle while another module is active during the instruction
cycle. Pipelining does not completely remove idle time in a pipelined
CPU, but making CPU modules work in parallel increases instruction
throughput.
An instruction pipeline is said to be fully pipelined if it can accept a
new instruction every clock cycle. A pipeline that is not fully pipelined
has wait cycles that delay the progress of the pipeline
PAGE NO 28 OF 31
17. Write any TWO of the following a) Stack organized instruction
formats b) Carry look ahead adder c) Vector processing[5*2=10M]
A) a) STACK CPU:
In this organization, ALU operands are performed only on a stack data.
This means that both of the ALU operations are always required in the
stack. The same stack is also used as the destination. In the stack, we
can perform insert and deletion operation at only one end which is
called as the top of a stack. So in this format, there is no need of
address because in this TOS becomes the default location.
In this organization, only the ALU operands are zero address operation
whereas data transfer instructions are not a zero address instruction.
The computable instruction format of STACK CPU is Zero Address
Instruction Format.
b) Carry-Lookahead Adder
A carry-Lookahead adder is a fast parallel adder as it reduces the
propagation delay by more complex hardware, hence it is costlier. In
this design, the carry logic over fixed groups of bits of the adder is
PAGE NO 29 OF 31
reduced to two-level logic, which is nothing but a transformation of the
ripple carry design.
This method makes use of logic gates so as to look at the lower order
bits of the augend and addend to see whether a higher order carry is to
be generated or not. Let us discuss in detail.
c)Vector Processing:
Vector processing performs the arithmetic operation on the large array
of integers or floating-point number. Vector processing operates on all
the elements of the array in parallel providing each pass is independent
of the other.
PAGE NO 30 OF 31
Vector processing avoids the overhead of the loop control mechanism
that occurs in general-purpose computers.
Vector processing operates on the entire array in just one operation i.e.
it operates on elements of the array in parallel. But, vector processing
is possible only if the operations performed in parallel are
independent.
Look at the figure below, and compare the vector processing with the
general computer processing, you will notice the difference. Below,
instructions in both the blocks are set to add two arrays and store the
result in the third array. Vector processing adds both the array in
parallel by avoiding the use of the loop.
*****THE END******
PAGE NO 31 OF 31