
Convert octal values to binary text in Excel. Useful when you want to inspect the bits behind a base-8 value or legacy code.
OCT2BIN converts octal text into binary text. If a value starts in base 8 and you want to see the equivalent bit pattern in base 2, this function does that translation directly.
This is useful when octal is still used as a compact code, but the real thing you want to inspect is the underlying binary pattern. That comes up in older technical formats, permission-style codes, and legacy system data.
Turns a base-8 value into base-2 text.
Returns a string made of 1 and 0.
=OCT2BIN(number, [places])
number is the octal value to convert. places is optional and pads positive results with leading zeros.
The formula converts a base-8 value into binary text so the underlying bit pattern is easier to inspect. Use places when the output should match a fixed-width field. If you leave it out, Excel returns the natural binary length for the positive value.
number must be a valid octal input using digits 0 through 7. places is optional and works only for positive results. If the binary output would be longer than the places value, Excel returns #NUM!.
OCT2BIN is useful when the final goal is to inspect bits, not just convert to a number:
| Function | What it does | Typical use | Result |
|---|---|---|---|
OCT2BIN |
Converts octal to binary | See the bits behind a base-8 value | Binary text |
OCT2DEC |
Converts octal to decimal | Get a number for math | Number |
OCT2HEX |
Converts octal to hex | Move into a base-16 format | Hex text |
BIN2DEC |
Converts binary to decimal | Turn bits back into a number | Number |
The main use is taking an octal value and expanding it into a binary pattern that is easier to inspect. A short octal code can hide a lot of information, while the binary result shows every bit directly.
The places argument helps when you want the output to line up with a fixed-width field. For example, a value like 755 can be shown as a 9-bit pattern so each position stays easy to compare. If the converted result needs more characters than the places value allows, Excel returns #NUM!.
Negative values behave differently. Excel ignores places for signed negative octal input and returns a full 10-bit binary result, which is why OCT2BIN("7777777770") returns 1111111000.
This example shows how an octal value can be expanded into the bit pattern it represents. Excel converts 77 to 111111, which is much easier to inspect if the goal is to understand which bits are active rather than to read the more compact octal code.
=OCT2BIN("77") // Returns "111111"
Convert Octal "77" to binary. Formula: =OCT2BIN("77").
The places argument is useful when the binary output must fit a fixed-width field. Here the permission-style octal value is returned as a 9-bit pattern, which makes it easier to compare the bit positions directly instead of reading only the octal shorthand.
=OCT2BIN(755, 9) // Returns "111101101"
Convert Octal "755" into a 9-bit padded binary bitmask. Formula: =OCT2BIN(755, 9).
This example shows the signed conversion behavior used by Excel's engineering functions. The octal input represents a negative value, so OCT2BIN returns the full signed 10-bit binary result 1111111000 rather than a shorter positive-looking pattern.
=OCT2BIN("7777777770") // Returns "1111111000"
Convert -8 (Octal 7777777770) to binary. Formula: =OCT2BIN("7777777770").
The octal value 377 becomes 0011111111, which makes the structure of the value much more visible. This is useful when a worksheet needs to line the result up with a defined binary field or inspect the active bits one by one.
=OCT2BIN(377, 10) // Returns "0011111111"
Convert Octal "377" to a 10-bit binary pattern. Formula: =OCT2BIN(377, 10).
Tell your friends about this post