A register machine has finitely many states and finitely many addressed registers, together with instructions that inspect and modify register contents and change state. A computed partial function is defined by the contents at the halt state.
In a string register machine, appends to register ; branches according to whether its final letter is ; tests emptiness; and branches to when empty, or deletes the final letter and branches to otherwise.
A machine computes the characteristic function of a language when it halts on every input with the one-letter output for inputs in and for inputs outside .
Two string registers can recognize by storing one marker per and removing one per . A machine with only its input register cannot: two different terminal -block lengths eventually reach the same state and remaining prefix, forcing equal outputs for one member and one nonmember.
To recognize words ending in a fixed symbol , test the final input letter, choose one of two erasing loops, and append after the accepting loop or after the rejecting loop. The empty word follows the rejecting branch.
Replace the original halt state by a continuation state that tests whether its one-letter output is or , removes it, appends the other symbol, and enters a new halt state. This computes the complement language without changing termination behavior.

Articles by others on the same topic (1)

A register machine is a theoretical computing model that is used to study computation and algorithms. It is one of the simplest forms of abstract machines, similar to a Turing machine, but operates with a different set of rules and structures. Register machines are composed of: 1. **Registers**: These are storage locations that hold non-negative integer values. Each register can be used to store a number during the computation.