>A REAL state machine is a simultaneously switchjing (clocked or ripple >through) piece of hardware. Ah, you mean a state machine is a microprocessor, then. Well, a microprocessor is certainly a state machine (of rather large complexity, of course.) In hardware, "state machine" is usually used to describe a piece of logic where the inputs and current state control transitions to a new state, and the outputs are dependent only on the state (as opposed to logic whose output is a combinatorial function of the inputs.) It's typicaly implemented as a couple of roms. The first rom maps inputs and old state into new state, and the second rom maps the new state into outputs. In software, "state machine" is usually used to describe code where program flow is controlled primarilly by a single small integer variable (the "state".) Other control decisions affect the state value, rather than directly modifying the program flow. Software types are likely to cheat and cause their code to break by doing things only when a state is entered or exitted. BillW