Sie sind auf Seite 1von 19

UNIT I

2 MARK QUESTIONS WITH ANSWERS


1. Distinguish between autoincrement and autodecrement addressing modes.
April/May 2010
Autoincrement
The effective address of the operand is
the contents of a register specified in an
instruction.
After accessing the operand, the contents
of the register is increment automatically
point to the next item.
Syntax: (Ri)+
The register contents are specified in
parenthesis followed by the + sign to
indicate that these contents are to be
incremented after the operand is
accessed.
The increment amount is 1 by default
Autodecrement
The contents of a register specified in the
instruction are first automatically
decremented and are then used the
effects address of the operand.
Syntax: -(Ri)
The register contents one specified in
patenthesis after sign that contents are
to be decremented before being used as
effective address.
The decrement amount is 1 by default

2. What is half adder?
A half adder is a logic circuit with two inputs and two outputs, which adds two bits at a
time, producing a sum and a carry.
3. What is full adder?
A full adder is a logic circuit with three inputs and two outputs, which adds three bits at a
time giving a sum and a carry.
4. Compare RISC with CISC Architecture April/May 2010
RISC Architecture
Reduced instruction set computer a
RISC system for reduced numbers
It provides high speed
It is load store architecture were
pipelining can be implemented easily

CISC Architecture
Complex instruction set architecture a
CISC system for reduced number
It provides low speed
System has complex instruction such
as direct addition between data in
two memory location
5. What is addressing mode?
The addressing mode is defined as the different ways in which the location of an
operand is specified in an instruction.
6. What are monadic instructions and dyadic instructions? Give examples for each.
Nov/Dec 2010
Monadic Instruction and Dyadic Instructions:
For the most part, the computer Hardware is limited to executing monadic and dyadic
operations.
Monadic: Takes a single operand. E.g: Taking the complement
Dyadic: Takes two operand. E.g: Adding two values.
7. What do you mean by assembler directives?
These are the instructions which direct the program to be executed. They have no
binary equivalent so they are called pseudo-opcodes. These instructions are used to define
symbols, allocate space for variable, generate fixed tables etc.
Ex: END, NAME
8. Define the Big-Endian and Little-Endian assignment. Nov/Dec 2010
The Big-Endian is used when lower byte address are used for the more significant
bytes (the left most bytes) of the word.
The Little-Endian is used for the opposite ordering, where the lower byte
addresses are used for the less significant bytes (the right most bytes) of the word.
9. What are the two methods of achieving the 2s complement?
Take the 1s complement of the number and add1.
Leave all least significant 0s and the first unchanged and then complement the remaining
bits.
10. Write the logic equations of a binary half adder. April/May 2011
Sum = a b
Carry = a b
11. Why data bus is bi-directional and address bus is unidirectional in most
microprocessor? May 2007
Data Bus
It is used to carry or transfer data to and from memory and I/O ports
Hence they are bidirectional
Hence CPU can read data on these lines from memory or I/O port and as well as it
can write data to memory or I/O port.
Contains 8, 16, 32 or more parallel signal lines
Address Bus
It is used to carry the address
It is unidirectional bus
The address is sent from CPU to memory & I/O port and hence unidirectional
Consists of 16, 20, 24 or more parallel signal lines
12. What is a carry look ahead adder?
The input carry needed by a stage is directly computed from carry signals obtained
from all the preceding stages i-1, i-2,.0, rather than waiting for normal carries to supply
slowly from stage to stage. An adder that uses this principle is a called carry look-ahead
adder.
13. What is an interrupt? April/May 2011
An interrupt is a request from an I/O device for service by the processor.
The processor provides the requested service by executing an appropriate interrupt
service routine.
14. What do you mean by multiprogramming or multitasking?
The operating system manages the concurrent execution of several application
programs to make best possible use of computer resources. This pattern of concurrent
execution is called multiprogramming or multitasking.
15. Give the basic performance equation.
The basic performance equation is given as T = N x S / R
T = It is the processor time required to execute a program
N = It is the actual number of instruction executions.
S = It is average number of basic steps needs to execute one machine instruction
R = It is the clock rate

