Engineering Excel 2013 ◉ 25 views

=BITAND()

Returns a bitwise 'AND' of two numbers.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=BITAND( number1, number2)
Hover argument names in the table for details.
Output typeNumber/Text
Popularity28 / 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 =BITAND() 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 BITAND.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 binary representations of 1 and 5. =BITAND(1,5)
Result: 1
Compares the binary representations of 13 and 25. =BITAND(13,25)
Result: 9

§ Remarks

  • BITAND returns a decimal number.
  • The result is a bitwise 'AND' of its parameters.
  • The value of each bit position is counted only if both 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 its left returns 2 (2^1), and so on.
  • If either argument is less than 0, BITAND returns the #NUM! error value.
  • If either argument is a non-integer or is greater than (2^48)-1, BITAND returns the #NUM! error value.
  • If either argument is a non-numeric value, BITAND returns the #VALUE! error value.

✦ Tips

  • BITAND returns a decimal number.
  • The result is a bitwise 'AND' of its parameters.
  • The value of each bit position is counted only if both 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 its left returns 2 (2^1), and so on.

⚠ Common Errors

#NUM! If either argument is less than 0, BITAND returns the #NUM! error value. If either argument is a non-integer or is greater than (2^48)-1, BITAND returns the #NUM! error value.
Fix: A number in the range 0 to 281474976710655
#VALUE! If either argument is a non-numeric value, BITAND 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.