What is the difference between emulation and simulation?

This is all about replication. If we replicate something, how good is this replication? We could make an exact copy of the thing to be replicated and almost 100 % of the time, the replicated device would behave like the original. I say almost 100% of the time, since an exact copy is impossible to make ( there will ALWAYS be variations outside our control when copying things ). Except of course at the quantum level, that’s where things get strange….

Consider a black box with input and output. The output is dependent on the input according to a transfer function F which behaves the same as some other box with transfer function G. This means with the same input, the same output results EVERY TIME. ( So the system is deterministic )

Now , there are 4 levels of duplication :

Duplication : the box is physically duplicated ( inside and outside ). The end result is another box that behaves almost 100% of the time like the original.

Simulation : (outside the black box ) when looking AT the box, the way the transfer function f is achieved can’t be seen, you only know that F = G for all inputs. For all you know, there might be little midgets inside that perform some calculation on some calculator and the resulting function mimics G for every single input. In practice most simulators operate based on some kind of model of the to be duplicated function G. This means there won’t be a 100% similarity between F and G ( in practice ), but in theory a simulator can simulate G through function F completely. Note that the underlying processes are DIFFERENT(!) in simluation.

Emulation : ( inside the black box ) when looked inside the box , the way the transfer function f is achieved is exactly the same as the function G, i.e. in order to achieve the same results as G , the internal processes are exactly the same and since these processes are the same, the resulting transfer function is the same. That’s why we can’t have a car emulator : it would mean building the car we want to emulate, because the functional properties of the mechanics of the car can’t be reproduced properly without using the actual mechanics. Behavior of software however CAN be emulated. The processes used in software can be completely reproduced using a completely different programming language. That’s why we can have Spectrum or Memotech emulators on current day PCs( Spectrum and Memotech are computer brands from the 80s ). The computer processes themselves can be easily copied on a totally different platform and yield exactly the same result every single time they are run. Note that the underlying processes are THE SAME(!) in emulation.

Hybrid : of course it is possible to use hybrid forms : some parts of the box are emulations( copy the physical process ) and other parts or simulations( run a ( mathematical ) model of the process : an approximation ).