0x2A in decimal — the answer to life, the universe and everything

A joke from 1979 that doubles as a clean base-conversion exercise: two hexadecimal digits, one decimal answer.

Number bases and coding · Level: Classic result · Updated on 2026-11-09

Deep Thought's answer is 42. In hexadecimal that is 2×16 + 10 = 2A, because the digit A stands for ten. Programmers meet it constantly: 42 is the ASCII code for the asterisk, and 0x2A shows up in interrupt tables and permission bits.

Open the base converter with 2A entered as hex and all four rows update together: HEX 2A, DEC 42, OCT 52, BIN 101010. Same value, four place-value systems — which is the whole point of the tool.

Answer

42

How to read it

Same screen: OCT 52 and BIN 101010.

Source

Douglas Adams, The Hitchhiker's Guide to the Galaxy (1979); the byte 0x2A is 42 in every ASCII-derived encoding

Work it in the calculator

These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.

This is an independent third-party tool site. It is not affiliated with, sponsored by, or authorised by Casio, Texas Instruments or their distributors. Model names and product names are trademarks of their respective owners and appear here only to identify devices.

The keystroke sequences in these manuals were written from this site's own layout data — the same data the online calculator renders — plus publicly available product facts. Specifications and regional configurations are confirmed against the physical device and the manufacturer's most recent material.