Search for a tool
Bitwise Calculator

Tool for performing bit-by-bit calculations online: logical operations (AND, OR, XOR, NOT, NAND, NOR, XNOR), shifts, rotations, one's and two's complements, bit counting.

Results

Bitwise Calculator -

Tag(s) : Informatics

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Bitwise Calculator' tool for free! Thank you!

Bitwise Calculator

Bitwise Calculator

The default input format is decimal; otherwise, use the prefixes 0x for hexadecimal or 0b for binary











Bitwise Operation
















Answers to Questions (FAQ)

What is a bit-by-bit calculator? (Definition)

A bitwise calculator is a tool that performs logical and arithmetic operations directly on the bits of a binary number.

It is used to manipulate values at the lowest level (binary level), which is essential in computer science, digital electronics, and systems programming.

Why use bitwise operations?

Bitwise operations are fast and efficient because they are executed directly by the processor. They allow for optimized calculations, manipulation of flags or masks, and/or rapid encoding/decoding of data.

What are the basic Bitwise operations?

Basic binary logical operations include:

— AND (&): Each bit of the result is 1 if both corresponding bits of the operands are 1.

— OR (|): Each bit of the result is 1 if at least one of the corresponding bits of the operands is 1.

XOR (^): Each bit of the result is 1 if the corresponding bits of the operands are different.

— NOT (~): Inverts each bit of the operand (one's complement).

Example: A = 0b1010 and B = 0b1100
A & B = 1000
A | B = 1110
A ^ B = 0110
~A = 0101 and ~B = 0011

There are also operations derived from the basic operations:

— NAND: Result of NOT (A AND B).

— NOR: Result of NOT (A OR B).

— XNOR: Result of NOT (A XOR B), also called logical equivalence

How do shift work?

Shifts move the bits of a binary number left or right. A distinction must be made between the logical left shift, denoted <<, and the logical right shift, denoted >>, which adds zeros to the left and right respectively, and the arithmetic shift, which preserves the sign bit (for signed numbers in the case of a right shift).

Example: A << 1 = 0100 (left shift)
A >> 1 = 0101 (logical right shift)
A >>> 1 = 1101 (arithmetic right shift, if A is signed and negative)

How do rotations work?

Rotations move bits without loss:

rot>: The rightmost bit is moved to the left

rot<: The leftmost bit is moved to the right

What are the one's ant two's complements?

One's complement: Inverts all bits.

Two's complement: Obtained by adding 1 to the one's complement (used to represent negative numbers in binary).

Source code

dCode retains ownership of the "Bitwise Calculator" source code. Any algorithm for the "Bitwise Calculator" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Bitwise Calculator" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Bitwise Calculator" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Bitwise Calculator" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/bitwise-calculator

In a scientific article or book, the recommended bibliographic citation is: Bitwise Calculator on dCode.fr [online website], retrieved on 2025-12-04, https://www.dcode.fr/bitwise-calculator

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Bitwise Calculator' tool for free! Thank you!


https://www.dcode.fr/bitwise-calculator
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback