Code tool

Calculate Binary Bitwise OR

Enter two binary bit strings and choose the output width. Shorter values are left-padded with zeroes before each aligned bit is ORed.

In-browser processingNo account requiredPrivacy details ↗

0 and 1 only; up to 10,000 bits per value. Width must fit both values.

Enter two binary values and an output width to begin.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter only 0 and 1 characters in each operand.
  2. Choose a width that fits both operands, from 1 to 10,000 bits.
  3. Calculate to see the zero-padded bitwise OR result.

Explicit width

The output width is required and must be at least as wide as both inputs. Leading zeroes are added on the left so every result has exactly that width.

Validated bit strings

Each operand must be a non-empty string containing only 0 and 1, with at most 10,000 bits. Inputs are treated as unsigned bit patterns.

Local calculation

Validation, padding, and the bitwise operation run locally in your browser. No input is uploaded or stored.

GOOD TO KNOW

Common questions

What does OR do?

Each output bit is 1 when either aligned input bit is 1; it is 0 only when both input bits are 0.

Why do I need to choose a width?

An explicit width makes leading zeroes and the output shape predictable. The width must fit both input strings.

Are spaces, prefixes, or negative values supported?

No. Enter only non-empty strings of 0 and 1; do not include spaces, separators, a minus sign, or a 0b prefix.