16. What are condition code flags? What are the commonly used flags? April/May 2011
The processor has to keep track of the information about the results of various
operations for the subsequent conditional branch instructions. This is done by recording
required information in individual bits called conditional code flags.
N (Negative)
Z (Zero)
V (Overflow) and
C (Carry)

17. What is the advantage of using Booth algorithm? April/May 2011
It handles both positive and negative multiplier uniformly
It achieves efficiency in the number of additions required when the multiplier has a
few large blocks of 1s
The speed gained by skipping 1s depends on the data.
18. When can you say that a number is normalized?
When the decimal point is placed to the right of the first (non zero) significant digit,
the number is said to be normalized.
19. What is guard bit?
Although the mantissa of initial operands is limited to 24bits, it is important to
retain extra bits, called as guard bits.
20. What are the ways to truncate the guard bits?
There are several ways to truncate the guard bits:
Chopping
Von Neumann rounding, and
Rounding
21. Define Carry Save Addition (CSA) Process.
Instead of letting the carries ripple along the rows, they can be saved and
introduced into the next row at the correct weighted position. Delay in CSA is less than
delay through the ripple carry adder.
22. What is floating point numbers?
In some cases, the binary point is variable and is automatically adjusted as
computation proceeds. In such case, the binary point is said to float and the numbers are
called floating point numbers.
23. Write the algorithm for restoring division.
Do the following for n times:
Shift A and Q left one binary position
Subtract M and A and place the answer back in A
If the sign of A is 1, set q0 to 0 and add M back to A
Where, A Accumulator
M Divisor
Q Dividend
24. Why is wait for memory function completed (MFC) is needed when reading from or
writing to memory? April/May 2011
To accommodate the variability in response time, the processor waits until it
receives an indication that the requested read operation has been completed. This is
accomplished by a control signal called Memory-Function-Completed.
25. What is processor clock?
All operations and data transfers within the processor take place within time
periods defined by the processor clock.
26. Define datapath in the processor unit.
The registers, the ALU and the interconnecting bus are collectively referred to as the
datapath.
27. What are the basic steps required to execute an instruction by the processor?
The basic steps required to execute an instruction by the processor are:
(i) Fetch the contents of the memory location pointed to by the PC. They are loaded
onto the IR.
IR[PC]
(ii) Assuming that the memory is byte addressable, increment the contents of the PC by
4, that is
PC [PC] + 4
(iii) Carry out the action specified by the instruction in the IR.
28. Define branch instruction.
A branch instruction replaces the contents of the PC with the branch target address.
This address is usually obtained by adding an offset X, which is given in branch instruction.
29. How can we speed up the multiplication process.
There are two techniques to speed up the multiplication process:
The first technique guarantees that the maximum number of summands that must
be added is n/2 for n-bit operands.
The second technique reduces the time needed to add the summands.
30. When can you say that a number is normalized?
When the decimal point is placed to the right of the first (nonzero) significant digit, the
number is said to be normalized.



































16 MARK QUESTIONS WITH ANSWERS
1.Describe the role of system software to improve the performance of a computer. (16M)
April/May 2010
Software is defined as a program or group of programs.
System Software:
System software is a collection programs executed in order to perform the following functions,
Getting and interpreting user commands
Entering and editing application programs and storing them as files in secondary storage
devices
Managing the storage and retrieval of files in secondary storage devices
Running standard application programs such as word processor, speed sheets or games,
with data supplied by the user
Controlling I/O units to receive input information and produce output results
Translating programs from one language to another language (source language to
destination language)
Linking and running user written programs with standard library routines.
The following are some of the common system software.
Compiler: Translates high level language program into suitable machine language program
Text-Editor: Used to enter and edit application programs. The statements of the program are
accumulated in a file.
Operating system: Collection of routines used to control the sharing and allocation of resources to
individual application programs
The operating system is responsible for the following activities:
Process management
o Creating and deleting the user and system processes
o Suspending and resuming processes
o Providing mechanism for process communication, synchronization and deadlock
handling
Main memory
o to keep track of which parts of memory is currently being used and by whom.
Allocating and reallocating memory space as needed.
File management
I/O system management
Secondary storage management and so on.
Loader and Linker: Used to link and run user written program with existing standard library
routines.
To understand the basics of operating system consider a system with one processor, one disk and
printer.
The operating system shares the processor execution efficiently. This can be shiown by a time-line
diagram.










During t0 to t1:
(i) OS routine initiates loading the applications program from disk to memory
(ii) It waits until the transfer is completed
(iii) Execution control is passed to the applications program
During t2 to t3:
(i) OS routine initiates application program to load the disk.
(ii) It waits until the transfer is completed
(iii) Execution control is passed to printer
During t4 to t5:
The printer waits for the data to be written to its buffer from the file.
At t5, the OS may load and another application program.
During t4 to t5 the disk and the processor are idle and hence OS can load the next program into the
disk while the printer is printing.
During t0 to t1, the OS can arrange to print the previous program results while the current program
is being loaded from the disk.
This pattern of concurrent execution is known as multitasking/multiprogramming.

2. What are the special registers in a typical computer? Explain their purposes in detail.
(Or)
Explain the basic operational concepts of a computer. (16M) April/May 2010
In order to perform a given task, its appropriate program must be stored in a memory. The
individual instructions are brought from the memory into the processors and data to be used as
operands are also stored in the memory.
Eg: ADD LOC A, R0
This instruction will add the operand or data at location A to the data in a register Ro and
place the sum or result into the register Ro.
The data of LOCA will be unchanged, whereas the value on register Ro will be overwritten.
Transfer between the memory and processor are started by sending the address of the
location to the memory along with the control signals.














The processor contains a number of registers used for different purposes. Some of the registers are,
(i) Instuction Register(IR)
(ii) Program Counter(PC)
(iii) Memory Address Register(MAR)
(iv) Memory Data Register(MDR)
(v) General Purpose Regiter(GPR)
Instruction Register(IR):
This register holds the instruction that is executed right now
Program Counter(PC):
This is a specialized register. It contains the address of next instruction to be fetched and executed.
Memory Address Register(MAR):
This register holds the address of the location to be accessed.
Memory Data Register(MDR):
This register holds the data to be written into or read out of the location being addressed.
General Purpose Register(GPR):
The processor also contains general purpose register Ro to Rn-1. These registers can be used for
any kind of purpose.
Operating Steps:
The PC is set to point to the first instruction in the program.
The contents of PC is transferred to the MAR
Read control signal is set to the memory
The first instruction in the memory is read out
Then this instruction is placed in MDR
From MDR, the contents are transferred to IR
Hence at this point, the instruction is ready to be decoded and executed.
If ALU is to be involved, the following steps can happen
(i) If operand is in memory, address of this operand is sent to MAR and ready cycle is
initiated
(ii) After reading the operand, it is transferred from MDR to the ALU
(iii) ALU performs the desired operation
(iv) If the result is to be transferred into memory, send it to the MDR
(v) The address at which the result is to be store is sent to MAR and write cycle is initiated.
(vi) The content of PC is incremented
(vii) As soon as the execution of current instruction is completed, a new instruction fetch can
be started from step(i).
Interrupt driven input/output
In order to intervent the normal execution of programs, if some urgent servicing is required,
interrupts can be used.
An interrupt signal is a request from an input/output device for service by the processor
This special service is carried over by a program called as Interrupt Service Routine (ISP)
When an interrupt occurs the process saves the address of the next instruction and
branches to the first instruction in the ISR. After completing the ISR execution, the state of
the processor is restored by referring to the contents of PC and the interrupted program
may continue.


3. With a neat block diagram explain in detail the basic computer organization. (16M)
Nov/Dec 2010
Input unit
Memory unit
Arithmetic and Logic unit
Output unit
Control unit
Input unit:
Input units are used by a computer, which read the data.
The most commonly used input devices are,
Keyboard
It is a well known input device whenever a key is pressed, the corresponding letter or digit
is translated into corresponding ASCII code and transmitted over a cable either to a
memory or a processor.
Joysticks
Trackballs
Mouse
Microphones











