ARCHIVE / What is byte code?

To understand what byte code is it's helpful to understand machine code and the process of compilation. When electronic computers first began to be programmed, computer programs were written using an assembly language. Assembly languages tell a computer's processor exactly what to do, such as to copy the contents of a memory register to another register or to sum the values of two memory registers together and so on. Since the assembly languages needed to be read by human beings while the instructions needed to be read by computers, the assembly code was compiled into machine code, a digitized set of instructions for the processor to follow. As computers became faster and capable of holding larger sets of instructions, computer programming languages began to be developed. These languages were able to be translated into assembly code and thereby machine code through a process referred to as compilation.

Byte code is essentially machine code for a virtual machine. What this means is that instead of compiling code into machine code for a specific type of processor, computer code can be compiled into an intermediate set of instructions. That intermediate set of instructions can then be read by a virtual computer being run on an actual computer processor. Thus, the intermediate set of instructions is referred to as byte code to distinguish it from machine code suited only to specific processors.

last updated 2007.10.30

RELATED TOPICS

 

Terms of Use · Privacy Policy ©2021