There is a timer generating a square wave signal (pulse), as long as the device works. All actions are synchronized with the heartbeats.
Conventionally, 1 is indicated when the voltage is above a high threshold,
and a 0 when it is below some low threshold. Electronic elements (based on NAND) "know" when the signal 0 and 1 and on their basis to create logic functions.FOR DIGITAL ELECTRONIC LOGIC GATELogic circuits
and their simulation