Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • How to count table columns in Excel
  • How to create running total in an Excel Table
  • How to create dynamic reference table name in Excel
  • How to calculate correlation coefficient Correlation in Excel

References

  • Offset in Excel
  • Find Closest Match in Excel Using INDEX, MATCH, ABS and MIN functions
  • Count rows that contain specific values in Excel
  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OFFSET function

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation specific characters only
  • Excel Data validation don’t exceed total
  • Excel Data validation whole percentage only
  • Excel Data validation exists in list

BITXOR function: Description, Usage, Syntax, Examples and Explanation

by

What is BITXOR function in Excel?

BITXOR function is one of Engineering functions in Microsoft Excel that returns a bitwise ‘XOR’ of two numbers.

Syntax of BITXOR function

BITXOR(number1, number2)

The BITXOR function syntax has the following arguments.

  • Number1: Must be greater than or equal to 0.
  • Number2: Must be greater than or equal to 0.

BITXOR formula explanation

  • BITXOR returns a decimal number that is the result of the sum of a bitwise ‘XOR’ (exclusive XOR) of its parameters.
  • If either argument is outside its constraint, BITXOR returns the #NUM! error value.
  • If either argument is greater than (2^48)-1, BITXOR returns the #NUM! error value.
  • If either argument is a non-numeric value, BITXOR returns the #VALUE! error value.
  • In the result, each bit position is 1 if the values of the parameters at that bit position are not equal; in other words, one value is 0 and the other is 1. For example, using BITXOR(5,3), 5 is expressed as 101 in binary and 3 as 11 in binary. To help with comparison, you can consider 3 as 011. From right to left, the bit values at the three positions in this example are the same (1) only at the rightmost position. A ‘not equal’ result returns a 1 for the second and third positions from the right, and an ‘equal’ result returns 0 for the rightmost position.
  • Values of 1 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.
  • Using the same example, 0 is returned for the rightmost bit position because it is a 0, 2 (2^1) is returned for the second bit position from the right (a 1 value), and 4 (2^2) is returned for the leftmost bit (also a 1 value). The total is 6, in decimal representation.

Example of BITXOR function

Steps to follow:

1. Open a new Excel worksheet.

2. Copy data in the following table below and paste it in cell A1

Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.

You can adjust the column widths to see all the data, if need be.

Formula Description Result How it works
=BITXOR(5,3) Returns the total of the bitwise “Exclusive Or” comparision at each bit position. 6 The number 5 is 101 in binary, and 3 is 11. You can express 11 as 011 so that both numbers have 3 digits. A bitwise ‘Exclusive Or’ comparison checks to see if both digits at each position are not equal and, if true, returns a positive value for that position.
Test: At which positions are the digits not equal?
5 in binary = 101
3 in binary = 011
yyn
(1*(2^2))+(1*(2^1))+(1*0)
4+2+0
6

Post navigation

Previous Post:

How to generate random date between two dates in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Invoice status with nested if in Excel
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • How to use IFS function in Excel
  • How to use Excel XOR Function
  • How to use Excel NOT Function

Date Time

  • Count times in a specific range in Excel
  • How to get number of days, weeks, months or years between two dates in Excel
  • Add workdays to date custom weekends in Excel
  • Display Date is same month in Excel
  • Calculate date overlap in days in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • Group times into 3 hour buckets in Excel
  • Categorize text with keywords in Excel
  • Map inputs to arbitrary values in Excel
  • Running count group by n size in Excel

General

  • How to Create Calendar in Excel
  • How to calculate percentage discount in Excel
  • Print Excel Sheet In Landscape Or Portrait
  • Basic error trapping example in Excel
  • Transpose: Switch ‘Rows to Columns’ or ‘Columns to Rows’ in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning