-3
$\begingroup$

Why are these two architectures incompatible?

$\endgroup$

closed as off-topic by David Richerby, Evil, Tom van der Zanden, Raphael Oct 10 '16 at 18:21

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about computer science, within the scope defined in the help center." – David Richerby, Evil, Tom van der Zanden, Raphael
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ For the same reason that Chinese is incomprehensible to somebody who only speaks English, and vice-versa? $\endgroup$ – David Richerby Oct 8 '16 at 12:03
3
$\begingroup$

The PowerPC and Intel architectures vary individually in their various iterations, and are in many ways incompatible. This means the instruction sets for each will not be compatible, as well.

There are a lot of reasons why any two given architectures will not be compatible (register number/size, memory allocation schemes, processing unit differences, bus width, etc.), but at a basic level the instruction sets for the two architectures are different. You can look at the differences between them; using an iteration of each at random, the PowerPC instruction set and the Intel instruction set have different opcodes. So, even within different generations of an individual architecture family there is likely to be some incompatibility between any given assembly program, as the underlying opcodes can be different.

So, this question is a bit like asking why isn't someone who knows a human language x able to understand an animal call y? The underlying languages and structures of both systems are essentially different, while sharing some functionality at a high level. There are examples where the two share functionality and can overlap or communicate (honey birds in Africa and people who are able to call to them, people who can practice calls for various species, human use of artificial calls, etc.), but generally they are only vaguely similar in that they are both "languages," and one would not expect them to be 100% compatible.

$\endgroup$
  • 1
    $\begingroup$ Mnemonics are irrelevant to the compiled code. Assembly language is just another programming language, so you're free to write an assembler that calls the ADD instruction "PLUS" or "MULT" or anything you want. It would be super-confusing, but it wouldn't affect the binary. $\endgroup$ – David Richerby Oct 8 '16 at 12:19
  • 1
    $\begingroup$ Mnemonics are purely an aid to the programmer, because it's easier to remember "MOV" than "instruction 56" or whatever. The point is whether or not you have an architecture with floating-point instructions. The CPU never sees the mnemonic: only the op-codes. $\endgroup$ – David Richerby Oct 8 '16 at 18:50
  • 1
    $\begingroup$ The CPU executes programs by receiving a stream of opcodes. If CPU A believes that opcode 1 means "add two numbers" and CPU B believes that opcode 1 means "multiply two numbers" then you can't execute a program intended for A on B. The mnemonics are just a programming language. Tomorrow, Intel could declare "From now on, our assembler uses this new set of mnemonics, which are completely different from the current ones." They would not need to change the CPU at all. Programs written with the old mnemonics would continue to work identically to how they worked before. $\endgroup$ – David Richerby Oct 9 '16 at 10:57
  • 1
    $\begingroup$ So, no, it is not a distinction without a difference. The mnemonics are something the CPU never sees. They're not a different perspective (like binary versus voltages): they are literally irrelevant to the actual execution of the program. They're just names. Would the Beatles be the same band if they changed their names to Jim, Bob, Fred and Norm? Yes. It would be annoying to talk about them but they'd still play exactly the same music and you wouldn't be able to tell that they'd changed their names just by listening to them. $\endgroup$ – David Richerby Oct 9 '16 at 11:00
  • 1
    $\begingroup$ You're welcome -- glad to be able to help. $\endgroup$ – David Richerby Oct 10 '16 at 19:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.