I recently studied that "byte code" is closer to machine language but it is a code that is not a machine language. Why we need to take an intermediate step between converting the programming language and then comes the binary code which is I am not getting like is it 10101?
Byte code is considered as the intermediate-level code between the source code and machine code. It is a low-level code that is the result of the compilation of a source code(programming language) which is written in a high-level language.It targets a virtual machine rather than a specific computer architecture. Bytecode allows a single compiled binary to run, and perform with almost native efficiency, on a diverse array of platforms.
Machine code(binary code) is in binary (0’s and 1’s) format which is completely different from the byte code and source code. It is regarded as the most lowest-level representation of the source code. Machine code is obtained after compilation or interpretation. It is also called machine language.Machine code is a set of instructions in machine language.
A virtual machine converts the bytecode into machine code.Furthermore, the main difference between machine code and bytecode is that the processor or the CPU can directly execute the machine code. On the other hand, after compiling the source code the bytecode is created. The virtual machine can execute it.
What is the difference between "binary code" and "byte code"?