Memory unit:
It is used to store programs and data. Two types of memory exist. They are namely,
(i) Primary Storage
It contains a large number of semiconductor storage cells, capable of storing a bit of
information
The bits of information are grouped into fixed size words
The word length of a computer is between 16-64 bits
Addresses are used to access the words from memory
Addresses are numbers that identifies locations
The memory is known as main memory in which program must reside
Cache is also a kind of memory which is used to access the data very soon. They are highly
coupled with the processor.
Eg: RAM, ROM
Advantages:
Small
Fast
Disadvantages:
Less Storage capacity
Costly
(ii) Secondary Storage
Secondary storage are used when large amount of data and programs have to be stored.
Eg:
Magnetic disks
Magnetic tapes
Optical disks
Arithmetic and Logic unit:
Most of all the operations of a computer are executed in the ALU of the processor
It can perform arithmetic operations like addition, subtraction, multiplication, division and
also the logical operations like AND, OR, NOR operations.
For all these operations, the operands must be brought into the processor and stored in
high speed storage elements called register. The results are also placed in these registers
from which they can be transferred to and from memory and input/output devices.
Output unit:
Output units are used to send the processed results to the user.
Some of the output units are,
Printer
Graphic displays
CRT displays
Card-readers
Control unit:
It is used to coordinate the operations of the input, output, memory, ALU in some way. It
coordinates the operation of all the units using control signals like timing signals.
Timing signals are the signals determining the time when a given action must take place.
A large set of control lines carriers the signals used for timing and synchronization of events
in all units.

4. Explain in detail the different types of instructions that are supported in a typical
processor. (16M) Nov/Dec 2010
Instructions are sequence of small steps to accomplish a task.
Eg: Addition of two numbers
An instruction will be capable of performing the following operations namely,
(i) Data transfer operations
(ii) Arithmetic and logic operations
(iii) Program sequencing and control
(iv) Input/Output transfers
Register Transfer Notation
Data or information transfers takes place between memory locations, processor registers or
registers in the I/O subsystem.
Like memory locations are addressed by addresses, processor registers are named as Ro,
R1,... and I/O registers are named as DATA IN, DATA OUT.
The contents of the location are denoted by placing square brackets around the name of the
location.
R1 [LOC]
Eg: R3 [R1]+[R2]
Address of Register Contents of the Register
Where R1, R2 and R3 are processor registers.
Assembly Language Notation
The data transfer between the memory location to processor register R1 is specified by the
statement
MOVE LOC, R1
Mnemonic Source operand Destination operand
set of instructions form a program.
part of the instruction called the opration code, or opcode tells what operation is to be
performed.
the instructionn also contains the location of data used by the instructions.
Instruction Formats
(i) Three address instruction
(ii) Two address instruction
(iii) One address instruction
(iv) Zero address instruction
(i) Three address instruction
In this format, there will be two source operands and a single destination operand.
Syntax: Operation source1, source2, destination
Eg: ADD A, B, C
Here A and B are called source operands whose contents will be added and the result will be
stored in the destination operand C.
(ii) Two address instruction
In this type, each instruction will have two operands.
Syntax: Operation source, destination
Eg: ADD A, B
The contents of location B is added to the contents of location A and result is stored in the
location B.
The operation,
C [A] + B can be implemented as
MOVE B, C
ADD A, C
(iii) One address instruction
In one address instruction, only one memory operand will be specified.
The second operand will be a processor register called as accumulator.
In this the operand may be a source or destination.
Eg: ADD A
The contents of memory location A will be added to the contents of accumulator and the
result will be stored in the accumulator.
Using this kind of instruction, the operation C[A]+[B] can be performed by the following
sequence.
LOAD A
ADD B
Store C
The contents of memory location A is loaded into the accumulator. The contents of memory
location B is added to the contents of the accumulator and the result is stored in
accumulator. Hence in both these cases, the destination is accumulator.
(iv) Zero address instruction
In Zero-address instruction the locations of all operands are defined implicitly.
Eg: MOVE (SP)+ , ITEM

Instruction Types
Opcode: Nature of operation done by the instruction
Data: type of data called binary and decimal
Operand location: Memory, register
Operand addressing: Method of specifying the operand location(address)
Instruction length: One byte, Two byte
Number of address field: Zero address, single address, two addresses

Instruction Execution and Instruction Sequencing
(i) Instruction Sequencing
Consider the task C [A] + [B]
The program counter(PC) register present in the processor holds the address of the
instruction to be executed next
The control unit gives the read signal to the memory
The instruction at the address specified by PC is fetched from memory and copied to the
instruction register and the program counter is incremented to point to the next instruction
in memory. This process of fetching instructions one at a time in order of increasing
addresses is called straight-line sequencing.
The control unit decodes the instruction in the instruction register to determine which
operation is to be performed and the number of operands required to perform the
operation
The operands address is calculated by the processor and fetches the operands from the
memory during which the control unit is responsible for issuing read/write signal to the
memory
Then the processor executes the instruction
















