Work with masks, shifts, inverses, and binary patterns. Enter values once and review every output. Use this solver for study, practice, debugging, and verification.
| Case | Bit Width | A | B | Operation | Result |
|---|---|---|---|---|---|
| 1 | 8 | 29 (00011101) | 15 (00001111) | A AND B | 13 (00001101) |
| 2 | 8 | 29 (00011101) | 15 (00001111) | A OR B | 31 (00011111) |
| 3 | 8 | 29 (00011101) | 15 (00001111) | A XOR B | 18 (00010010) |
| 4 | 8 | 29 (00011101) | — | NOT A | 226 (11100010) |
| 5 | 8 | 29 (00011101) | — | A << 2 | 116 (01110100) |
AND: Result bit = 1 only when both bits are 1.
OR: Result bit = 1 when at least one bit is 1.
XOR: Result bit = 1 when the two bits are different.
NOT: Result bit = inverse of the original bit inside the chosen width.
LEFT SHIFT: Result = (Value << n) masked to the selected width.
RIGHT SHIFT: Result = (Value >> n) within the selected unsigned view.
NAND: Result = NOT (A AND B).
NOR: Result = NOT (A OR B).
XNOR: Result = NOT (A XOR B).
Mask: Mask = (2^bitWidth) - 1. It keeps only the visible bits.
Bitwise math works at the single bit level. Each digit is either 0 or 1. This calculator helps students, developers, and problem solvers inspect those bits fast. You can enter decimal, binary, or hexadecimal values. Then you can apply common operators in one place. The tool also keeps a fixed bit width. That matters because width changes the visible pattern and final result.
Bitwise operations support masks, flags, compression, checksums, and low-level logic. They are also useful in maths lessons. AND isolates shared 1 bits. OR merges enabled bits. XOR highlights differences. NOT flips each bit inside the chosen width. Shifts move values left or right. These actions build intuition for binary structure. They also help you debug calculations with confidence.
The solver returns decimal, signed decimal, binary, and hexadecimal outputs. It also normalizes both operands to the selected width. That makes comparison easy. You can review the active formula and a plain explanation. The result appears above the form after submission. Export buttons let you save the current output as CSV or PDF. That is helpful for homework, notes, and quick reporting.
Bit width controls how many bits stay visible. An 8-bit result differs from a 16-bit result. This is important for NOT, NAND, NOR, XNOR, and shift operations. The calculator masks every result to the chosen width. That keeps the answer consistent. It also prevents extra high bits from confusing the final pattern.
Many learners read one value in decimal and another in hexadecimal. This tool allows separate bases for both operands. That saves time and reduces conversion mistakes. You can focus on logic instead of formatting. The binary output is padded to the chosen width. This makes patterns easy to scan. It also helps when you compare masks, complements, and shifted values.
Use this page for binary practice, exam revision, and logic drills. It also fits classroom demonstrations. You can test sample numbers, compare bases, and confirm manual work. The example table below gives quick reference cases. Read the formula section for meaning. Then follow the steps in the usage guide. With one page, you can solve, inspect, and export precise bitwise results.
It applies binary operators to one or two values. The tool shows the output in decimal, signed decimal, binary, and hexadecimal forms. It also explains the active rule.
Bit width decides how many bits remain visible. It changes masks, complements, and shift results. A value may look different in 8 bits and 16 bits.
Yes. You can select binary, decimal, or hexadecimal for each operand. The solver normalizes the values to the chosen width before calculating.
OR returns 1 when either bit is 1. XOR returns 1 only when the two bits are different. XOR is useful for spotting changed bits.
NOT flips every visible bit inside the selected width. In fixed-width binary, the inverted pattern may map to a much larger unsigned decimal value.
Use left shift to move bits toward higher positions. Use right shift to move bits toward lower positions. Shifts are common in masks, scaling, and fast binary manipulation.
They are inverted forms of AND, OR, and XOR. The solver applies the main operation first, then flips the visible bits within the selected width.
Yes. After solving, you can download the displayed summary as CSV or PDF. That makes it easier to save examples, compare cases, or share results.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.