Bitwise Calculator
Choose a width, enter unsigned binary digits and select an operation. Inputs shorter than the width are zero-padded; longer inputs are rejected.
Formula
AND: both bits are 1. OR: at least one is 1. XOR: bits differ. NOT: invert every bit within the width.
How to use
- Choose the word width and operation.
- Enter A and, except for NOT, B using only 0 and 1.
- Read the result padded to the chosen width.
Examples
- At width 4: 1010 XOR 1100 = 0110; NOT 1010 = 0101.
Frequently asked questions
What does NOT use?
NOT uses only A. B can be empty and does not affect the result.
Are extra input bits discarded?
No. An input longer than the selected width is rejected, including leading zeros.
Does NOT produce a negative number?
The result is an unsigned fixed-width bit string; NOT flips only the selected number of bits.
Sources
Updated: