For that kind of thing probably mostly boolean algebra, formal logic & knowledge of finite state automata. I would start by reviewing the Von Neumann architecture.
Not to discourage you but truly contemplating how even fairly rudimentary devices like the control system of a microwave works without employing at least a few levels of abstraction is impossible. The computer field is very good at building on itself. The math that underpins one layer of abstraction may have very little to do with the math that builds the layer immediately above or below it.
So just BE warned. Try to figure out what you really want to do or understand. If you don't you can easily find yourself falling down a multiple year deep rabbit holes on things which on the surface seem completely trivial. Of course that could just lead to a career in computers so not necessarily the worst thing.