Open In App

Difference Between Compile Time and Execution Time Address Binding

Last Updated : 12 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

When a program runs on your computer, it goes through several stages before it actually does what it's meant to do. One important part of this process is something called "address binding" i.e. basically figuring out where in memory different parts of the program will live. This binding can happen at different times, like when the program is being compiled or when it’s actually running.

There are 3 types of Address Binding:

  1. Compile Time Address Binding
  2. Load Time Address Binding
  3. Execution Time Address Binding
Address-Binding
Address Binding

Here, we compare Compile Time and Execution Time address binding as following:

Compile Time Address Binding

If the compiler is responsible of performing address binding then it is called as compile time address binding. This type of address binding will be done before loading the program into memory. The compiler required to interact with the operating system memory manager to perform compile time address binding.

Example:

Imagine you're writing a small C program:

int a = 10;

When this program is compiled, the compiler might decide that the variable a will be stored at memory location 1000. So wherever the program refers to a, it will directly use address 1000. This means:

  • The address is fixed before the program runs.
  • If the program is moved to another location in memory, it won’t work correctly unless recompiled.

Execution Time or Dynamic Address Binding

The address binding will be postponed even after loading the program into memory. The program will keep on changing the locations in the memory till the time of program execution. This type of Address binding will be done by the processor at the time of program execution.

Example:

Now, suppose you're running a big application like a game or a web browser. When you open the app:

  • The operating system loads it into available memory.
  • But instead of fixed addresses, the program uses logical (virtual) addresses.
  • The processor, using something like the Memory Management Unit (MMU), translates those logical addresses into actual physical memory addresses while the program is running.

So even if the program is loaded into a different part of memory every time, it still works fine because the binding is done at execution time.

Read more about Address Binding and its Types

Difference Table

Compile Time Address BindingExecution Time Address Binding
Compiler is responsible for the compile time address binding.Execution time address binding is done by processor.
It generates logical address (virtual address).It generates dynamic absolute address.
Compile time address binding is done before loading the program into memory.Execution time address binding is done at the time of program execution.
Instructions are translated into absolute address.It helps in execution.
Code is compiled here.From memory instructions are executed by CPU.
It works with logical address.It works with dynamic absolute address.
It is static address binding.It is dynamic address binding.
Compiler interacts with operating system memory manager to perform it.It is done by processor at the time of program execution.

Similar Reads