Computer Architecture (Bcs504) Unit I
Computer Architecture (Bcs504) Unit I
Unit I
2 – MARKS
Data transfer
Unconditional branch
Conditional branch
Arithmetic
Address modify
6. Define bus?
A group of lines that serves as a connecting path for several devices is called a
bus.
7. Define register?
A register is a group of flip- flops. A flip – flop can store 1 bit information. So an
n bit register has a group of n flip- flops and is capable of storing any binary
information/ number containing n – bits.
1. Fetch
2. Decode
3. Execute
4. Store
UNIT –II
2 – Marks
1.What is the advantages in 1’s complement subtraction?
The 1’s complement subtraction can be accomplished with an binary adder.
Therefore, this method is useful in arithmetic logic circuits.
The 1’s complement of a number is easily obtained by inverting each bit in
the number.
010101010
+1 -1 +1 -1 +1 -1 +1 -1 +1
In the worst case each bit of the multiplier selects the summands. This results in more number of
summands.
3. Write the steps for subtracting larger number from smaller number in 1’s
complement?
Determine the 1’s complement of smaller number.
Add the 1’s complement to the larger number.
Answer is in 1’s complement form. To get the answer in true form take the
1’s complement and assign negative sign to the answer.
7. What is coprocessor?
Coprocessor is a separate instruction set processor. It has its own instruction set
supporting the special exponential and trignometric functions. The instructions and
registers of coprocessor are just extension of the CPU’s instruction set and registers.
8. What is pipelining?
Pipelining is a technique where multiple instruction are overlapped in execution
for increasing processor throughput.
9. What is throughput?
The maximum number of operations completed per second can be gives as 1/T.
UNIT –I
16 Marks
1. Explain the various addressing modes?
• Immediate
• Direct
• Indirect
• Register
• Register Indirect
• Displacement (Indexed)
• Stack
Immediate Addressing
• Operand is part of instruction
• Operand = address field
• e.g. ADD 5
— Add 5 to contents of accumulator
— 5 is operand
• No memory reference to fetch data
• Fast
• Limited range
Direct Addressing
• Address field contains address of operand
• Effective address (EA) = address field (A)
• e.g. ADD A
— Add contents of cell A to accumulator
— Look in memory at address A for operand
• Single memory reference to access data
• No additional calculations to work out effective address
• Limited address space
Indirect Addressing(1)
• Memory cell pointed to by address field contains the address of (pointer to) the
operand
• EA = (A)
— Look in A, find address (A) and look there for operand
• e.g. ADD (A)
— Add contents of cell pointed to by contents of A to accumulator
Indirect Addressing (2)
• Large address space
• 2n where n = word length
• May be nested, multilevel, cascaded
— e.g. EA = (((A)))
– Draw the diagram yourself
• Multiple memory accesses to find operand
• Hence slower
Register Addressing
• Operand is held in register named in address filed
• EA = R
• Limited number of registers
• Very small address field needed
— Shorter instructions
— Faster instruction fetch
Displacement Addressing
• EA = A + (R)
• Address field hold two values
— A = base value
— R = register that holds displacement
— or vice versa
Relative Addressing
• A version of displacement addressing
• R = Program counter, PC
• EA = A + (PC)
• i.e. get operand from A cells from current location pointed to by PC
• c.f locality of reference & cache usage
Indexed Addressing
• A = base
• R = displacement
• EA = A + R
• Good for accessing arrays
— EA = A + R
— R++