Branching
It is the process of jumping from one instruction to another desired instruction bypassing all the
other instructions.
(i) Conditional Branch
Branching takes place only when a particular condition is satisfied
(ii) Unconditional Branch
Branching takes place without checking any condition. It simply branches to the
desired location
Conditional Codes
Here the branch instruction,
Branch > 0 Loop
will check the value in the register R1 by using information about results of various
operations.
This is accomplished by means of conditional code flags.
Conditional code flags are the individual bits that record the required information as a
result of various operations.
These flags are grouped together in a special processor register known as status register or
conditional code register.
Four commonly used flags exist namely
N(negative) flag which is set to
1-if result is negative
0-if result is positive
Z(zero) flag which is set to
1-if result is zero
0-if result is non zero
V(overflow) flag which is set to
1-if overflow occurs
0-if overflow does not occur
C(Carry) flag which is to
1-if there is carry as result of any operation
0-if there is no carry as a result of any operation


5. Describe the different classes of instruction format with example and different addressing
modes. (16M)
The different ways in which the location of an operand is specified in an instruction are
called addressing modes.
Types of Addressing Modes:
The following are the generic addressing modes namely,
Register addressing mode
Absolute (or) direct addressing mode
Immediate addressing mode
Indirect addressing mode
Indexed addressing mode
Relative addressing mode
Auto increment addressing mode and
Auto decrement addressing mode
Register addressing mode
The operand is the contents of a processor register. The name or address of the register is
given in the instruction.
Eg: Move R1, R2
Advantages:
Register are faster than memory. Hence operands can be accessed faster.
It requires only few bits to access the register contents
Disadvantage:
Decision must be made as to which operands and which intermediate results are
to be kept in the limited number of registers and which are keep in main
memory.
Application:
When the operand is in register
Absolute or direct addressing mode
The operand is in a memory location and the address of the location is given explicitly in the
instruction.
Eg: MOVE LOC, R2
Application:
It is used to represent global variables in a program
It is also used to handle static data
Disadvantage:
Limited address space
Immediate addressing mode
The value of the operand is given explicitly in the instruction itself.
Eg: MOVE #200, R0
Advantage:
No memory fetch operation is needed
Disadvantages:
Restricts the operand to a number that fit in an address field
Eg: MVI A, 10
ADD 5 ; add 5 to contents of accumulator
Applications:
It is used to handle constant values
It is used to test for some bit pattern
It is used to increment a counter
Indirect addressing mode
The instruction does not give the operand or its address explicitly. Instead of that, it
provides information from which the operand or address can be determined.
Eg: ADD (R2), R0
There are two types of indirection is possible namely,
(i) Indirection through register
(ii) Indirection through memory location
(i) Indirection through register
Eg: ADD (R1), R0
The processor will read the register content, which will not be value directly.
Instead it will be the address in which the value will be stored.
(ii) Indirection through memory location
Eg: ADD (A), R0
The processor first reads the contents of memory location A, then requests second
read operation using the value as an address to obtain the operand.










Application:
It is used to implement pointers in high level languages
When absolute addressing is not available, this addressing mode through registers
makes it possible to access global variables.
Indexed addressing mode
The effective address of the operand is generated by adding a constant value to the contents
of a register.
The content is also known as offset. The offset can be given as a constant or it can be saved
in a register called index register.
Syntax: X(Ri)
Where X denotes the constant value contained in the instruction and Ri is the name of the
register.
Offset given as constant:
Eg: ADD 20(R1), R2
The index register R, contains the address of memory location and 20 defines the
offset from this address to the location where the operand is found.
Offset given in index register:
The constant corresponds to the memory address and the contents of index define
the offset.








