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:

DigitValuePlaceContribution
D1316⁷ = 2684354563489660928
E1416⁶ = 16777216234881024
A1016⁵ = 104857610485760
D1316⁴ = 65536851968
B1116³ = 409645056
E1416² = 2563584
E1416¹ = 16224
F1516⁰ = 115

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".

FAQ

Related questions

What is DEADBEEF in decimal?

3,735,928,559. It is a valid hex number because D, E, A, B and F are all hexadecimal digits.

Why do programmers use DEADBEEF?

As a magic number that fills uninitialised memory. Because it spells a word, it is instantly recognisable in a debugger, unlike random data.

What other words can be written in hex?

Anything using only A to F — CAFE, FACE, BEEF, DECADE, FEEDBAC. Digits are sometimes substituted for letters, as in 8BADF00D.

Take Base Converter with you

The app adds plain-English AI explanations, dark mode, and works offline — useful when there is no signal or the exam hall has no Wi-Fi.

Free to download. AI explanations and dark mode are part of the optional PRO subscription.