This is a quite famous quote:
640k ought to be enough for anybody.
Did Bill Gates say this?
Bill Gates himself addressed this in 1996 in a column he wrote:
I've said some stupid things and some wrong things, but not that. No one involved in computers would ever say that a certain amount of memory is enough for all time … I keep bumping into that silly quotation attributed to me that says 640K of memory is enough. There's never a citation; the quotation just floats like a rumor, repeated again and again.
Excerpt from: CAREER OPPORTUNITIES IN COMPUTING -- AND MORE, New York Times Syndicate, 1996
He actually addressed it again in 2001:
Do you realize the pain the industry went through while the IBM PC was limited to 640K? The machine was going to be 512K at one point, and we kept pushing it up. I never said that statement — I said the opposite of that.
According to Quote Investigator, the evidence is inconclusive.
In 1985 InfoWorld quoted him as saying
When we set the upper limit of PC-DOS at 640K, we thought nobody would ever need that much memory. (The quote was not sourced)
The way I would interpret this is that he thought PCs and PC-DOS would be dead before the memory limit would be a problem. This was the norm at the time, new computer architectures arrived all the time and backwards compability was a much smaller issue than just a few years later.
In 1989 Gates said, and this is recorded,
I have to say that in 1981, making those decisions, I felt like I was providing enough freedom for 10 years. That is, a move from 64k to 640k felt like something that would last a great deal of time. Well, it didn’t – it took about only 6 years before people started to see that as a real problem.
More details available in the above link.
No, at least not according to Wired:
Check out this feature on the Huntsville Times (Tennessee) Web site, where you can read Bill Gates' impassioned denial that he ever said anything as potentially unprofitable as the quote attributed to him, and where you can also see just how safe our bet really is.
On the site, Gates takes questions from kids.
QUESTION: "I read in a newspaper that in l981 you said '640K of memory should be enough for anybody.' What did you mean when you said this?"
ANSWER: "I've said some stupid things and some wrong things, but not that. No one involved in computers would ever say that a certain amount of memory is enough for all time."