Base Converter guide
Converting DEADBEEF: A Worked Hex Example
DEADBEEF is a valid hexadecimal number because every one of its letters is a hex digit. In decimal it equals 3,735,928,559, and in binary it is 11011110101011011011111011101111 — exactly 32 bits, which is why programmers use it as a memory marker.
Why this is a number at all
Hex digits run 0-9 and then A-F. So any word spelled using only the letters A, B, C, D, E and F is also a valid hexadecimal number.
DEADBEEF uses D, E, A, B, E, E and F — all legal. So it is simultaneously a word and a number, which is exactly why programmers picked it.
Converting it by hand
Eight hex digits, so the place values are 16⁷ down to 16⁰. Taking each digit in turn:
| Digit | Value | Place | Contribution |
|---|---|---|---|
| D | 13 | 16⁷ = 268435456 | 3489660928 |
| E | 14 | 16⁶ = 16777216 | 234881024 |
| A | 10 | 16⁵ = 1048576 | 10485760 |
| D | 13 | 16⁴ = 65536 | 851968 |
| B | 11 | 16³ = 4096 | 45056 |
| E | 14 | 16² = 256 | 3584 |
| E | 14 | 16¹ = 16 | 224 |
| F | 15 | 16⁰ = 1 | 15 |
Adding it up
Adding every contribution gives 3,735,928,559.
The calculator on this page is loaded with that decimal value converting back to hex, so you can watch it produce DEADBEEF and confirm the arithmetic in both directions.
In binary it is 11011110101011011011111011101111 — thirty-two digits exactly, because eight hex digits are always thirty-two bits.
Why programmers use it
DEADBEEF is a magic number — a recognisable value deliberately written into memory so that it stands out later.
If a program reads a variable and finds DEADBEEF, that variable was almost certainly never properly initialised. Random junk memory very rarely spells anything, so seeing a word is a strong signal that something is wrong.
It also fills exactly 32 bits, which made it a natural fit for older systems where a machine word was that size.
Other hex words
- CAFEBABE — the first four bytes of every compiled Java class file.
- DEADC0DE — used as a marker in some firmware, with a zero standing in for the O.
- BAADF00D — used by Microsoft debug builds to fill memory that has been allocated but not yet written to.
- FEEDFACE — appears in Mach-O binaries on macOS.
- 8BADF00D — an iOS crash code, meaning the app took too long to launch. It reads as "ate bad food".