Converts a binary number to octal.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
BIN2OCT(number, [places])The BIN2OCT function converts a binary string into its octal equivalent. If the number is negative, it is represented in two's-complement notation.
=BIN2OCT("1100100")ผลลัพธ์: 144
Converts the binary 1100100 to the octal value 144.
=BIN2OCT("101", 4)ผลลัพธ์: 0005
Converts binary 101 to octal 5, padded to 4 characters.
The number argument cannot contain more than 10 characters (10 bits).
This usually happens if the binary number is invalid or exceeds the 10-bit limit.