BIN2OCT Function in Google Sheets

Convert a binary number to an octal number using the BIN2OCT function.

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

  1. Basic Conversion

Convert the binary number 1011 to octal:

=BIN2OCT(1011)

This will output 13.

  1. 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.
  • BIN2DEC: Convert a binary number to a decimal number.
  • BIN2HEX: Convert a binary number to a hexadecimal number.