Bit Shift Calculator
Enter an integer and a shift amount to see left/right bit shift results in binary, hex, and decimal.
Bit Shift Inputs
Signed 32-bit integer (−2,147,483,648 to 2,147,483,647)
1 – 31 positions (32-bit integer)
Results
42 << 1 = 84
DEC
84
HEX
0x54
BIN
00000000000000000000000001010100
Bit Diagram (32-bit)
Original bit
Filled zero
Shifted out
Input Representation
Decimal:
42
Hexadecimal:
0x2A
Binary:
00000000000000000000000000101010
Copied!
Summary
Enter an integer and a shift amount to see left/right bit shift results in binary, hex, and decimal.
How it works
- Enter an integer value (positive or negative) in the input field.
- Choose the shift direction: left (<<) or right (>>).
- Enter the number of bit positions to shift.
- The tool computes the result and shows decimal, binary, and hex outputs.
- A visual diagram highlights which bits shifted in or out.
Use cases
- Learn how bitwise shift operators work in programming.
- Quickly verify shift results while debugging low-level code.
- Calculate fast multiply/divide by powers of 2.
- Understand bit packing and unpacking patterns.
- Validate microcontroller register manipulations.
- Test shift behavior across different bit widths (8, 16, 32).
- Explore signed vs. unsigned right shift differences.
- Teach binary arithmetic to students or new developers.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu