top of page

How to Use the BIN2OCT Function

How to Use the BIN2OCT Function in Excel

The BIN2OCT function converts octal numbers into binary form.

Contents:


Syntax

= BIN2OCT(number,[places])

number - The binary number you wish to convert to an octal

[places] - Optional, number of significant digits to pad the octal number


Explanation

The BIN2OCT function is part of the "Engineering" group of functions within Excel.


This function takes in binary numbers and converts them into octal form.


The returned octal number can be up to 10 characters, or bits, in length. If the length exceeds this, a #NUM error will be returned.


This means the largest number than can be represented is "7777777777" in octal or 1111111111 in binary form.


places argument to pad number BIN2OCT

When used, the optional places argument will pad the returned octal number to the left. In this example, a "4" is used, which pads the octal number "5" with three zeros to the left, making the length of the number equal 4.


What is a Binary Number

A binary number is a number expressed in the base-2 numeral system, which uses only two symbols, 0 and 1.


Each digit in a binary number is a bit, and the value of each bit is based on its position, with each position representing a power of 2, increasing as you move from right to left.

binary numbers visually explained

In this example, instead of the base increasing by 10x as we go up, the base is increased by 2x each step.


Each 0 and 1 value in the binary number is multiplied by the base, and the sum of all of the multiplied values is the corresponding decimal number.


What is an Octal Number

The octal number system uses base 8, and uses the standard 0-9 digits.


Because octals use a base 8, this means that the as the numbers of digits increase, their place value, increases by a power of 8. The first being 8^0 = 1, next being 8^1 = 8, 8^2 = 64, and so on.


If we look at it visually, it would look like this:

understanding how octal numbers are calculated

In this example, the octal number 146 is calculated by multiplying the first value , "6", by 1, the second value "4" by 8, and finally the third value "1" by 64, and then adding them all together to get 102.


Examples

How to Convert Binary Number to Octal

Let's say we have a table of binary numbers, and need to convert them into octal.

Convert binary number to octal in excel

The formula to convert from binary to octal would be:

= BIN2OCT(binary_number)

If we plug this formula into the table, the formula returns the correct octal number.

excel convert binary number to octal formula

Using the BIN2OCT function in the right column lets us easily convert multiple binary numbers at once.

convert binary numbers to octal in excel using a formula

bottom of page