You are partially correct. His degrees are in mathematics. Yet, he is a professor of computer science. And his scientific contributions have mostly been to what today is called computer science. What this demonstrates is that the two fields have an overlap, which has been becoming narrower over the last 50 years. In reality, there is a large variety of overlapping fields of study here, and our naming has not kept up with them. I am very happy to see that today many universities have separate departments for computer sciences and computer engineering, since those fields have diverged considerably.No, no, no!!!! He is a mathematician.
By the way, I highly recommend Don Knuth's "Concrete Mathematics" book. It is the clearest and most fun to read introduction to integer mathematics and combinatorics.
Also: Above I said that Don Knuth is "not a programmer". That statement is true: he is primarily a scientist. But he is also a great programmer. If you read his source code (for example the TeX source, which I have somewhere in book form), it is incredibly well written, cleanly structured, nicely thought out, clean and clear, and well maintainable. It is the product of a good engineer. And he is also perfectly capable of taking other people's code (like Tim's dvips, which is written in C) and working on it (I think Don restructured it over a summer, sometime in the 90s).