- You pressed A
- A microchip in the keyboard detects which key has been pressed, and generates the appropriate ASCII code (01000001 for A)
- This is sent through the cable, into the USB (or other interface, such as PS/2 or perhaps SPI or I2C on an embedded system) port.
- It triggers an Interrupt Service routine, and is moved to the keyboard buffer in the RAM
- The CPU processes the input as per the programme's code, if there is anything that this input does
- The CPU always uses the FDE cycle
- The programme conter contents are copied to the Memory Address Register and the PC is set to point ot the next instruction.
- The instruction or data at the address in the MAR is copied to the MDR.
- The control unit decodes the instruction
- Calculations are performed by the Arithmetic and Logic Unit, with the results stored in the accumulator