There are numerous theories, cultural references and a great deal of debate surrounding the choice by the late, great, Douglas Adams of ’42’ as the Answer. Before going any further, let’s get one thing straight from the horse’s mouth:
The answer to this is very simple. It was a joke. It had to be a number, an ordinary, smallish number, and I chose that one. Binary representations, base thirteen, Tibetan monks are all complete nonsense. I sat at my desk, stared into the garden and thought ’42 will do’ I typed it out. End of story.
— Douglas Adams
That having been said, here’s a thing that suggests that the universe is a far, far stranger thing than anyone could possibly imagine….
To be, or not to be: that is the question
Another English playwright has alluded to 42 in a pop culture literary work, albeit in an obscure fashion. Ask the average person to name the first English playwright that pops into their head. The answer is likely to be “William Shakespeare”. Next, ask that person to name a popular work by Shakespeare. When the question is, “Which do you think is the most well known Shakespearian play?”, the answer is almost always, “Hamlet, Prince of Denmark”. Finally, ask for a (popular) quotation from Hamlet. Again, the most likely answer will be, “To be, or not to be”.
Before leaping ahead to consider the next statement in Hamlet’s soliloquy, a necessary digression into hexadecimal and boolean logic. (Recognising, of course, that Shakespeare probably didn’t know much about base 16 and had shuffled off his own mortal coil long before George Boole gave his insights to the world.)
The statement “To be, or not to be” is homophonic with the boolean statement “0x2B | !0x2B”. Converting 0x2B to base10 yields ’43’, which is close to ’42’, but, disappointingly, not the same. However, when one examines the entire boolean expression one finds a bit pattern (0x2B = 01000010) OR’d with its ones complement. Regardless of the width of the register (i.e. number of bits), OR’ing any bit pattern with its ones complement results in a register full of ‘set’ bits (0x…FF = …11111111). Interpreting this result as an unsigned integer would be vague (how wide is the register?), but as a signed integer value and regardless of the number of bits, it is a single increment away from ‘clocking over’ to a register of ‘unset’ bits plus an overflow. Thus, this register represents a value that could be interpreted as the integer that is one less than zero (‘-1’). “To be, or not to be” can be seen as a representation of the value 42 (i.e. 43 + -1).
Consider, now, the full couplet: Hamlet states, albeit in an obscure fashion:
Forty-two. That is the question.
Thus, the observation that two English playwrights, living about 400 years apart, listening to their muses, have both expressed the value 42 in association with existential questions of “Why are we here and what is the relation of our life to the universe?”. Shakespeare connects this seemingly mystical number with the question of existence, while Adams associates it with the answer to metaphysical quandaries. When one considers the infinite possibilities that Shakespeare or Adams could have selected to express their plot/point, this is a striking coincidence. And, the public has resonated and ‘taken up’ these works as ‘popular’ or ‘cult’. Ask the average person about Twelfth Night or Dirk Gently and note the vacant look of non-recognition on their face.
It’s also curious that the original versions of The Hitchhiker’s Guide to the Galaxy also recognised another popular Shakespearian allusion wherein an infinite number of monkeys had worked out a script for Hamlet. How blatant can this obfuscation be?
The ‘duality’ of Hamlet’s reference to 42 as the question and Deep Thought’s revelation of 42 as the answer is appealing in a yin yang sort of way.