What Is a Register Machine?
A register machine is a model of computation, used by hardware CPUs and some virtual machines, where instructions name the registers they read from and write to. Operations specify their source and destination registers explicitly rather than working on a stack. Register-based virtual machines often need fewer instructions than stack-based ones for the same work.
Why it matters
Register-based designs can execute fewer, denser instructions, which some virtual machines exploit for speed. Comparing them to stack machines explains a key design choice in interpreter and compiler construction.
Related guides
What Is a Stack Machine?A stack machine is a virtual machine whose instructions operate on an operand stack, pushing and popping valu…
What Is Three-Address Code?Three-address code is an intermediate representation where each instruction has at most three operands, typic…
What Is Register Allocation?Register allocation is the compiler step that decides which program values are kept in fast CPU registers and…