Computers run code, but also do input and output, or I/O. There are way too many ways this happens to even summarize. Input devices convert whatever they are doing into numerical information, then code running on the computer interprets it. It then can send data to an output device. These devices use a wide variety of circuits. In the case of a keyboard, there are matrix decoders, shift registers, and others. There are lots of books on computer basics and digital electronics, I’d check one of those out.
Latest Answers