Instruction - Execution (Execution environment)
1 - About
A execution environment is an environment that provides the facility to make code executable.
Execution is the third step in a instruction cycle.
The execution environment needs to address the following question:
- Supported operations? data transfer, arithmetic, control, floatingpoint, etc.
- Where are operands stored? registers, memory, stack, accumulator
- How many explicit operands are there for each instruction? 0, 1, 2, or 3
- How is the operand location specified? register, immediate, indirect, etc.
- What type and size of operands are supported? byte, int, float, double, string, vector, etc.
A process has a self-contained execution environment.
2 - Articles Related
3 - Execute
Example: 8-bit register that holds the number 9:
+--+--+--+--+--+--+--+--+ | 0| 0| 0| 0| 1| 0| 0| 1| +--+--+--+--+--+--+--+--+
A processor has multiple registers and it can compute an addition by placing the two numbers into two separate registers and then compute the sum, which might be saved in a third register.
When an operation is computed, the processor might copy the answer to the primary storage to save it for later use.