Excel like a finance pro.
← The libraryPractice · 2 questions →
Engineering function
DEC2BIN
Converts a decimal number to binary.
Rarely usedDifficulty 1200 · ProficientUsage rank #338 of 520
When to use it
Converts a decimal number (-512 to 511) to binary text, optionally padded with zeros.
The shape of it
- Syntax
=DEC2BIN(number, [places])
Worked examples
Simple
=DEC2BIN(10) → 1010
Ten in binary.
Padded
=DEC2BIN(5,8) → 00000101
Padded to eight bits.
Negative
=DEC2BIN(-1) → 1111111111
Negatives are ten-bit two's complement.
Worth knowing
- BASE(number,2,places) handles numbers beyond 511.
- Bit flags: DEC2BIN(flags,8) shows which options are on.
- The result is text.
Where it goes wrong
- #NUM! outside -512 to 511 or when places is too small.
- Non-integers are truncated.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.