Basic Machine Code Operations and The Fetch-Execute Cycle

The address of the next instruction to be executed, held in the PC, is held in the MARThe Instruction held at that address is placed inthe MBR Fetch Phase Simultaneously, the contents of the PC are Compiled high-level language programs are The op-code denoted the basic machine code incremented by 1 to get ready for the next Machine Code Instructions: The language used translated into machine code before they are operation e.g. AD. The operand represents one instruction by digital computers is binary, expressed as executed on a digital computer. The executable item of data. It can even be divided so that it voltage. A digital computer is instructed to carry form of compiled high-level language programs represents not just one operand but several. We out operations such as ADD with instructions is therefore in machine code. The processor consider a simplified machine with one register The contents of the MBR are copied to the CIR. coded in binary. These instructions are known as decodes and executes the machine code for arithmetic called the accumulator, and 16 bits This frees up the MBR for the execute phase The Fetch-Execute Cycle machine code instructions. An example of a instructions. for each machine code instruction. The machine code instruction that performs addition operations ADD, LOAD and STORE all use the is; 0001 0001 0000 1111' When expressed in accumulator, so the accumulator does not need The instruction held in the CIR is decoded to be specified as it is always implied. assembly language, this translates to; Execute Phase ADD R1, #15 A machine code instruction consists of a number of binary digits, known as bits. A machine code The instruction is executed. instruction is typically 32 bits, divided into an Computing: Basic machine code operations operation code, and an operand and the fetch-execute cycle People who have to work with machine code prefer to display it in hexadecimal. The hexadecimal form of a machine code program takes up less space than the binary form. It is easier to work with, so that makes it less prone to errors. Op-codes are easier to recognise, Machine Code Representation in hexadecimal which makes the hexadecimal form easier to understand than its machine code equivalent.