community
directory
books
authors
images
encyclopedia

Email:
Password:
Register

Knowledgerush Search

 

Google
  Web knowledgerush


Search for images of Byte code


Message boards   Post comment

Byte code

Byte-code is a sort of intermediate code that is more abstract than machine code. It is often treated as a binary file containing an executable program much like an object module, which is a binary file containing a machine code produced by compilers.

Byte-code is called so because usually each op code is one-byte length but the length of instruction code varies. Each instruction has one byte operation code from 0 to 255 followed by parameters such as registers or memory address. This is a typical case, but the specification of bytecode largely varies in language.

As is in intermediate code, it is a form of output code used by programming language implementors to reduce dependence on specific hardware and ease interpretation.

Less commonly, bytecode is used as an intermediate code of a compiler. Some systems, called dynamic translators, or "just-in-time" (JIT) compilers, translate bytecode into machine language immediately prior to runtime to improve execution speed.

A byte-code program is normally interpreted by a byte-code interpreter (usually called virtual machine since it is like a computer machine). The advantage is portability, that is, the same binary code can be executed across different platforms or architectures. This is the same advantage as that of interpreted languages. However, because bytecode is usually less abstract, more compact, and more computer-centric than program code that is intended for human modification, the performance is usually better than mere interpretation. Because of its performance advantage, today many interpreted languages are actually compiled into bytecode once then executed by bytecode interpreter. Such languages include Perl and Python. Java code is typically transmitted as bytecode to a receiving machine, which then uses a JIT compiler to translate the bytecode to machine code before execution. The current implementation of the Ruby programming language actually does not use bytecode, instead, it relies on tree-like structures, which resembles intermediate representation used in compilers.

Also of interest are p-Codes, which are just like byte codes, but may be physically larger than a single byte and may vary in size (much like Opcodes do). They work at very high levels, such as "print this string" and "clear the screen". Both BASIC and some versions of Pascal use p-Codes.

Examples

Referenced By

Op code | Opcode

 

Compose Your Message

Your Email Address or Pen Name (optional):
Subject:
Your Message:
 

 

 

 

 

 

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Byte code".

 

Contact UsPrivacy Statement & Terms of Use

 
Copyright © 1999-2003 Knowledgerush.com. All rights reserved.