In computer science, state is a concept in automata theory which occasionally extends into some forms of systems programming such as lexers and parsers.

Whether the automaton in question is a finite state machine, a pushdown automaton or a full-fledged Turing machine, a state is a particular set of instructions which will be executed in response to the machine's input. The state can be thought of as analogous to a practical computer's main memory. the behavior of the system is a function of (a) the definition of the automaton, (b) the input, and (c) the current state.