The Excel BITAND function returns the bitwise AND of two numbers (a bit is 1 only where both inputs have 1) — bit-level math for flags, masks, and binary work.
Syntax
| Argument | Description | |
|---|---|---|
number1 | Required | A non-negative integer. |
number2 | Required | A non-negative integer. |
How to use it
BITAND works on the binary bits of whole numbers — the foundation of flags, permissions masks, and low-level math.
Flags pattern: store on/off options as bits of one number, then test with BITAND and set with BITOR. BITLSHIFT/BITRSHIFT multiply/divide by powers of two. Inputs must be non-negative integers below 2^48.
Try it: interactive demo
Change the inputs and watch the bitwise result (with binary shown).
Practice workbook
Frequently asked questions
Which Excel versions have the BIT functions?
What are the input limits?
What is a real-world use?
How do shifts relate to multiplication?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class