Application:
This mode is used to index the elements in an array.
Variation of indexed Addressing mode:
(i) Base with index addressing mode
The second register called as base register may be used to contain the offset X.
Eg: (Ri, Rj)
EA = Ri + Rj thus effective address of the operand is the sum of the contents of registers
Ri and Rj.
Advantage:
It provides more flexibility in accessing operands.
(ii) Base with index and offset addressing mode
Two registers along with a constant are used.
Eg: X(Ri, Rj)
EA = X + (Ri + Rj)
Advantage:
It used to implement a three-dimensional array
Relative addressing mode
The effective address is determined by the index mode using a program counter in place of
general-purpose register R1.
Application:
It is used to access data operands
It is also used to specify target address in branch instruction
Eg: Branch 0 > Loop
Auto increment addressing mode
The effective address of the operand is the contents of a register specified in an instruction.
After accessing the operand, the contents of the register is incremented automatically point to the
neat item in a list.
Eg: (Ri)+
The increment amount is 1 by default.
Auto decrement addressing mode
The contents of a register specified in the instruction are first automatically decremented
and are then used the effects address of the operand.
Eg: - (Ri)
The decrement amount is 1 by default.






6. Explain the basic input/output operations with suitable examples. (16M)
The input/output operations are essential and the way they are performed can have
important effect on the performance of the computer.
Two ways of performing input/output tasks exist namely
(i) Program controlled input/output
(ii) Memory mapped input/output
(i) Program controlled input/output
It is a simple way to perform input/output tasks.
It consider that the address issued by the processor always refer to memory locations
Consider a task that reads in character input from a keyboard and produces a character
output on a display screen
There will be different in speed between the processor and input/output devices. This
because, the rate of data transfer from the keyboard is limited by the typing speed of the
user and data transfer rate of output device is higher
Hence a mechanism is needed to synchronize the data transfer between the processor and
input/output device. It uses buffers such as DATA IN, DATA OUT and signals like SIN and
SOUT.











Input Operation:
To move a character from the keyboard to the processor, the following actions can take
place.
The character code for a key that is striked is stored in a 8 bit register DATA IN
A status control flag SIN is set to 1, to inform the processor that a valid character is in DATA
IN
The program monitors that SIN is set to 1
The processor reads the contents of DATA IN
After transferring the contents SIN is set to 0
The process continues when a second character is read
o READ WAIT branch to READ WAIT if SIN = 0
o Input from DATA IN to R1
Output Operation:
When characters are transferred from the processor to the display the following happens
The SOUT is set to 1
When the program monitors SOUT=1, it informs the processor that the display is ready to
receive a character
It transfers the character code to DATA OUT, and set SOUT=0
When display is ready to receive a second character, it sets SOUT=1, and the process
continues.
o WRITE WAIT branch to WRITE WAIT if SOUT=0
o OUTPUT from R1 to DATA OUT
(ii) Memory Mapped Input/Output:
When the addresses issued by the processor are used to refer to the peripheral
device buffer registers, that technique or arrangement is known as memory-mapped
input/output.
Advantages:
No special instructions are needed to access the register contents.
Data transfer can be done by using simple instruction such as MOVE, LOAD, STORE
Instead of SIN and SOUT, OUTSTATUS and INSTATUS bits registers are used.
Input operation:
READWAIT Testbit #3, INSTATUS
Branch=0 READWAIT
MoveByte DATAIN, R1
Output operation:
WRITEWAIT Testbit #3, OUTSTATUS
Branch=0 WRITEWAIT
MoveByte R1, DATAOUT
The test bit instruction is used to test the state of one bit in the destination location.
If it is equal to zero, then the condition is true and branch is made to the WAIT loop when
the device is ready and bit tested is 1, the data can be read or written into the buffer.
The other methods are:
(i) Interrupt drive input/output
(ii) Direct memory access
7. Write short notes on software performance and memory locations and address. (16M)
Performance:
It is the ability of the computer to quickly execute a program.
The speed at which the computer executes a program is decided by the design of its
hardware and machine language instructions.
The programs are usually written in high-level language and so the use of compliers affects
the performance.
Basic Performance Measures:
The speed of operation of a system
1. Response time
It is the spent to complete an event or an operation
It also referred to as the execution time or latency
2. Throughput
It is the amount of work done at a given time
That is, the amount of processing that can be accomplished during a given
interval of time
It also referred to as bandwidth
The time spent from the start of execution of a program to its completion is called Elapsed
time, which is a measure of the performance of the entire computer system.
The performance of the processor is measured only by considering the periods during
which the processor is active.
The processor time depends on the hardware involved in the execution of each machine
instruction. The hardware comprises the processor and the memory connected by a bus.





