Worked example
Operation: AND a: 12 b: 10 Bit width: 8 Interpretation: Unsigned
→ 0000 1000; hex: 08; 10: 8
Method and scope
Enter decimal integers within the selected signed or unsigned range. Widths: 8, 16, 32, 64. Results are masked to the chosen width; left-shift overflow bits are discarded. Shift count b must be 0≤b<width. Arithmetic right shift repeats the high sign bit.
mask = 2ʷ − 1; result = operation & mask
Precision and limits
≈ marks an approximation. Display rounding does not change the internal calculation.