Base-N Bitwise Logic Calculator
Compute AND, OR, XOR, NOT, and left/right shifts on two integers and view the result in binary, octal, decimal, and hexadecimal, with the full bit pattern.
Input
Result
Result of A AND B (decimal)
12
Binary
0000000000001100
Octal
14
Decimal
12
Hexadecimal
C
| Bit representation (16-bit) | 0000 0000 0000 1100 |
| Binary | 0000000000001100 |
| Octal | 14 |
| Decimal | 12 |
| Hexadecimal | 0xC |
How it works
- Enter Value A and Value B, then choose an operation from AND, OR, XOR, NOT, left shift, or right shift to see the result in binary, octal, decimal, and hexadecimal simultaneously.
- Pick the input base from binary, octal, decimal, or hexadecimal. For example, choose hexadecimal to type values like "FF" directly.
- NOT (negation) flips the bits, so it does not use Value B. Enter only Value A.
- For left and right shifts, Value B is the number of bit positions to shift, given as a decimal value. Right shift is computed as a zero-fill (unsigned) shift.
- Calculations are performed as unsigned 32-bit integers, so the maximum supported value is 4,294,967,295 (FFFFFFFF in hex).
- The bit representation is grouped every four digits, making it easy to read the bit layout at a glance.
Related calculators
Flash Shooting Distance
HobbyCalculate the ideal shooting distance to your subject from a flash unit's guide number, aperture and ISO.
Open calculator →Flash Aperture Calculator
HobbyCalculate the correct f-stop for flash photography from guide number, distance, and ISO. Instantly see the nearest standard f-stop and the correct distance for each aperture.
Open calculator →Lens Focal Length Calculator
HobbyEstimate the lens focal length (mm) and 35mm equivalent you need from your subject distance, real size, and sensor width.
Open calculator →Camera Angle of View Calculator
HobbyEnter a lens focal length and image sensor size to instantly calculate how wide a scene the camera captures: the horizontal, vertical, and diagonal angle of view. Includes presets for full frame, APS-C, Micro Four Thirds and more (plus custom sensor sizes) and shows the 35mm equivalent focal length too.
Open calculator →