Cache memory as a part of the processor unit
To examine the flow of program instructions and data between the memory and the
processor.
Basic Performance Equation:
To understand basic performance equation, it is necessary to understand what is meant by
processor clock.
Processor clock:
o Processor circuits are controlled by a timing signal called a clock.
o The clock defines regular time intervals, called clock cycles.
o The length of one clock cycle is an important performance parameter.
o Performance parameter is denoted by P and its inverse is known as Clock rate
R = 1/P
Clock rate is measured in cycles per second.
Clock rate is denoted in Hertz(Hz)
o The basic performance equation is given by
N x S
T = __________
R
T Processor time
N No. of instructions executed actually
S Basic steps needed to execute one instruction
R Clock rate
o To achieve high performance, it is necessary to reduce T by reducing N, S and
increasing R.
o N is reduced, if the source program is compiled into fewer machine instructions.
o S can be reduced, if basic steps are smaller or the instruction executions are
overlapped.
o R can be increased by using a higher-frequency clock i.e., by reducing the time
required to complete a basic execution step.
o But changing any one of these parameters will affect the other.
1. Ways to increase S
2. Ways to increase R
3. Instruction Set
4. Ways to reduce N
1. Ways to increase S
Pipelining:
It is process of overlapping the execution of successive instruction in
order to improve the performance substantially.
It allows next instruction to be fetched while executing the previous
instruction
Increases the rate of executing instructions significantly and causes the
value of S to approach 1.
Superscalar operation:
It is the process of executing several instructions in every clock cycle
Using this technique, the value of S can be reduced to less than one.
2. Ways to increase R
By improving the IC technology.
3. Instruction Set
Simple instructions required a small number of basic steps to execute.
Complex instructions involve a large number of steps.
4. Ways to reduce N
A compiler is a program that translates a high-level language program
into a sequence of machine language instructions.
An optimizing compiler can reduce the total number of clock cycles (N x
S) needed to execute a program.
Basic Performance Measurement:
Performance of a computer can be measured efficiently by using benchmark
programs.
Benchmark programs used to compare the performance of a program by running
it in two different systems.
o The program is executed in real computer
o As well as in a computer selected as reference.
SPEC (System Performance Evaluation Corporation) is a non-profit organizes that
supplies benchmark program.
Running time on the reference computer
SPEC rating = _______________________________________________
Running time on the computer under test
Overall SPEC rating for the computer
SPEC rating = (

1)
1/n
Where n is the number of programs.
Memory Locations and addresses
Eg: 24 bit address generates an address space of 2
24
locations.
2
24
= 16 megabytes where 1MB=2
20

Character:
Letters of the alphabet, decimal digits
Represented by codes that are usually 6 to 8 bits long
General code is ASCII(American Standard Code for Information Interchange)
Four Characters
8 bits 8 bits 8 bits 8 bits
Instruction:
Two part of the word
- Specifies the operation to be performed
- used to specifies the operation to be performed
Bytes are grouped into words
16-bit machine will have 16 bit registers and instruction for manipulating 16 bit
words and so on.
Byte addressability:
8 bits but the word length ranges from 16 to 64 bits.
Big-Endian and Little-Endian Assignments:
Bytes in a word can be numbered from left to right or right to left
Big-Endian:
Used when lower byte addresses are used for the MSB(Most Significant Byte) [the
left most bytes] of the word.
Little-Endian:
Used when upper byte addresses are used for the LSB(Least Significant Byte) [the
right most bytes] of the word.




8. (a) Explain in detail the execution of a complete instruction. (10M) Nov/Dec 2010
Consider an instruction
ADD (R2), R1
which adds the contents of a memory location pointed to by R2 to register R1.
Instruction cycle will be







The sequence of control steps required to perform these operations for single bus
organization is as follows:
Step Action Comments
1 PCout, MARin, Read, Select 4, Add, Zin Load PC in MAR issue Read request to memory.
Select 4 to Y. Do the add operation. Result stored
in Z.
[PCPC+4(word size)
2 Zout, PCin, Yin, WMFC
3 MDRout, IRin

1

Das könnte Ihnen auch gefallen