Converts a decimal number to binary.
구문
DEC2BIN(number, [places])인수
number필수
The decimal integer to convert, ranging from -512 to 511.
places선택
The number of characters to use; if omitted, the minimum number of characters is used.
The DEC2BIN function takes a decimal integer and returns its binary equivalent as a text string. If the number is negative, the function returns a 10-character two's complement binary number.
=DEC2BIN(10)→1010Converts the decimal number 10 to its binary representation.
=DEC2BIN(5, 8)→00000101Converts 5 to binary with a fixed length of 8 characters.
Select a cell
Click on the cell where you want to display the binary result.
Enter the formula
Type =DEC2BIN( followed by the decimal number and optionally the number of places, then close the parenthesis.
The function supports decimal integers from -512 to 511.