FACTOID # 10: The total number of state executions in 2005 was 60: 19 in Texas and 41 elsewhere. The racial split was 19 Black and 41 White.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
   
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Machine code

Machine code or machine language is a system of instructions and data directly executed by a computer's central processing unit. Machine code is the lowest-level of abstraction for representing a computer program. This article is about the machine. ... CPU redirects here. ...

Contents

Machine code instructions

Instructions are patterns of bits with different patterns corresponding to different commands to the machine. In computer science, an instruction typically refers to a single operation of a processor within a computer architecture. ... This article is about the unit of information. ...


Every CPU model has its own machine code, or instruction set. Successor or derivative processor designs may completely include all the instructions of a predecessor and may add additional instructions. Some nearly completely compatible processor designs may have slightly different effects after similar instructions. Occasionally a successor processor design will discontinue or alter the meaning of a predecessor's instruction code, making migration of machine code between the two processors more difficult. Even if the same model of processor is used, two different systems may not run the same example of machine code if they differ in memory arrangement, operating system, or peripheral devices; the machine code has no embedded information about the configuration of the system. An instruction set is (a list of) all instructions, and all their variations, that a processor can execute. ...


A machine code instruction set may have all instructions of the same length, or may have variable-length instructions. How the patterns are organized depends largely on the specification of the machine code. Common to most is the division of one field (the opcode) which specifies the exact operation (for example "add"). Other fields may give the type of the operands, their location, or their value directly (operands contained in an instruction are called immediate). Some exotic instruction sets do not have an opcode field (such as Transport Triggered Architectures or the Forth virtual machine), only operand(s). Other instruction sets lack any operand fields, such as NOSCs[1]. Microprocessors perform operations using binary bits (on/off/1or0). ... In mathematics, an operand is one of the inputs (arguments) of an operator. ... Transport triggered architecture (TTA) is an application-specific instruction-set processor (ASIP) architecture template that allows easy customization of processor designs. ... For multi-threaded programming, see Thread (computer science) In computer science, the term threaded code refers to an implementation technique for programming languages that produces very compact code at the expense of some execution speed. ...


Programs

A program is a sequence of instructions that are executed by a CPU. While simple processors execute instructions one after the other, superscalar processors are capable of executing several instructions at once. Simple superscalar pipeline. ...


Program flow may be influenced by special 'jump' instructions that transfer execution to an instruction other than the following one. Conditional jumps are taken (execution continues at another address) or not (execution continues at the next instruction) depending on some condition. Program flow is the path of execution through a computer program. ... An instruction is a form of information which is communicated in order to explain how an action, behavior, method, or task is to be begun, completed, conducted, or executed. ... A conditional branch is a basic logical structure. ...


Assembly languages

Main article: Assembly language

A much more readable rendition of machine language, called assembly language, uses mnemonic codes to refer to machine code instructions, rather than simply using the instructions' numeric values. For example, on the Zilog Z80 processor, the machine code 00000101, which causes the CPU to decrement the B processor register, would be represented in assembly language as DEC B. See the terminology section, below, regarding inconsistent use of the terms assembly and assembler. ... See the terminology section, below, regarding inconsistent use of the terms assembly and assembler. ... For other uses, see Mnemonic (disambiguation). ... One of the first Z80 microprocessors manufactured; the date stamp is from June 1976. ... In computer architecture, a processor register is a small amount of very fast computer memory used to speed the execution of computer programs by providing quick access to frequently used values—typically, these values are involved in multiple expression evaluations occurring within a small region on the program. ...


Example

The MIPS architecture provides a specific example for a machine code whose instructions are always 32 bits long. The general type of instruction is given by the op (operation) field, the highest 6 bits. J-type (jump) and I-type (immediate) instructions are fully specified by op. R-type (register) instructions include an additional field funct to determine the exact operation. The fields used in these types are: A MIPS R4400 microprocessor made by Toshiba. ...

 6 5 5 5 5 6 bits [ op | rs | rt | rd |shamt| funct] R-type [ op | rs | rt | address/immediate] I-type [ op | target address ] J-type 

rs, rt, and rd indicate register operands; shamt gives a shift amount; and the address or immediate fields contain an operand directly.


For example adding the registers 1 and 2 and placing the result in register 6 is encoded:

 [ op | rs | rt | rd |shamt| funct] 0 1 2 6 0 32 decimal 000000 00001 00010 00110 00000 100000 binary 

Load a value into register 8, taken from the memory cell 68 cells after the location listed in register 3:

 [ op | rs | rt | address/immediate] 35 3 8 68 decimal 100011 00011 01000 00000 00001 000100 binary 

Jumping to the address 1024:

 [ op | target address ] 2 1024 decimal 000010 00000 00000 00000 00100 000000 binary 

Relationship to microcode

In some computer architectures, the machine code is implemented by a more fundamental underlying layer of programs called microprograms, providing a common machine language interface across a line or family of different models of computer with widely different underlying dataflows. This is done to facilitate porting of machine language programs between different models. An example of this use is the IBM System/360 family of computers and their successors. With dataflow path widths of 8 bits to 64 bits and beyond, they nevertheless present a common architecture at the machine language level across the entire line. A typical vision of a computer architecture as a series of abstraction layers: hardware, firmware, assembler, kernel, operating system and applications (see also Tanenbaum 79). ... A microprogram implements a CPU instruction set. ... It has been suggested that this article or section be merged with Dataflow architecture. ... In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed (e. ... System/360 Model 65 operators console, with register value lamps and toggle switches (middle of picture) and emergency pull switch (upper right). ...


Using a microcode layer to implement an emulator enables the computer to present the architecture of an entirely different computer. The System/360 line used this to allow porting programs from earlier IBM machines to the new family of computers, e.g. an IBM 1401/1440/1460 emulator on the IBM S/360 model 40. This article is about emulators in computer science. ... The IBM 1400 series was a family of mid-range buisiness computers that IBM sold in the early 1960s as a replacement for unit record equipment. ...


See also

Look up machine code in Wiktionary, the free dictionary.

Wikipedia does not have an article with this exact name. ... Wiktionary (a portmanteau of wiki and dictionary) is a multilingual, Web-based project to create a free content dictionary, available in over 150 languages. ... This article does not cite any references or sources. ... A very long instruction word or VLIW CPU architectures implement a form of instruction level parallelism. ... In computing, endianness is the byte (and sometimes bit) ordering in memory used to represent some kind of data. ... Microprofessor I (MPF 1), introduced in 1981, was Acers first branded computer product and probably one of the worlds longest selling computers. ...

Further reading


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m