Engineering Excel 2013 ◉ 24 views

=BITOR()

Returns a bitwise 'OR' of two numbers.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=BITOR(number1, number2)
Hover argument names in the table for details.
Output typeNumber/Text
Popularity45 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =BITOR() 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)
Download BITOR.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
number1 Number Required Must be in decimal form and greater than or equal to 0.
number2 Number Required Must be in decimal form and greater than or equal to 0.

▣ Examples

Compares the bit positions for the binary representations of the two numbers, and if either position contains 1, returns 2 raised to a power, depending on bit position. Then, those numbers are summed. =BITOR(23,10)
Result: 31

§ Remarks

  • The result is a bitwise 'OR' of its parameters.
  • In the result, each bit position is 1 if any of the parameter's bits at that position are 1.
  • The values returned from the bit positions progress from right to left as powers of 2. The rightmost bit returns 1 (2^0), the bit to the left returns 2 (2^1), and so on.
  • If either argument is outside their constraints, BITOR returns the #NUM! error value.
  • If either argument is greater than (2^48)-1, BITOR returns the #NUM! error value.
  • If either argument is a non-numeric value, BITOR returns the #VALUE! error value.

✦ Tips

  • The result is a bitwise 'OR' of its parameters.
  • In the result, each bit position is 1 if any of the parameter's bits at that position are 1.
  • The values returned from the bit positions progress from right to left as powers of 2. The rightmost bit returns 1 (2^0), the bit to the left returns 2 (2^1), and so on.

⚠ Common Errors

#NUM! If either argument is outside their constraints, BITOR returns the #NUM! error value. If either argument is greater than (2^48)-1, BITOR returns the #NUM! error value.
Fix: 0 to 2^48-1
#VALUE! If either argument is a non-numeric value, BITOR returns the #VALUE! error value.
Fix: هر دو آرگومان را به‌صورت عددی وارد کنید.

💬 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!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.