Source Code
Learn what source code is, and how it differs from machine code.
We'll cover the following
Solving the human-readability issue
Machine code is a low-level representation of a program. This format of instructions and data is convenient for the processor. However, it’s hard for a human to write a program in machine code. It became even more complicated as computers’ performance increased, which allowed greater program complexity.
There are two types of special applications to solve this problem: compilers and interpreters. They translate the program from a human-readable language into machine code. Compilers and interpreters solve this task differently.
Programming languages
Nowadays, programs are written in programming languages. They differ from the natural languages that humans use to communicate.
Programming languages are formal and very limited. Using them, we can express only actions that a computer can perform. There are strict rules on how we should write these actions. For example, we can use a small set of words and combine them in specific orders.
The source code is the text of the program that is written in a programming language.
Compiler and interpreter
The compiler and interpreter process source code differently. The compiler reads the entire program text, generates machine code instructions, and saves them on a disk drive. The compiler does not execute the resulting program on its own.
Get hands-on with 1200+ tech skills courses.