Math & Number Utilities100% Client-Side

Apply Bitwise AND to Binary Values

Enter two binary values to find the bit positions where both contain a one. The calculator aligns the inputs at their right edges, padding the shorter operand on the left with zeroes. Each output position is one only when both aligned bits are one. This is useful for checking a binary mask or verifying a truth-table example with operands of different widths.

Input
9 chars•2 lines
Output

How to Use the Bitwise AND Calculator for Binary Inputs

  1. 1Paste two unsigned binary values. Put them on separate lines or separate them with a space.
  2. 2Use zero and one as digits. You can keep an optional 0b prefix or single underscores between digit groups.
  3. 3Align operands at the right edge and check any positions filled with leading zeroes in the shorter field.
  4. 4Copy the complete result into your exercise or fixture and keep the original operands for a later comparison.

Input & Output Examples

Only the highest position has one in both inputs. The other three positions are zero.

Input Sample
1010
1100
Expected Output
1000

The second operand is padded to 0011, so only the second bit from the right is set in both.

Input Sample
0b01_10
11
Expected Output
0010

Practical Developer Workflows

  • Identify shared set bits in a simple bit mask.
  • Check the expected result of an AND gate fixture.
  • Compare equal-width and unequal-width inputs to see which positions align.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

The pair 1 and 1 produces one. The pairs 0 and 0, 0 and 1, and 1 and 0 produce zero. The rule applies independently at each aligned position.

Explore Other Tools

12 suggested tools

View all tools