FACTOID # 2: Puerto Rico has roughly the same gross state product as Montana, Wyoming and North Dakota combined.
 
 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 language
Jump to: navigation, search

A system of codes directly understandable by a computer's CPU is termed this CPU's native or machine language. Although machine code may seem similar to assembly language they are in fact two different types of languages. Assembly code consists of both binary numbers and simple words whereas machine code is composed only of the two binary digits 0 and 1. Every CPU model has its own machine language, although there is considerable overlap between some. If CPU A understands the full language of CPU B it is said that A is compatible with B. CPU B may not be compatible with CPU A, as A may know a few codes that B does not. Jump to: navigation, search A computer is a device or machine for processing information from data according to a program — a compiled list of instructions. ... Jump to: navigation, search This article needs to be cleaned up to conform to a higher standard of quality. ...


The "words" of a machine language are called instructions; each of these causes an elementary action by the CPU, such as reading from a memory location. A program is just a long list of instructions that are executed by a CPU. Older processors executed instructions one after the other, but newer superscalar processors are capable of executing several instructions at once. 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. A superscalar CPU architecture implements a form of parallelism on a single chip, thereby allowing the system as a whole to run much faster than it would otherwise be able to at a given clock speed. ...


Instructions are simply a pattern of bits -- different patterns correspond to different commands to the machine. Humans use mnemonic codes to refer to the useful bit-patterns: this more readable rendition of the machine language is called assembly language. For example, on the Z80 processor, the machine code 00000101 causes the CPU to decrement the B register. In assembly language we write this DEC B. Jump to: navigation, search This article is about the unit of information. ... Assembly language or simply assembly is a human-readable notation for the machine language that a specific computer architecture uses. ...


Some languages give all their instructions the same number of bits, while the instruction length differs in others. How the patterns are organised depends largely on the specific language. Common to most is the division of an instruction into fields, of which one or more specify 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).


As a specific example, let us take a look at the MIPS architecture. Its 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 MIPS, for Microprocessor without interlocked pipeline stages, is a RISC microprocessor architecture developed by MIPS Computer Systems Inc. ...

 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 

Loading a value from the memory cell 68 cells after the one register 3 points to into register 8:

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

Jumping to the address 1025:

 [ op | target address ] 2 1025 decimal 000010 00000 00000 00000 10000 000001 binary 

See also

CISC, RISC, VLIW, Endianness. A Complex Instruction Set Computer (CISC) is an instruction set architecture (ISA) in which each instruction can indicate several low-level operations, such as a load from memory, an arithmetic operation, and a memory store, all in a single instruction. ... Jump to: navigation, search Reduced Instruction Set Computer (RISC), is a microprocessor CPU design philosophy that favors a smaller and simpler set of instructions that all take about the same amount of time to execute. ... A very long instruction word or VLIW CPU architectures implement a form of instruction level parallelism. ... Jump to: navigation, search Endianness is an arbitrary convention of byte order, required when integers are represented with multiple bytes. ...


Further reading

Patterson and Hennessy: Computer Organization and Design. The Hardware/Software Interface. Morgan Kaufmann Publishers. ISBN 1-55860-281-X


Andrew S. Tanenbaum: Structured Computer Organization. Prentice Hall. ISBN 0-13-020435-8


  Results from FactBites:
 
Assembly language - Wikipedia, the free encyclopedia (1366 words)
Assembly language or simply assembly is a human-readable notation for the machine language that a specific computer architecture uses.
Machine language, a pattern of bits encoding machine operations, is made readable by replacing the raw values with symbols called mnemonics.
Transforming assembly into machine language is accomplished by an assembler, and the reverse by a disassembler.
Machine language - Wikipedia, the free encyclopedia (544 words)
The "words" of a machine language are called instructions; each of these causes an elementary action by the CPU, such as reading from a memory location.
Humans use mnemonic codes to refer to the useful bit-patterns: this more readable rendition of the machine language is called assembly language.
In assembly language we write this DEC B. Some languages give all their instructions the same number of bits, while the instruction length differs in others.
  More results at FactBites »

 
 

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