学习由0和1组成的计算机语言的地方

huangapple go评论48阅读模式
英文:

Where to learn a computer language consisting of 0 and 1

问题

我正在学习Java编程语言。我想知道在哪里学习由0和1组成的计算机语言本身,因为我没有找到任何关于这个主题的书籍。告诉我谁知道。

我尝试查找视频教程或类似的内容,但没有找到任何东西。

英文:

I am learning the java programming language.I would like to know where to learn the computer language itself consisting of 0 and 1 Since I have not found any books on this topic.Tell me who knows

I tried looking for video tutorials or something like that but I didn't find anything

答案1

得分: 1

我认为你在寻找的是汇编语言。然而,这对于每种类型的处理器都是不同的,因此人们很少再使用它。你必须非常擅长它才能胜过现代编译器。

而且汇编语言仍然不是原始的字节码(0和1)。这种转换在概念上很容易,但非常耗时,而且比汇编语言更容易出错。因此,至少自1980年以来没有人这样做了。

英文:

I think what you are looking for is assembly language. However, this is different for every type of processor, hence people rarely use it anymore. You must be very good at it to beat a modern compiler.

And assembly is still not the raw byte code (the 0s and 1s). That translation is conceptually easy, but very time-consuming and even more error prone than assembly. Therefore nobody does that at least since 1980.

答案2

得分: 0

由于你正在学习Java,你可能在提到以下两种东西之一:

Java编译器将你的源代码翻译成字节码,存储在.class文件中。字节码是一种与处理器无关的代码(即无论它运行在基于英特尔处理器、ARM处理器等的计算机上,都是相同的0和1的序列)。然后,字节码由Java虚拟机翻译(即解释或编译)成机器码。该代码由指令组成,每个指令包含一个二进制的操作码(即一系列0和1,告诉JVM要做什么)。然而,由于操作码的数值难以记忆,每个操作码都有一个相关的描述性助记符。完整的指令集由JVM规范指定。

机器码是针对每种处理器(CPU)类型的不同的0和1序列。每种CPU类型都定义了自己的指令集,其中包含有相关的操作码助记符。当人类想要编写机器码时,他们通常会使用汇编语言,这很容易转换成机器码,因为汇编器(即翻译程序)只需将每个助记符翻译成其二进制操作码即可。

英文:

Since you're learning Java, you might be referring to one of two things:

The Java compiler translates your source code into bytecode, stored in .class files. Bytecode is a type of processor-independent code (i.e. it is the same sequence of 0s and 1s irrespective of whether it's running on a computer based on an Intel processor, or an ARM processor, etc.). Bytecode is then translated (i.e. interpreted or compiled) into machine code by the Java Virtual Machine. The code consists of instructions which consist of a binary opcode (i.e. a sequence of 0s and 1s which tell the JVM what to do). However, because the numeric values of opcodes are hard to remember, each one has an associated descriptive mnemonic. The full instruction set is specified by the JVM Specification.

Machine code is a different sequence of 0s and 1s for each type of processor (CPU). Each CPU type defines its own instruction set, consisting of opcodes which have associated descriptive mnemonics. When humans want to write machine code, they usually write in Assembly Language, which is trivial to convert into machine code because the Assembler (i.e. a translator program) just has to translate each mnemonic into its binary opcode.

huangapple
  • 本文由 发表于 2023年6月15日 01:09:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76476022.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定