# How math deals with state or “algebra of sequential logic”

Boolean algebra is well-studied and you could easily find a lot of introductory materials on different operators, properties, how eveything is nicely related to the algebra of sets, and so on.
Coming from the EE background, I also know that you can construct any circuit using NAND/NOR gates, because of their nice functional completeness properties. The same goes for stateful circuits, as you could build a simple stateful RS-Latch with 2 NAND/NOR gates, by applying them to each other.
This is where it gets interesting - does that mean that the state arises from the recursion? i.e.

 q = nand(r, nand(s, q))


Unfortunately, I couldn't find anything like "algebra of sequential logic" or any notion on how mathematics seems to deal with state (or, better say: time?!). Most likely, my search keywords are compeltely off.
Could you help me out? I would like to know how mathematicians deal with sequential circuits - any introductory book would be great.

• My recommended search terms are Moore Mealy FSM. – Axel Kemper Aug 8 '17 at 9:06
• algebraic automaton theory – Alvin Lepik Aug 8 '17 at 9:07
• @AxelKemper not the state machines, but the state itself. – artemonster Aug 8 '17 at 9:33

The math involved is that of Semigroups and its application to "sequential circuits" is named "algebraic theory of machines".