1. Home
  2. Functions
  3. Engineering
  4. DEC2BIN

DEC2BIN function

Converts a decimal number to binary.

Syntax

=DEC2BIN(number, [places])

Arguments

ArgumentRequiredDescription
numberRequiredThe decimal integer to convert
placesOptionalThe number of characters to use (left out: as few as needed)

How to use DEC2BIN

DEC2BIN takes 1 required argument and 1 optional argument. Type =DEC2BIN( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=DEC2BIN(9, 4)Result "1001"
=DEC2BIN(-100)Result "1110011100"

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.