I always wondered about how executable binary files actually work. Compilation is always stated as
taking the source code and translating it to machine language
But what does that really mean? Namely:
- Can I move a binary file from computer A to computer B and expect it to work? (assuming that I also move the appropriate libraries)
- Is every executable binary file made to work with a specific processor?
- What sort of information is inside an executable binary file?
- How come executable files on windows can be launched on any windows version? (It's an other story if they work)
- Why can't I run a Linux executable on Windows? Does it have to do with the kernel(so not the processor)?
Mind that I have limited knowledge on processors and compilers and none on assembly.