Jump to content

User:PineVoid/Draft of Computer code

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Computer code, program code, or just code is the set of instructions . It is one of two components of the software which runs on computer hardware, the other being the data.

Types

The term "computer code" can be used to refer to any type of code, both broad and specific. Code can be seperated into a number of categories, based on factors such as level (representativeness of actual computer functions,) hardware supported, purpose, etc. These categories are not comprehensive, and code may fall into a few or many of them.

Source Code

Source code is a type of abstracted code that is easy for humans to read and write in. It is usually written using one or more programming languages. Source code, with a few exceptions, is not executable; it is translated into object code first, only after which it can be run.

Object Code

Object code

Computers can only directly execute the machine code instructions which are part of their instruction set. Because these instructions are difficult for humans to read, and writing good programs in machine code or other low-level programming languages is a time-consuming task, most programmers write in the source code of a high-level programming language. This source code is translated into machine code by a compiler or interpreter so that the computer can execute it to perform its tasks. A compiler produces object code which is usually in machine language but may also be in an intermediate language which is at a lower level than the source. A runtime system is often used to execute object code by linking it with commonly used libraries. Bytecode is a lower level of source which is designed for more efficient interpretation by interpreters.