Warning: Wikipedia contains spoilers.

The answer to the Ultimate Question of Life, the Universe and Everything, as given by the supercomputer Deep Thought to a group of mice in Douglas Adams's comic science fiction series The Hitchhiker's Guide to the Galaxy, is "42". According to the Guide, mice are 3-dimensional profiles of a pan-dimensional, hyper-intelligent race of beings. They built Deep Thought, the second greatest computer of all time and space, to tell them the answer to the question of life, the universe and everything. After seven and a half million years the computer divulges the answer: 42.

"Forty-two!" yelled Loonquawl. "Is that all you've got to show for seven and a half million years' work?"
"I checked it very thoroughly," said the computer, "and that quite definitely is the answer. I think the problem, to be quite honest with you, is that you've never actually known what the question is."

The computer informs the researchers that it will build them a second and greater computer, incorporating living beings as part of its computational matrix, to tell them what the question is. That computer was called Earth and was so big that it was often mistaken for a planet. The question was lost minutes before it was to be outputted, due to the Vogons' demolition of the Earth, supposedly to build a hyperspace bypass. (Later in the series, it is revealed that the Vogons had been hired to destroy the Earth by a consortium of philosophers and psychiatrists who feared for their jobs should the meaning of life become common knowledge.)

Already booked for a round of talk-show appearances to reveal the Question, the mice become desperate to discover it. During a meeting with Arthur Dent and his companions on the planet Magrathea, Frankie and Benjy mouse reveal a plan to extract the ultimate question from Arthur's brain. Since this involves removing and dicing his brain, Arthur is unwilling to go along with the plan. He manages to escape from them unscathed.

Lacking a real answer, the mice proposed to use "How many roads must a man walk down?" as the question for talk-shows (having rejected the question, "What's yellow and dangerous?" - actually a riddle whose answer, not given by Adams, is "Shark-infested custard").

At the end of the book The Restaurant at the End of the Universe (volume 2 of the Hitchhiker's trilogy), Arthur Dent (as the last human to have left the Earth before its destruction, and therefore the portion of the computer matrix most likely to hold the question) attempts to discover the Question by extracting it from his unconscious mind, through pulling Scrabble letters at random out of a sack. The result is the sentence "WHAT DO YOU GET IF YOU MULTIPLY SIX BY NINE".

"Six by nine. Forty-two."

"That's it. That's all there is."

Since 6 x 9 = 54, this being the question would imply that the universe is bizarre and irrational; on the other hand, there is no proof that this was the actual question. After all, Arthur Dent comprised only a minuscule fragment of the vast and complex computer matrix that was the Earth, and besides, it was stated that the computer's run had not finished when it was destroyed. In addition, Arthur and Ford realized that the original ape-like inhabitants of Earth were displaced by the Golgafrinchanss, which could account for the irrational nature of the question in Arthur's mind (as he himself is a descendant of the Golgafrinchans).

However, it was later pointed out that 6 x 9 = 42 if the calculations are performed in base 13, not base 10. Douglas Adams was not aware of this at the time, and has denied that base 13 has anything to do with it.

In the original radio series, this scene occurs at the end of the first series (Fit the Sixth). On discovering the question, Arthur Dent remarks "I always said there was something fundamentally wrong with the universe.".

"42" is often used in the same vein as a metasyntactic variable; 42 is often used in testing programs as a common initializer for integer variables.

Google has recently added a calculator function to its search engine, which contains a formula for the question answer to life the universe and everything.

Computer programmers' joke

There is a joke amongst computer programmers that Deep Thought may have had some order of operations issues. The following code in the programming language C defines the macros SIX as "1 + 5" and NINE as "8 + 1", and then performs the computation "SIX * NINE". It returns the answer "42", because "SIX * NINE" is expanded by the computer to "1 + 5 * 8 + 1", and the multiplication takes precedence over the additions. (A macro is not a variable.)

 #include 

#define SIX 1 + 5 #define NINE 8 + 1

int main() { printf( "The meaning of life: %d\\n", SIX * NINE ); return( 0 ); }

See also: Meaning of life

External links