In: Computer Science
i)In a computer, an instruction is composed of two fields: the opcode and an operand address. what is the minimum size of your instruction in bits if an instruction set of 327 opcodes and an address space of 128 Mbytes is required? NB. Use 1 Mbyte = 2^20 bytes
ii) Instead of hard-writing the units, the software is used to interpret and execute instructions in a general-purpose system. Is the statement true or false
ANSWER 1
FOLLOWING IS THE NOTES I HAVE PREPARED TO MAKE THE UNDERSTANDING REGARDING INSTRUCTIONS EASIER IN COMPUTER ORGANIZATION:
An instruction format defines the different component of an instruction. The main components of an instruction are opcode (which instruction to be executed) and operands (data on which instruction to be executed). Here are the different terms related to instruction format:
AN EXAMPLE TRYING TO EXPLAIN HOW THE DIVISON TAKES BETWEEN THE OPCODE AND OPERAND BITS
HANDWRITTEN ANSWER TO THE QUESTION 1:--
THEREFORE THE MINIMUM SIZE REQUIRED FOR THE INSTRUCTION REGISTER SIZE = 36 BITS .
ANSWER 2:--
THE STATEMENT IS TRUE.IN GENERAL PURPOSE COMPUTERS MICRO-PROGRAMMING IS USED INSTEAD HARD WIRED PROGRAMMING FOR CONTROL UNIT SIGNALS GENERATIONS.
To execute an instruction, the control unit of the CPU must generate the required control signal in the proper sequence. There are two approaches used for generating the control signals in proper sequence as Hardwired Control unit and Micro-programmed control unit.
A general purpose computer is used for various stuffs ,it suppports a large number of general utilities.In this scenario it becomes difficult to implemnt the hard wired control program for instruction execution. Microprogramming offers the flexibility to modify general-purpose hardware without making hardware modifications. Flexibility is probably the most important advantage of firmware over hardware.
To execute an instruction, there are two types of control units Hardwired Control unit and Micro-programmed control unit.
The general purpose system supports CISC set of instrutions.It supports a large number of complex instructions and if one tries to implement a hard wired system it will become too complex and far too expensive.Hard wired system though much faster than micro-programmed ones but cant be implemted in a CISC systems.
HERE ARE SOME OF THE MAJOR REASONS WHY WE USE MICRO PROGRAMMED UNIT:-
HENCE IT IS TRUE THAT GENERAL PURPOSE SYSTEMS USES MICRO-PROGRAMMED CONTROL UNIT FOR INSTRUTION EXECUTION.IT IS SIMPLER AND COST EFFECTIVE.