In: Computer Science
Q1
A- What is a register? How registers work together with ALU and Control Unit to execute a program? What is the fetch-execute cycle?
B- What is the difference to implement a control unit using microprogrammed or hardwired approaches? What is clock cycle? What are different addressing modes?
(1)(A)
(a)REGISTER: Registers are the smallest, fastest and costliest memory unit in the system. Registers are used to execute the instructions.
(b) ALU stands for Arithmetic and Logical Unit. It is used to perform arithmetic operations.ALU with the help of registers performs the arithmetic operations for loading and storing the data into the register.
EX: Load R1,2
Load R2,3
Add R1,R2
(c) The main task of the Control Unit is to take care of all the operations that occurs in the system.It controls the flow of the data in the processor.It also takes care of fetching, decoding, execution handling and storing the results.
(d)In the fetch phase the instruction that is to be executed present in the program counter register is loaded into the memory address register.Now the address that is present in the memory taken by the CPU for the execution.This is the execute phase of the instruction execution cycle.
(1)(B)
(a)Hardwired CU contains RISC instructions whereas in the microprogrammed CU contains CISC instructions.
(b)Hardwired works well for simple instructions.Microprogrammed CU works well for complex instructions also.
(c)Hardwired is costly and microprogrammed is not so costly to implement.
(d)Hardwired doesn't require control memory whereas microprogrammed requires control memory.
(e)In hardwired the execution is fast and microprogrammed the execution is slow.
Clock Cycle: It is term used to determine the speed of the processor.It is the time taken between two pulse of an oscillator.
Adressing Modes:
(a)Implied addressing mode
(b)Immediate addressing mode
(c)Register mode
(d)Register indirect mode
(e)Auto indexed mode(Increment mode)
(f)Auto Indexed mode (Decrement mode)
(g)Direct/ Absolute addressing mode
(h)Indirect addressing mode
(i)Indexed addressing mode
(j)Based indexed addressing mode