The Ethereum Virtual Machine
Bytecode execution.
The Ethereum Virtual Machine is a free Web3 & DApp Development Fundamentals lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Web3 & DApp Development Fundamentals learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is the EVM?
The Ethereum Virtual Machine (EVM) is the runtime that executes smart contract code on every Ethereum node.
It is a sandboxed, deterministic computer shared by the whole network.
A Global Computer
The EVM is often called a world computer. Every full node runs the same EVM and processes the same transactions, arriving at the same result.
This shared execution is what gives Ethereum a single, agreed-upon state.
Stack-Based Machine
The EVM is a stack machine: operations push and pop values from a stack rather than using named registers.
For example, addition pops two values and pushes their sum.
PUSH1 0x05 // stack: [5]
PUSH1 0x03 // stack: [5, 3]
ADD // stack: [8]Bytecode
Smart contracts are deployed as bytecode — a compact sequence of bytes the EVM understands. Solidity source is compiled down to this bytecode.
The EVM never sees your high-level Solidity; it only runs bytecode.
Solidity source
| (compiler: solc)
v
EVM bytecode (0x6080604052...)
| (deployed)
v
EVM executes itOpcodes
Bytecode is made of opcodes — single-byte instructions like ADD, MUL, SLOAD, and JUMP.
Each opcode performs one low-level operation and has a fixed gas cost. We explore opcodes in a later lesson.
Deterministic Execution
The EVM is fully deterministic: the same inputs always produce the same outputs on every node.
This is essential — if nodes disagreed on results, the network could never reach consensus on the state.
256-bit Word Size
The EVM operates on 256-bit words (32 bytes). This large size suits cryptographic operations like hashing and elliptic-curve math.
It is unusual compared to the 32- or 64-bit words of ordinary CPUs.
Gas Metering
The EVM meters gas as it runs. Each opcode deducts its gas cost, and execution halts if gas runs out.
This guarantees termination and prevents any contract from running forever.
The Sandbox
EVM execution is sandboxed: contract code cannot access the network, filesystem, or other processes.
It can only read and write blockchain state. This isolation keeps execution predictable and secure.
EVM-Compatible Chains
Many other blockchains run the EVM or a clone of it — Polygon, BNB Chain, Avalanche C-Chain, and Arbitrum among them.
This EVM compatibility lets developers deploy the same contracts across many chains.
Putting It Together
The EVM is a deterministic, sandboxed, stack-based virtual machine that executes contract bytecode on every node, metering gas and operating on 256-bit words.
Its determinism is the foundation of network consensus.
Quick Check
Test your EVM knowledge.
Recap: The EVM
You learned that:
- The EVM runs smart contract bytecode on every node
- It is a stack-based, deterministic, sandboxed machine
- Solidity compiles to bytecode made of opcodes
- It uses 256-bit words and meters gas
Next: EVM data locations.
Frequently asked questions
Is the “The Ethereum Virtual Machine” lesson free?
Yes — the full text of “The Ethereum Virtual Machine” is free to read here on the web, and the Web3 & DApp Development Fundamentals course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Web3 & DApp Development Fundamentals course, upgrade to CoddyKit PRO.
What will I learn in “The Ethereum Virtual Machine”?
Bytecode execution. You practise Web3 & DApp Development Fundamentals with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Web3 & DApp Development Fundamentals?
No prior experience is required. Web3 & DApp Development Fundamentals on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Ethereum Virtual Machine” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Web3 & DApp Development Fundamentals lesson?
Yes. Every Web3 & DApp Development Fundamentals lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The Ethereum Virtual Machine
- Storage, Memory, Stack
- Opcodes
- Accounts and State