首页 > 其他分享 >计算机语言

计算机语言

时间:2022-10-13 10:34:48浏览次数:37  
标签:computer 计算机 language 汇编语言 machine program 机器语言 语言

Computer Languages

  • A computer must be given instructions in a language that it understands, that is, a particular pattern of binary digital information.

  • 必须以计算机能够懂得的语言形式赋予其指令,这种指令就是一种特殊的二进制数字信息模式。


  • On the earliest computers, programming was a difficult, laborious task, because vacuum-tube ON-OFF switches had to be set by hand.

  • 在最早的计算机中,编程是一项困难和费力的劳动,因为真空管的开关必须是手动的。


  • Teams of programmers often took days to program simple tasks such as sorting a list of names.

  • 一组组的程序员常常要花数天时间给简单的任务如把名单分类编制程序。


  • Since that time a number of computer languages have been devised, some with particular kinds of functioning in mind and others aimed more at ease of use - the-user-friendly-approach.

  • 自从那时起,已编制了许多计算机语言,有些语言在编制时使其具有某些特殊功能,另一些使其达到使用更容易的目的——用户友好方法。


Machine Language

  • Unfortunately, the computer's own binary-based language, or machine language, is difficult for humans to use.

  • 不幸的是,人们很难使用计算机本身的二进制语言,或者叫机器语言。


  • The programmer must input every command and all data in binary form, and a basic operation such as comparing the contents of a register to the data in a memory-chip location might look like this: 11001010 00010111 11110101 00101011.

  • 程序员必须以二进制的形式输入每条指令和所有数据,像把一个寄存器中的内容与存储芯片单元里的数据进行比较,这样一个基本的操作也许看起来像这样:11001010 00010111 11110101 00101011。


  • Machine-language programming is such a tedious, time-consuming, task that the time saved in running the program rarely justifies the days or weeks needed to write the program.

  • 机器语言的编程乏味费时以至于在运行程序中节省的时间还没有编程序需用的时间多。


Assembly Language

  • One method programmers devised to shorten and simplify the process is called assembly-language-programming.

  • 程序员设计的一种缩短和简化编程过程的方法被称作为汇编语言编程。


  • By assigning a short (usually three-letter) mnemonic code to each machine-language command, assembly-language programs could be written and - debugged - cleaned of logic and date errors - in a fraction of the time needed by machine-language programmers.

  • 通过给每一个机器语言命令指定一个短的(通常三个字母)记忆码,汇编语言程序的编写与调试仅为机器语言程序所用时间的一小部分。


  • In assembly language, each mnemonic command and its symbolic operands equals one machine instruction.

  • 在汇编语言里,每一个记忆命令和它的符号操作数相当于一个机器指令,


  • An-assembler-program translates the mnemonic-opcodes (operation codes) and symbolic operands into binary language and executes the program.

  • 一个汇编语言程序把记忆操作码和符号操作数翻译成二进制语言执行程序。


  • Assembly language is a type of low-level computer programming language in which each statement corresponds directly to a single machine instruction.

  • 汇编语言是一种低级计算机编程语言,每个语句直接对应一条机器指令。


  • Assembly languages are thus specific to a given processor.

  • 因此,每种处理器都有自己的汇编语言。


  • After writing an assembly language program, the programmer must use the assembler language into machine code.

  • 汇编语言写好后,程序员必须把它汇编成机器码。


  • Assembly language provides precise control of the computer, but assembly language programs written for one type of computer must be rewritten to operate on another type.

  • 汇编语言精确地控制着计算机的操作,但是,为一种计算机写的汇编语言在另一种计算机上运行时必须重写。


  • Assembly language might be used instead of a high-level language for any of three major reasons: speed, control, and preference.

  • 由与速度、控制和偏好三个原因之一,汇编语言或许可以用来代替高级语言。


  • Programs written in assembly language usually run faster than those generated by a compiler; use of assembly lets a programmer interact directly with the hardware (processor, memory, display, and input/output ports).

  • 用汇编语言写的程序通常比编译器所写的程序运行的快,汇编语言可以使程序员直接与硬件(处理器、内存、显示和输入输出端)交互。


  • Assembly language, however, can be used only with one type of CPU chip or microprocessor.

  • 但是,一种汇编语言只能适用于一种CPU芯片或微处理器,


  • Programmers who expended much time and effort to learn how to program one computer had to learn a new programming style each time they worked on another machine.

  • 在一种机型上花了很多时间和精力学习编程的程序员在另一种机型上工作时,还必须重新学习。


  • What was needed was a shorthand method by which one symbolic statement could represent a sequence of many machine-language instructions, and a way that would allow the same program to run on several types of machines.

  • 程序员需要的是一种快速编程法,借助这种方法一个符号语句能够代表一系列机器语言指令。一个程序能在多种机器上运行,


  • These needs led to the development of so called high-level languages.

  • 这种需求导致了高级语言的研制。


