Page 25 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 25

Exposure to Computer Disciplines



                   Notes         Main Memory
                                     Main Memory stores the commands that the CPU executes and the results.
                                     This is where the computer stores the data and commands that are currently being used.
                                     When the computer is turned off, all data in Main Memory vanishes.
                                     A data storage method of this type is called volatile since the data "evaporates."
                                     The CPU can fetch one piece of data in one machine cycle.

                                                                   Figure 2.3


























                                 2.2 Machine Cycles

                                 A machine cycle, also called a processor cycle or a instruction cycle, is the basic operation
                                 performed by a central processing unit (CPU). A CPU is the main logic unit of a computer.
                                 A machine cycle consists of a sequence of three steps that is performed continuously and at
                                 a rate of millions per second while a computer is in operation. They are fetch, decode and
                                 execute. There also is a fourth step, store, in which input and output from the other three
                                 phases is stored in memory for later use; however, no actual processing is performed during
                                 this step. In the fetch step, the control unit requests that main memory provide it with the
                                 instruction that is stored at the address (i.e., location in memory) indicated by the control
                                 unit’s program counter. The control unit is a part of the CPU that also decodes the instruction
                                 in the instruction register. A register is a very small amount of very fast memory that is built
                                 into the CPU in order to speed up its operations by providing quick access to commonly used
                                 values; instruction registers are registers that hold the instruction being executed by the CPU.
                                 Decoding the instructions in the instruction register involves breaking the operand field into
                                 its components based on the instructions opcode.
                                                Opcode (an abbreviation of operation code) is the portion of a machine language
                                                instruction that specifies what operation is to be performed by the CPU.
                                                Machine language, also called machine code, refers to instructions coded in
                                                patterns of bits (i.e., zeros and ones) that are directly readable and executable
                                                by a CPU.

                                 A program counter, also called the instruction pointer in some computers, is a register that
                                 indicates where the computer is in its instruction sequence. It holds either the address of the
                                 instruction currently being executed or the address of the next instruction to be executed,


        18                                LOVELY PROFESSIONAL UNIVERSITY
   20   21   22   23   24   25   26   27   28   29   30