MSIL和二进制代码有什么区别? [英] What is a difference between MSIL and binary code?

查看:112
本文介绍了MSIL和二进制代码有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hello, I have one query, can you please tell me what is a difference between Binary code /Machine code and MSIL code. Someone told me that they both are same but I saw MSIL code and it looks like some kind of Assembly code to me then how can an assembly code is Machine code or Binary code and if it is then why JIT is converting MSIL to native code/machine code.





我尝试过:



我问我的老师,她说,MSIL是二进制代码,JIT只需将所需代码转换为MACHINE代码。

我认为二进制代码和机器代码类似,所以为什么要再次转换它。我MSIL是二进制代码然后为什么要将二进制代码转换为二进制代码。



What I have tried:

I asked my teacher and she said, MSIL is binary code and JIT just converts required code to MACHINE code.
I think Binary code and machine code is similar, so why to convert it again. I MSIL is binary code then why to convert binary code to binary code.

推荐答案

一个小讲座:

p-code machine-Wikipedia [ ^ ]

P代码 - 维基百科 [ ^ ]

Microsoft P-Code - Wikipedia [ ^ ]



机器代码 - 维基百科 [ ^ ]
A little lecture:
p-code machine - Wikipedia[^]
P-code - Wikipedia[^]
Microsoft P-Code - Wikipedia[^]

Machine code - Wikipedia[^]


机器代码通常是指physi的语言/二进制代码cal处理器即x86,x64,arm,risc等。



MSIL是由Microsoft创建的虚拟机的语言/二进制代码,它在物理处理器上运行,并且为该物理处理器创建的运行时虚拟机将MSIL转换为本机机器代码以供执行。



MSIL是一个抽象,所以你不需要重新编译要运行的目标处理器和未来的处理器(如果它们出现),虚拟机运行时制造商的制造商会为您实现所有实际转换。
"Machine code" usually refers to the language/binary codes for physical processors i.e. x86, x64, arm, risc etc.

MSIL is the language/binary code for a virtual machine created by Microsoft which is run on physical processors, and the "runtime virtual machine" created for that physical processor converts the MSIL to "native" machine code for execution.

MSIL is an abstraction so you don't need to recompile for your target processors which you want to run on and future processors if they come along, all the actual conversions happen for you by the makers of the virtual machine runtime maker.


您可以找到回答您的问题此处。这里的原生代码是二进制代码。



首先尝试谷歌查询。你很有可能找到答案。



祝你好运。
You can find answer to your question here. Here native code is binary code.

Try to google your query first. There's a good chance you'll find the answer.

Good luck learning.


这篇关于MSIL和二进制代码有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