虽然我理解模拟和模拟的一般含义,但我几乎总是对它们感到困惑。假设我创建了一个模仿现有硬件/软件的软件,我应该如何称呼它?模拟器还是模拟器?

有人能从编程的角度来解释一下吗?

福利:这两个词在英语中有什么区别?(对不起,我的母语不是英语:))


当前回答

To understand the difference between a simulator and an emulator, keep in mind that a simulator tries to mimic the behavior of a real device. For example, in the case of the iOS Simulator, it simulates the real behavior of an actual iPhone/iPad device. However, the Simulator itself uses the various libraries installed on the Mac (such as QuickTime) to perform its rendering so that the effect looks the same as an actual iPhone. In addition, applications tested on the Simulator are compiled into x86 code, which is the byte-code understood by the Simulator. A real iPhone device, conversely, uses ARM-based code.

相比之下,模拟器模拟真实设备的工作。在模拟器上测试的应用程序被编译成实际设备使用的实际字节码。仿真器通过将字节码转换为可由运行仿真器的主机执行的形式来执行应用程序。

为了理解模拟和模拟之间的微妙区别,假设您试图说服一个孩子玩刀是危险的。为了模拟这种情况,你假装用刀割伤自己,并痛苦地呻吟。为了模仿这一点,你真的会割伤自己。

其他回答

几年前,我想出了一个非常简短的格言,我相信,它很好地抓住了差异的本质:

模拟器是执行任务的模拟器。

我的意思是,当你不能使用真正的东西时,你可以使用模拟器,当你不能使用真正的东西时,你可以使用模拟器,当你想找到一些关于它的东西时。

模拟器:类似于解释器。 也就是说,它实际上逐行执行真实的代码来模拟行为

模拟器:类似于可执行文件。 也就是说,它接受编译后的代码并执行它。

To understand the difference between a simulator and an emulator, keep in mind that a simulator tries to mimic the behavior of a real device. For example, in the case of the iOS Simulator, it simulates the real behavior of an actual iPhone/iPad device. However, the Simulator itself uses the various libraries installed on the Mac (such as QuickTime) to perform its rendering so that the effect looks the same as an actual iPhone. In addition, applications tested on the Simulator are compiled into x86 code, which is the byte-code understood by the Simulator. A real iPhone device, conversely, uses ARM-based code.

相比之下,模拟器模拟真实设备的工作。在模拟器上测试的应用程序被编译成实际设备使用的实际字节码。仿真器通过将字节码转换为可由运行仿真器的主机执行的形式来执行应用程序。

为了理解模拟和模拟之间的微妙区别,假设您试图说服一个孩子玩刀是危险的。为了模拟这种情况,你假装用刀割伤自己,并痛苦地呻吟。为了模仿这一点,你真的会割伤自己。

这个问题最好的答案可能是看一看历史实践。

在过去,我曾在PlayStation和SEGA的PC上看到过游戏主机模拟器。

模拟器是指那些试图模拟现实生活行为的软件,比如驾驶或飞行。《Gran Turismo》和《微软飞行模拟器》都是模拟游戏的经典例子。

就语言差异而言,模仿通常指的是模仿某人(或某事)值得称赞的特征或行为。仿真与模仿是不同的,模仿是为了嘲弄而复制一个人。

动词“simulation”在语言学上的意思基本上是假装或模仿某人或某事。

词语的定义最好地描述了差异。谷歌搜索给出了以下模拟和仿真的定义:

模仿…的外表或特征。

模仿,赶上或超越(某人或某项成就),通常是通过模仿。

仿真模拟一个系统。仿真可以很好地模拟一个系统,从而可以取代它,甚至可能超过它。

在计算中,模拟将是它所模拟的系统的替换。通常情况下,它甚至会超越它所模仿的系统。例如,游戏控制台模拟器通常会做一些改进,比如更好的硬件兼容性、更好的性能和更好的音频/视频质量。

另一方面,模拟由于是模型而受到限制。它们是模拟系统的最佳尝试,而不是系统的替代品。有硬件模拟器,因为硬件可以被模仿,而且很难区分。没有种植模拟器,因为没有仿真可以取代实际的种植。我们只能模拟一种耕作模式,以了解如何更好地耕作。