A Turing machine M that, given any input x and a suitable encoding of any Turing machine K, outputs the result of applying the Turing machine K to the input x. A universal Turing machine therefore can perform all the computations for the class of Turing machines. The existence of such a machine was discovered by Alan Turing in 1936. It lead to the concept of the stored-program computer.