
EngineeringLevel: IntermediateAvailable in: Excel 2007+
In this article
- Syntax
- Examples
- Example 1
- Common errors and fixes
- Related functions
DEC2BIN converts a number to binary text. Good for teaching, flags and subnet masks, but it only handles −512 to 511.
Syntax
=DEC2BIN(number, [places])
| Argument |
What it means |
places |
Pad with leading zeros. |
Examples
Example 1
=DEC2BIN(13, 8)
Returns 00001101.
Common errors and fixes
| You see |
Why, and the fix |
#NUM! |
Number outside −512…511. Use BASE(n, 2) for bigger values. |
BIN2DEC · DEC2HEX · BASE
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong