【正文】
to sole certain general types of programming problems —FORTRAN for scientific applications, and COBOL for business applications. Although these languages were designed to address specific categories of puter problems, they are highly portable, meaning that they may be used to program many types of puters. Other languages, such as machine languages, are designed to be used by one specific model of puter system, or even by one specific puter in certain research applications. The most monly used programming languages are highly portable and can be used to effectively solve diverse types of puting problems. Languages like C, PASCAL, and BASIC fall into this category.Programming languages can be classified as either lowlevel languages or highlevel languages. Lowlevel programming languages, or machine languages, are the most basic type of programming languages and can be understood directly by a puter. Highlevel languages are programming languages that must first be translated into a machine language before they can be understood and processed by a puter. Examples of highlevel languages are C, C++, PASCAL, and FROTRAN. Assembly languages are intermediate languages that are very close to machine languages and do not have the level of linguistic sophistication exhibited by other highlevel languages, but must still be translated into machine language. LanguagesIn machine languages, instructions are written as sequences of 1s and 0s, called bits, that a puter can understand directly. An instruction in machine language generally tells the puter four things: (1) where to find one or two numbers or simple pieces of data in the main puter memory (Random Access Memory, or RAM), (2) a simple operation to perform, such as adding the two number together, (3) where in the main memory to put the result of this simple operation, and (4) where to find the next instruction to perform. While all executable programs are eventually read by the puter in machine language, they are not all programmed in machine language. It is extremely difficult to program directly in machine language because the instructions are sequences of 1s and 0s. A typical instruction in a machine language might read 10010 1100 1011 and mean add the contents of storage register A to the contents of storage register B.2 .HighLevel LanguagesHighLevel languages are relatively sophisticated sets of statements utilizing words and syntax from human language. They are more similar to normal human language than assembly or machine languages and are therefore easier to use for writing plicated programs. These programming languages allow larger and more plicated programs to be developed faster. However, highlever languages must be translated into machine language by another program called a piler before a puter can understand them. For this reason, programs written in a highlevel language may take longer to execute and use up more memory than programs written in an assembly language.3. Assembly LanguagesComputer programmers use assembly languages to make machine language programs easier to write. In an assembly language, each statement corresponds roughly to one machine language instruction. An assembly language statement is posed with the aid of easytoremember mands. The mand to add the contents of storage register A to the contents of storage register B might be written ADD B,A in a typical assembly language statement. Assembly languages share certain features with machine languages. For instance, it is possible to manipulate specific bits in both assembly and machine languages. Programmers use assembly languages when it is important to minimize the time it takes to run a program, because the translation from assembly language to machine language is relatively simple. Assembly languages are also used when some part of the puter has to be controlled directly, such as individual dots on a monitor or the flow of individual characters to a printer.B 中文翻譯程序設(shè)計語言編程語言,在計算機科學,是用來編寫的指令序列(計算機程序),可以由計算機上運行的人造語言。類似的,自然的語言,例如英語,編程語言有一個詞匯,語法和語法。然而,自然語言不適合計算機編程,因為他們是含糊不清,這意味著他們的詞匯和語法結(jié)構(gòu)可以以多種方式來解釋。用于程序的計算機必須有簡單的邏輯結(jié)構(gòu)的語言,和他們的語法,拼寫和標點符號的規(guī)則必須是準確的。編程語言差別很大的復雜性和在其多功能性程度。一些編程語言編寫的計算,以解決問題或?qū)σ惶囟ㄐ吞柕挠嬎銠C系統(tǒng)使用特定類型。舉例來說,如FORTRAN語言和COBOL的編程語言被寫入唯一的某些一般的規(guī)劃問題,F(xiàn)ORTRAN語言語言類型的科學應用,以及商業(yè)應用的COBOL語言。雖然這些語言的目的是解決計算機問題的具體類別,它們是高度可移植的,這意味著它們可用于多種類型的計算機程序。如機器語言,其他語言的目的是由一個計算機系統(tǒng),甚至在某些研究一個具體應用的計算機的特定模型。最常用的編程語言是高度可移植的,可以用來有效地解決不同類型的計算問題。如231。學,PASCAL的,基本屬于這一類的語言。編程語言可以被歸類為低層次的語言或高級語言。高級語言的節(jié)目,必須先翻譯成,才可以被理解的機器語言,由計算機處理的語言。高層次的語言例如C語言,C + +,PASCAL的,和FROTRAN。大會語言是非常接近機器語言,并沒有對其他高級語言表現(xiàn)語言的中間語言的復雜程度,但仍必須翻譯成機器語言。在機器語言,指令被寫為1和0,稱為序列位,一臺計算機可以直接理解。在機器語言指令告訴計算機一般四件事情:(1)在哪里可以找到一個或兩個數(shù)或在主計算機的內(nèi)存(隨機存取記憶體,或RAM)數(shù)據(jù)的簡單件,(2)一個簡單的操作來執(zhí)行,如添加了兩個數(shù)字一起,(3)如在主內(nèi)存來把這個簡單的操作的結(jié)果,以及(4)在哪里可以找到下一個指令來執(zhí)行。雖然所有的可執(zhí)行程序,最終由計算機在機讀語言,他們不是在所有機器語言編程。這是非常困難的方案,因為直接在機器語言的指令是1和0序列。如果一個典型的機器語言指令可能會讀取10010 1100 1011,平均添加的內(nèi)容存儲到存儲寄存器A的內(nèi)容登記乙 高級語言是利用人類語言的文字和語法相對復雜的報表集。他們更接近正常比匯編語言的人或機器語言,因此更容易編寫復雜的程序使用。這些編程語言允許更大,更復雜的方案,以獲得更快的發(fā)展。然而,高杠桿的語言必須轉(zhuǎn)化成機器語言的另一個稱為編譯程序之前,計算機能理解他們?;谶@個原因,方案寫在一個高層次的語言可能需要更長的時間來執(zhí)行和使用更多的內(nèi)存在1比匯編語言編寫的程序。 使用匯編語言的計算機程序員,使機器語言程序更容易編寫。在一個匯編語言,每個語句大致相當于一臺機器語言指令。匯編語言語句組成的易記的援助命令。匯編語言與機器語言共享某些特征。例如,它可以操縱機器語言都裝配和具體位。使用匯編語言編程時,重要的是要盡量減少所花費的時間運行程序,因為從匯編語言翻譯成機器語言是比較簡單。匯編語言也被用來當一些計算機的一部分,必須直接控制,例如監(jiān)視器或個別字流向打印機個別點。32