# Google Sheets BITOR Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/bitor-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

The BITOR function performs a bitwise OR operation on two numbers, returning a number that represents the combined bits of both inputs.

```
BITOR(value1, value2)
```

Generate FormulaExplain Formula

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Describe the BITOR you need in plain EnglishGenerate Formula

## Parameters

**`value1`**:\
The first value or bitwise expression that you want to evaluate. This can be a number, a cell reference, or a binary representation.

**`value2`**:\
The second value or bitwise expression that you want to evaluate. This can also be a number, a cell reference, or a binary representation.

## What is a BITOR?

The *BITOR* function in Google Sheets is a bitwise operation function that performs a bitwise OR operation on two numbers. This function is particularly useful when working with binary data or when you need to manipulate individual bits of numbers. The BITOR function takes two integer arguments and returns a single integer that represents the result of the bitwise OR operation.

In simpler terms, BITOR allows you to combine two numbers at the bit level, turning on bits in the result wherever there is a '1' in either of the input numbers.

## A Practical Example

Imagine you are working with binary flags to represent certain features of a product:

### Product Features Table:

| ProductID | Feature1 | Feature2 | Feature3 |
| - | - | - | - |
| 1 | 1 | 0 | 1 |
| 2 | 0 | 1 | 1 |

In this table, each feature is represented as a binary value (1 for present, 0 for absent). You want to combine the features of two products to see which features are available when they are combined.

## BITOR Formula

To achieve this, you would use the BITOR function as follows:

```
=BITOR(A2, A3)
```

In this formula:

- `A2` is the cell containing the binary representation of the features for Product 1.
- `A3` is the cell containing the binary representation of the features for Product 2.

## Result of the Formula

When you apply the BITOR formula to the Product Features Table, the output would look like this:

| Combined Features |
| - |
| 1 |
| 1 |

In this case, if you input the binary values for Product 1 (101) and Product 2 (011), the BITOR would return `111`, indicating that all features are present when both products are combined.

## Why Use BITOR?

BITOR is beneficial because it simplifies the process of combining binary data. It allows for efficient manipulation of bits without the need for complex logical operations. This function is particularly useful in scenarios involving feature flags, permissions, or any situation where binary representation is utilized.

## Key Takeaways:

- **BITOR**: A function that performs a bitwise OR operation on two integers.
- **Bit Manipulation**: Useful for combining binary data and flags efficiently.
- **Simplicity**: Provides a straightforward way to work with binary values without complex logic.
- **Common Use Cases**: Ideal for feature flags, permissions management, and any scenario involving binary data manipulation.

BITOR is an essential function for anyone working with binary data in Google Sheets, providing a powerful way to enhance data analysis and manipulation capabilities.

Happy spreadsheeting!

## Example use case

You have a table with binary flags in Column A and Column B. By using the BITOR formula, you can combine these flags to determine if any specific conditions are met, streamlining decision-making processes based on multiple criteria in your data analysis.

## Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Lock A Row In Google Sheets](https://betteranalyst.com/google-sheets/how-to-lock-a-row-in-google-sheets)
- [How To Lock Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-lock-cells-in-google-sheets)
- [How To Make A Copy Of An Google Sheets Sheet](https://betteranalyst.com/google-sheets/how-to-make-a-copy-of-an-google-sheets-sheet)
- [How To Make A Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-graph-in-google-sheets)
- [How To Make A Histogram In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-histogram-in-google-sheets)
- [How To Make A Line Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-line-graph-in-google-sheets)
- [How To Make A Pie Chart In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-pie-chart-in-google-sheets)
- [How To Make A Table In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-table-in-google-sheets)

## Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

## Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

1. [01ChatGPTOpen a balanced comparison prompt in ChatGPT.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.
