English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

Cobol - 1959
Fortran - 1953
Basic - 1963

2006-09-13 00:54:15 · answer #1 · answered by Anonymous · 0 0

machine code
Machine code instructions
The "words" of a machine. Instructions are patterns of bits with different patterns corresponding to different commands to the machine.

Every CPU model has its own machine code, or instruction set, 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.

Some machine 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 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].

[edit]
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.

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.

[edit]
Assembly languages
Humans use mnemonic codes to refer to machine code instructions. Such a more readable rendition of the machine language is called an assembly language and consists of both binary numbers and simple words whereas machine code is composed only of the two binary digits 0 and 1.

For example, on the Zilog Z80 processor, the machine code 00000101 causes the CPU to decrement the B processor register. In assembly language this would be written as DEC B.

[edit]
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:

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:

2006-09-13 07:52:11 · answer #2 · answered by 1 5 · 0 0

The first user programming language is PASCAL.

2006-09-13 07:55:37 · answer #3 · answered by Louise Smith 7 · 0 0

fedest.com, questions and answers