Someone asked me when someone presses key "A", how does a PC recognizes which key is pressed? I don't actually know and I don't think it's important for a programmer to know. However, this triggered other questions in my head!
For example, What is a file? Is it a group of strings or something related to the hard-desk?
Where is the line between software and hardware? I mean, there are situations where you should know as a programmer when the CPU is executing your program, or it is waiting for data from Memory, or that it is waiting for the Hard-desk to finish a writing operation etc.
Even if a programmer shouldn't care about such matters, it would be really satisfying to understand how things are working.
I wasn't successful in searching the web. Maybe I'm not using the right keywords. How should I approach clarifying these issues? Any recommended book?