Instruction Cycle Computer Organization and Architecture by Ravinder Nath Rajotiya - May 17, 2021December 14, 20220 Instruction Cycle In a digital computer the instructions are stored in the memory. When an instruction is executed it goes through a sequence of operations called an instruction cycle. The total time taken by the computer in executing an instruction is called an instruction cycle. It may contain different subcycle such as machine cycle. An instruction under execution may take one or more machine cycle for its execution depending upon the format of the instruction. Figure shows the steps taken by an instruction during its execution. All these steps together constitute an instruction cycle. Phases of Instruction cycle: 1. Fetch an instruction from memory. 2. Decode the instruction. 3. Read the effective address from memory if the instruction has an indirect address.
Instruction Types Computer Organization and Architecture by Ravinder Nath Rajotiya - May 17, 2021December 11, 20220 Computer Instructions: A digital system such as a processor or CPU accepts binary data as input, processes that data, and then provides output based on the instructions stored in the memory. The processor has an ALU to process the data, registers for temporary data transfer and the control unit manages the flow of instructions and data through the system. It requires the user to store the program (set of instructions) in memory. Format of the instruction When the execute command is given, the instruction from the memory is read into the instruction register (IR). The instruction is basically divided in two parts, the instruction code and the address part of the instruction. Format of the instruction is given below: Instruction Code Address part of instruction Mode
Level of Programming Languages Computer Organization and Architecture by Ravinder Nath Rajotiya - April 29, 2021May 21, 20210 Levels of programming languages: A computer system is composed of hardware and the software. At the lowest level is the hardware layer and above it are the software layers. A computer is an electronic programmable machine. To make the hardware work, it can be programmed using the programming languages. These languages are divided into various levels, these are described below: Machine Level Language: It is a language of 0’s and 1’s, which is a binary language. Writing in binary format is very difficult. But is very easy machine, bcs m/c works on binary. Therefor m/c can directly execute such code without conversion. Assembly Level Language : In thi level mnemonic or symbols are used for the binary code. Thus making it convenient for the
Logical and Shift Micro-operations Computer Organization and Architecture by Ravinder Nath Rajotiya - March 22, 2021May 14, 20210 Logical Shift micro-operations: The logical operations that are performed on the contents of the processor register are called as the logical micro-operations. These micro-operations are AND, OR, INVERT, XOR etc. are performed on individual bits of the registers As an example, logical exclusive-OR micro-operations can be written as: X: R3 <-- R1 ⊕ R2 This RTL syntax describes that R3 is update with the result of the exclusive-OR operation on the contents of R1 and R2 when the control signal X goes high. We are aware that a ‘+’ means an arithmetic addition as well as a logical OR operation. To avoid the confusion in the use of the symbols the OR operation will be indicated by ‘V’ and the arithmetic operation by ‘+’ symbol.