BIN2OCT Function
The BIN2OCT
function in Google Sheets is used to convert a binary number to its octal equivalent.
Syntax
BIN2OCT(signed_binary_number, [significant_digits])
- signed_binary_number: The binary number you want to convert. This is a required parameter.
- significant_digits: (Optional) The number of digits you want the octal number to contain.
Examples
- Basic Conversion
Convert the binary number 1011
to octal:
=BIN2OCT(1011)
This will output 13
.
- Conversion with Significant Digits
Convert the binary number 1011
to octal with 4 significant digits:
=BIN2OCT(1011, 4)
This will output 0013
.
Notes
- The function can handle binary numbers up to 10 bits.
- If
significant_digits
is provided, the octal result will be padded with leading zeros to match the specified length.