lengua maquina

Páginas: 10 (2271 palabras) Publicado: 18 de marzo de 2013
Machine languages, Assembly languages and high- level languages
Programmers write instructions in various programming languages, some directly understandable by computers and others requiring intermediate translation steps. Hundreds of computer languages are in use today. These may be divided into three general types:
1._ machine languages
2._ assembly languages
3._ high-level languagesAny computer can directly understand only its own machine language. Machinelanguage is the “natural language” of a computer and as such is defined by its hardware design. (Note: machine language is often referred ton as object code. This term predates “object-oriented programming.” These two uses of “object” are unrelated.)Machine languages generally consist of strings of numbers (ultimately reducedto 1s and 0s) that instruct computers to perform their most elementary operations one at a time. Machine languages are machine dependent (i.e., a particular machine language can be used on only one type of computer). Such languages are cumbersome for humans , as illustrated by the following section of an early machine-language program that adds overtime pay to base pay and stores the result ingross pay:
+1300042774
+1400593419
+1200274027
Machine-languages programming was simply too slow, tedious and error prone for most programmers. Instead ofusing the strings of numbers that computers coulddirectly understand, programmers began using English-like abbreviations to represent elementary operations. These abbreviations formed the basis of assembly languages.Translator programs calledassemblers were developed to convert early assembly-language programs to machine language at computer speeds. The following section of an assembly-language program also adds overtime pay to base pay and stores the result in gross pay:
Load basepay
Add overpay
Store grosspay
Although such code is clearer to humans, it is incomprehensible to computers until translated to machine language.Computer usage increased rapidly with the advent of assembly language, but programmers still had to use many instructions to accomplish even the simplest tasks. To speed the programing process, high-level languages were developed in which single statements could be written to accomplish substantial tasks.Translator programs called compilers convert high-level language programs into machine language.High level languages allow programmers to written instructions that look almost like everyday English and contain commonly used mathematical notations. A payroll program written in a high –level language might contain a statement such as
grossPay =basePay + overTimePay;
from your standpoint, obviously, high-level languages are preferable to machine and assembly language. C,C++,Microsoft’s.NETlanguages are (e.g., Visual Basic, Visual C++ and Visual C#) and Java are among the most widely used high-level programming languages. All of the internet an web application development languages that you’ll learn in this book are high-lever languages.
The process of compiling a high-level language program into machine language can take a considerable amount of computer time. Interpreter programswere developed to execute high-level language programs directly, although much more slowly. In this book, we study several key programming languages, including JavaScript ,ActionScript, PHP and Ruby on Rails each of these scripting languages is processed by interpreters. We also study markup languages such as XHTML and XML, which can be processed by interpreted scripting languages. You’ll seethat interpreters have played an especially important role in helping scripting languages and markup languages archive their goal of portability across a variety of platforms.
Performance tip
Interpreters have an advantage over compilers in scripting. An interpreted program can begin executing as son as it is downloaded to the client’s machine, without the need to be compiled before it can...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Maquina
  • Maquinas
  • El maquinista
  • Maquinado
  • Maquinas
  • maquinas
  • maquina
  • Maquinas

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS