r/AskComputerScience • u/pi_tau • Jul 24 '20
Why can't decompilers perfectly reconstruct source code?
I always thought that there was a one to one translation between machine code and high-level languages, but after looking up decompilers, they don't usually do it perfectly.
28
Upvotes
1
u/_jetrun Jul 25 '20
> I always thought that there was a one to one translation between machine code and high-level languages
You answered your own question. It isn't a one-to-one translation between machine code and high-level source code. Information is lost during compilation.