You probably meant invented, not discovered.
This is very hard to pinpoint and still is in discussion on who made the first real computer.
I would bet it was Alan Turing when he invented Enigma machine, which can be considered a model of a general purpose computer.