HomeDeveloper toolsFixed-Width Integer Calculator

Fixed-Width Integer Calculator

Calculate exact integer and bitwise results at a chosen bit width.

Processing stays in your browser. Uses exact integers with unsigned operands masked to the selected width. Results wrap modulo 2^width; right shift is logical.

How to use the fixed-width integer calculator

Calculate exact integer and bitwise results at a chosen bit width. Complete the first integer (decimal or 0x/0b/0o), second integer or shift count, operation, bit width fields above. Choose Run tool, review the output, then copy or download the result.

Example

42 AND 15 equals 10.

Good to know

Uses exact integers with unsigned operands masked to the selected width. Results wrap modulo 2^width; right shift is logical.