top of page

How to Use the OCT2BIN Function

How to Use the OCT2BIN Function in Excel

The OCT2BIN function converts octal numbers into binary form.

Contents:


Syntax

= OCT2BIN(number,[places])

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

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


Explanation

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


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


The binary 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 "777" in octal or 111111111 in binary form.


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.


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.


Examples

How to Convert Octal Number to Binary

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

Convert octal number to binary in excel

The formula to convert from octal to binary would be:

= OCT2BIN(octal_number)

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

excel convert octal number to binary formula

Using the OCT2BIN function in the right column lets us easily convert multiple octal numbers at once.

convert octal numbers to binary in excel using a formula

bottom of page