eli5 what makes a ARM Cpu different from a x64 cpu ? why can’t apps from x64 run on ARM or vice versa

326 views

eli5 what makes a ARM Cpu different from a x64 cpu ? why can’t apps from x64 run on ARM or vice versa

In: 1

8 Answers

Anonymous 0 Comments

Imagine you and I want to have a chat where you give me a recipe.

We can only converse in numbers, however.

So we decide to come up with a code that maybe “instruction 1” is “pour”, 2 is “whisk”, 3 is “cover with foil”, and so on. And we also have codes for locations, so maybe 1 is “the bowl”, 2 is “the oven”, and so on.

That works fine while we both use the same codes for instructions. And while we have the same set of instructions at all (e.g. maybe you have a code “parboil” but I don’t know what that means). But what if your code for 1 is “pour” and my code for 1 is “flame-grill”? It’s all going to go wrong.

Intel and ARM and MIPS and Z80 and all kinds of chips have historically used different codes, for different reasons and in different ways. Some chips are designed to kind the number of codes to an absolute minimum (Reduced Instruction Set Computers – RISC) and others have far more codes for all kinds of things that are rarely used. Some chips have thousands of storage locations (registers – a bit like the bowl / oven examples above) they can use in calculations, others keep it to just a few and move things around a lot more, reusing the same bowls over and over for performance reasons.

As time has gone by, Intel has kept the same codes that they were using 40 years ago, and ARM have done similarly, and they’ve both expanded with new codes when processors gained new abilities – but those codes are inherently different and the designs very different too.

So an ARM program is talking entirely different codes to an Intel program and they can’t understand each other. The job of formulating that code for any particular program is the job of a compiler, and you can “compile to ARM” or “compile to Intel” or whatever else, but the final result is a program that only runs on one type of machine.

You are viewing 1 out of 8 answers, click here to view all answers.