High-level languages

  • High-level languages often use English-like words - for example, LIST, PRINT, OPEN, and so on-as commands that might stand for a sequence of tens or hundreds of machine-language instructions.

  • 高级语言常常将英语的词汇用作命令,例如LIST、PRINT、OPEN等等,这些命令可以代表数十或者数百条机器指令,


  • The commands are entered from the keyboard or from a program in memory or in a storage device, and they are interpreted by a program that translates them into machine-language instructions.

  • 这些命令可以由键盘输入或者通过内存里或存储装置里的程序输入,并由一个程序把这些命令翻译成机器指令。


  • Translator programs are of two kinds: interpreters and compilers.

  • 翻译程序有两种:解释程序和编译程序。


  • With an interpreter programs that-loop-back to re-execute part of their instructions reinterpret the same instructions each time it appears, so interpreted programs run much more slowly than machine-language programs.

  • 用解释器时,程序能够重复执行指令,重新解释每次出现的同样指令,所以解释程序比机器语言程序慢得多。


  • Compilers, by contrast, translate an entire program into machine language prior to execution, so such programs run as rapidly as though they were written directly machine language.

  • 对比之下,编译程序在执行前,把整个程序翻译成机器语言,所以这样的程序就像机器语言程序一样快。


  • American computer scientist Grace Hopper is credited with implementing the first commercially-oriented computer language.

  • 美国计算机科学家格雷丝·豪颇被誉为第一个实现了以商业为主的计算机语言,


标签:computer,计算机,language,汇编语言,machine,program,机器语言,语言
From: https://www.cnblogs.com/linshaoblog/p/16787272.html

相关文章

  • 计算机辅助教学
    CAIComputer-AidedInstruction(CAI),isadiverseandrapidlyexpandingspectrumofcomputertechnologiesthatassisttheteachingandlearningprocess.计......
  • 计算机系统
    ComputerSystemAtypicalcomputersystemconsistsofacentralprocessingunit(CPU),inputdevices,storagedevices,andoutputdevices,whicharecalledha......
  • GO语言基本数据类型
    Go语言-程序实体与关键字任何Go语言源码文件都由若干个程序实体组成的。在Go语言中,变量、常量、函数、结构体和接口被统称为“程序实体”,而它们的名字被统称为“标识符”。......
  • c语言实现继承、封装、多态
    c语言实现多态,点击进入主要内容:多态:利用设计和实现一个易于扩展的系统;c++中多态指:具有不同功能的函数可以用同一个函数名,这样可以用一个函数名调用不同内容的函数;静态多......
  • 论人类下一代语言的可能—3.2.2对中文的考察
    可以以同样的方式对中文进行描写与解读如下。汉字的起始是笔划,包括有:横、竖、撇、点、捺、提六种基本笔划:“一”“丨”“丿”“丶”“㇏”“㇀”。这些基本笔划可以进一......
  • 实验1 C语言开发环境使用和编程初体验
    1.实验任务1task1.c源码1#include<stdio.h>2intmain(){3for(inti=1;i<=2;i++){4printf("0\n");5printf("<H>\n");6......
  • c语言一 入坑
    c语言1.什么是编程语言?源自内存的构成材料:晶体管是帮助人类和计算机交流的语言高级语言(c,c++,Java,b语言)-->汇编语言(机器码+指令和命令)-->0和1(二进制机器码)2.和计算机......
  • c语言三 输入输出
    整数溢出​ 计算一个整数的时候超过整数能够容纳的最大单位后,整数会溢出,溢出的结果是高位舍弃​ 当一个小的整数赋值给大的整数,符号位不会丢失,会继承大端对齐与小端......
  • DML数据操作语言(SQL语句 增、删、改 操作)
    一、添加数据1. 添加一条数据(全部/完整)语法:insert into 表名 values('值1','值2','值3'......)2. 添加一条数据(部分)语法:......
  • 计算机基础
    目录目录目录进制转换命令行进制转换命令行改变目录 cd显示一个目录下的子目录和文件 dir新建目录 md新建文件 cd>test.txt编辑文件 echo内容>test.txt复制文......