Home : Software Terms : Bytecode Definition

Bytecode

Bytecode is program code that has been compiled from source code into low-level code designed for a software interpreter. It may be executed by a virtual machine (such as a JVM) or further compiled into machine code, which is recognized by the processor.

Different types of bytecode use different syntax, which can be read and executed by the corresponding virtual machine. A popular example is Java bytecode, which is compiled from Java source code and can be run on a Java Virtual Machine (JVM). Below are examples of Java bytecode instructions.

  • new (create new object)
  • aload_0 (load reference)
  • istore (store integer value)
  • ladd (add long value)
  • swap (swap two values)
  • areturn (return value from a function)

While it is possible to write bytecode directly, it is much more difficult than writing code in a high-level language, like Java. Therefore, bytecode files, such as Java .CLASS files, are most often generated from source code using a compiler, like javac.

Bytecode vs Assembly Language

Bytecode is similar to assembly language in that it is not a high-level language, but it is still somewhat readable, unlike machine language. Both may be considered "intermediate languages" that fall between source code and machine code. The primary difference between the two is that bytecode is generated for a virtual machine (software), while assembly language is created for a CPU (hardware).

Updated: January 23, 2018

Cite this definition:

https://techterms.com/definition/bytecode

TechTerms - The Tech Terms Computer Dictionary

This page contains a technical definiton of Bytecode. It explains in computing terminology what Bytecode means and is one of many software terms in the TechTerms dictionary.

All definitions on the TechTerms website are written to be technically accurate but also easy to understand. If you find this Bytecode definition to be helpful, you can reference it using the citation links above. If you think a term should be updated or added to the TechTerms dictionary, please email TechTerms!