Converts a decimal number to binary.
Hàm này hoạt động trong Google Sheets giống như trong Excel — cùng cú pháp và đối số.
DEC2BIN(number, [places])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)Kết quả: 1010
Converts the decimal number 10 to its binary representation.
=DEC2BIN(5, 8)Kết quả: 00000101
Converts 5 to binary with a fixed length of 8 characters.
The function supports decimal integers from -512 to 511.