Changes

Jump to navigation Jump to search
m
Slight correction
Line 7: Line 7:     
== Operation ==
 
== Operation ==
−
The basic operation of a CPU is the "Fetch, Decode, Execute" cycle.<ref>[http://www.it.jcu.edu.au/Subjects/cp1300/resources/lectnotes/system/fde.html Fetch-Decode-Execute Cycle]</ref>  The ''instruction fetcher'' fetches instructions from memory.  The ''control logic'' decodes and executes the instruction.  The ALU is used to perform arithmetic and logical operations such as adding a value in memory to a value in a register and storing the result in another register.  On some CPUs, some instructions may require additional fetches from memory (e.g., to get or store operands).  A program in memory is executed sequentially, with each instruction stored in a different memory location.  The instruction pointer (IP) register keeps tracks of the current program position, and is updated (usually incremented) after each CPU cycle.
+
The basic operation of a CPU is the "Fetch, Decode, Execute" cycle.<ref>[http://www.it.jcu.edu.au/Subjects/cp1300/resources/lectnotes/system/fde.html Fetch-Decode-Execute Cycle]</ref>  The ''instruction fetcher'' fetches instructions from memory.  The ''control logic'' decodes and executes the instruction.  The [[ALU]] is used to perform arithmetic and logical operations such as adding a value in memory to a value in a register and storing the result in another register.  On some CPUs, some instructions may require additional fetches from memory (e.g., to get or store operands).  A program in memory is executed sequentially, with each instruction stored in a different memory location.  The instruction pointer (IP) register keeps tracks of the current program position, and is updated (usually incremented) after each instruction is executed.
    
== Architecture ==
 
== Architecture ==
Line 19: Line 19:     
===Instruction Set===
 
===Instruction Set===
−
The instruction set of a given CPU model defines the basic operations that can be performed by the CPU.  These operations tend to be simple, such as adding two numbers, outputting a character, or moving data between registers.  In a given line of processors, the instruction sets are compatible, although as the newer models are released, they usually had additional instructions added.  Thus, newer processors were backwards compatible (meaning they could run the same programs as older processors), but older processors did not recognize the new instructions added to later models.  Between processor lines, there is no compatibility.  The instructions are stored in memory as "machine code" which are bit patterns that represent certain instructions.  These bit patterns represent entirely different operations on different processor lines, which means that a program written for one CPU will not run on a different CPU line.  Rather than programming in machine code, assemblers are used to convert from mnemonics to machine codes.  The mnemonics tend to be three or four character abbreviations that indicate the operation.  For instance, MVI (Move immediate), JP (Jump if positive), or HLT (halt).
+
The instruction set of a given CPU model defines the basic operations that can be performed by the CPU.  These operations tend to be simple, such as adding two numbers, outputting a character, or moving data between registers.  In a given line of processors, the instruction sets are compatible, although as the newer models are released, they usually had additional instructions added.  Thus, newer processors were backwards compatible (meaning they could run the same programs as older processors), but older processors did not recognize the new instructions added to later models.  Between processor lines, there is no compatibility.  The instructions are stored in memory as "machine code" which are bit patterns that represent certain instructions.  These bit patterns represent entirely different operations on different processor lines, which means that a program written for one CPU will not run on a different CPU line.
    
There are two aspects to an instruction set.
 
There are two aspects to an instruction set.
SkipCaptcha
293

edits

Navigation menu