








































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































































Computer is a machine which accepts input information in the digitized form, process the input according to a set of stored instruction and gives an output in form understandable by humans.
Function unit : computer consist of
Input
Output
Arithmetic and logic
Control
Memory
Bus
I/O Processor
Performance:- performance is the ability of the computer and to quickly exact the program. the speed at which the computer execute the program OS design by its hardware and machine language instruction.
Basic performance mesure:-
The speed of operator of an com is generally decided by
i) Response time ii) Through put.
G = 200 time el time. C = a+b
Performance parameter:-
The basic performance parameter equation
T = (NxS)/R
Where T performance parameter of an application program N number of machine language instruction required to complete the execution required to complete the execution if an program S. Average num of basic steps required are clock rate of the processor in cycle per second.
Pipe lining and parallel processing:-
C:\ DIR:→ abc
In case of pipe lining of the instruction to a computer have executed one after another. But in case of parallel processing multiple functional unit are used to create a parallel path. True which different on completed instructions can be execution. Thus due to state of execution several instruction in every where clock cycle.
Measuring performance:-
Response time and true pull are independent entities. When measuring the performance of a system.
Performance = 1/execution time
CPU performance equation:-
The CPU are construct using the clock running at a constant time.
CPU time = CPU clock cycle for program x clock cycle time
Cycles per instructions:-
Program consists of a number of CPU instruction be represented by instruction count.
CPI = instruction Count X Clock Cycle time / clock rate
Memory location and address:-
15 A 100 100 101
110 111 1000
r index r (10)
r (1) ↓ 10
r (2) ↓ 21
r (3) ↓ 50
--- r (10)
100
The maximum size of the memory that can be used in nay computer are determine by the addressing skim. A 16 bit computer can generate a 16 bit address capable of addressing upto 2^16 K (kilobit) memory locations
232 = 4 GB
Memory operations:-
Throughput:-
Throughput is the amount of work done per unit of time. i.e. the amount of processing that can be accomplished during a given interval of time.
It is also called as bandwidth of the system. In general, faster response time leads to better throughput.
Elapsed time:-
Elapsed time is a time spent from the start of execution of the program to its completion is called elapsed time. This performance measure is affected by the clock speed of the processor and the concerned input output device.
A nearly measure of computer performance has the rate at which a given machine executed instruction. This is calculated by dividing the no. of instruction and the time required to run the program
CPI/IPC
CPI – Clock cycle per Instruction
IPC – Instruction per cycle.
It is another measuring that which is calculated as the number of clock cycle required to execute one instruction (cycle per instruction) by the instruction executed per cycle.
Speed up:-
Computer architecture use the speed up to describe the performance of architectural charges as different improvement are made to the system.
It is defined as ratio of execution time before to the execution time after the charge.
Speed up = execution time before Execution time after = performance of system after Execution time before
Amdahl’s law:-
This law states that “performance improvement to be gained by using a faster mode of execution is limited by the fraction of time the faster made can be used”.
Amdahl’s law defines the term speed up.
Speed up = performance of entire task using enhancement Performance of in time task without using enhancement
Performance = 1. Execution time
Speed up = execution time without using enhancement Execution time with using enhancement
Factors affecting speedup are as follows:
i) The fraction of computation time in the original machine can be modified to use the advantage of the enhancement. ii) This is called fraction enhanced which is always less than or equal to one. Fraction enhanced ≤ 1 Ex: if a program that usually it will take 30 seconds for execution using the enhancement Fraction enhanced = 30/
Speed up > 1
Speed up enhanced = time in original mode Time in enhance mode
Ex. Let us a program takes 5 second in enhanced mode while it takes 10 second earlier.
So, speedup enhanced = 10/8 = 2
The new execution time can be calculated as follow:
Execution time new =
Execution time original X ((1-fraction enhanced) + fraction enhanced/speedup enhanced)
The speedup overall = execution time original/execution time new
Speedup overall = 1/(1-fraction enhancement)+fraction enhances/Speedup enhance
Performance parameter
The basic performance equation is given by T = NxS/R
Where Q.t. – Performance parameter of an application program.
NS – No. of instruction required to complete the exe^2 of a program.
The types of addressing modes are available with instruction set.
Types of operands:-
Machine operations depends on the types of data being process. operand can be one of the following.
Address:- Address are the for of number that represent specific location in memory.
Number data type:- Number data type are used by all machine language data type fix point floating point and decimal.
Character:- character are entered using ASCIIC. Encoding also another including character i.e. EBCDIC (Extended binary coded decimal inter change code) used for character.
Logical date:-
The Boolean data can be stored using 1(True) 0(false).
OPcode types:-
1. Arithmetic – add supply multiply divide 2. Logical – AND, OR, NOT 3. Data transfer – move, store, load, push, pop 4. Conversion – translate, convert 5. system control – reserve for operating system 6. Input output control – Input-readout – white. 7. Control transfer – Jump, returned, skip, halt.
Instruction format:- Opcode 4 bit Op1 Op 6 bit 6 bit
An instruction is read into the instruction register (IR).
OP Code Operation code Address of Operand → Format of instruction
Operation Code (OP Code) This specifies the operation to be performed. e.g. :- Add, sub & Load Address of Operand:- The operand specified by the OP code may involve one or more sources for operands. These operands are the inputs for operations. Classification of Instruction:- Instruction are classified depending upon the number of operand address they contain such as classification is follows:-
binary code of register B.
(3) In register indirect addressing address of the operand is given indirectly. The contents of the register or register pair are the address of operand.
A, M =
Load H-L pair with 2400 H move the content of the memory location (M) whose address is in H-L pair )1, 0, 2400 H), to the contents of the accumulation.
In this example MOV A, M is an example of register indirect addressing. The address of the operand is not directly given but the address of the memory location is stored in H-L pair, which has been specified by the earlier instruction LXIH, 2400 H.
whose address is in H-L pair to the contents of accumulator. Here ADDM is an example of indirect addressing.
(4) Immediate addressing:- In immediate addressing the operand is given in the instruction it self. e.g. - # MV1, 06 move 06 to accumulator
(5) Base register addressing:- In many computer system it becomes necessary to move programme from one place to another, in the memory. To solve this problem many computer use base register. The addressing mode employing a base register is known as Base register. In this mode of addressing an offset is added to the contents of the base register to obtain the effective address.
Instruction R
Operand
Memory
Instruction R
Register
Operand
Operand
Instruction
The instruction contain an offset. When a program is moved into memory. The starting address is placed in the base register.
(6) Indirect addressing:- In indirect addressing the address field of the instruction gives the address of the instruction gives the address of the operand. Control fetches the instruction from memory and uses its address port to access memory register to read the effective address. e.g. - # IAD 302 – Indirect add the number whose address is stored at the address 302.
Address
OP Code Register Address A
Instruction
Pointer to^ Operand operand
Register
Instruction
A
Operand
Register in directing addressing:- The address field refers to a resister and the effective address is the address given by the register given by of the address field.
Stack addressing:- Stack addressing in form of addressing.
Questions:
**1. Explain addressing mode.
Basic Arithmetic operations:-
The 4 basic arithmetic operations are addition subtraction, multiplication, division.
Addition:-
A full adder ckt can be uses with the help of logic gate for adder ckt. The simplest form of adder is the serial binary adder. Which adds 2 numbers bit by bit and hence required a cycle. Compute come of 2 n bit number. It consists of combinations full adder and flip flop to store ci. Output is generated to each click cycle. A carry i.e. generated is stored for using during the next clock cycle. There are ckt called parallel adder that can add all the bits of 2 number simultaneously in parallel in one clock cycle. Full adder ckt:- Flip flop is a register which storing the element
The full order ckt simple binary operation 0+0 = 00 0+1 = 01 1+0= 1+1 = 10
The 2’s complement can be obtained by taking the 1’s complement and adding one to the cost significant bit.
Ex. 011011
Msb csb
The addition and subtraction operation can be perform using one common CK1 by using an executive or gate with each full order. The control line mark m will control the operation.
Multiplication algorithm:-
Multiplication of two fixed point binary numbers in signed magnitude representation is done by a shift and add operation. If the multiplier bit is a1, the multiplicand is copied down otherwise here are copies down.
The numbers copied down in successive line are sifted one position to the left from the previous number. Finally the numbers are added and their sum forms the product. Multiplication of fixed point numbers:-
2 bit by 2 bit array multiples
Multipli land bits B11B
Multiplier bits A11A
Products C3 C2 C1 C
Partical product A0 with B1, B
Multiplication of two bits A0, B6 = 1
Otherwise = 0
Because and operation
Division algorithm:- the division of two fix point binary number in sign magnitude representation is done by process of successive compare, shift, and subtract operation.