The computer, at its core, is an input-output device: it receives instructions, executes programmes, performs calculations ...
Sophisticated silk-weaving loom dating back to the Western Han dynasty used physical pattern cards which acted like ancient software.