Engineering
All versions
◉ 6 views
=BIN2OCT()
Converts a binary number to octal.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=BIN2OCT(number, [places])
Hover argument names in the table for details.
Output typeNumber/Text
Popularity43 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon
▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =BIN2OCT() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
🧠 🧠 Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
number |
Text | Required | The binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation. |
places |
Number | Optional | The number of characters to use. If places is omitted, BIN2OCT uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros). |
▣ Examples
Converts binary 1001 to octal with 3 characters
=BIN2OCT(1001, 3)
Result:
011
Converts binary 1100100 to octal
=BIN2OCT(1100100)
Result:
144
Converts binary 1111111111 to octal
=BIN2OCT(1111111111)
Result:
7777777777
§ Remarks
- If number is not a valid binary number, or if number contains more than 10 characters (10 bits), BIN2OCT returns the #NUM! error value.
- If number is negative, BIN2OCT ignores places and returns a 10-character octal number.
- If BIN2OCT requires more than places characters, it returns the #NUM! error value.
- If places is not an integer, it is truncated.
- If places is nonnumeric, BIN2OCT returns the #VALUE! error value.
- If places is negative, BIN2OCT returns the #NUM! error value.
✦ Tips
- If number is negative, BIN2OCT ignores places and returns a 10-character octal number.
- If places is not an integer, it is truncated.
⚠ Common Errors
#NUM!
If number is not a valid binary number, or if number contains more than 10 characters (10 bits), BIN2OCT returns the #NUM! error value. If BIN2OCT requires more than places characters, it returns the #NUM! error value. If places is negative, BIN2OCT returns the #NUM! error value.
Fix: Valid binary
#VALUE!
If places is nonnumeric, BIN2OCT returns the #VALUE! error value.
Fix: برای places یک عدد وارد کنید و موارد متنی یا خانههای خالی را اصلاح کنید.
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!