Bit Shift Calculator

Enter an integer and a shift amount to see left/right bit shift results in binary, hex, and decimal.

Use the Bit Shift Calculator

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

The Bit Shift Calculator lets you perform left (<< ) and right (>>) bit shift operations on any integer. Enter the value and shift count, and the tool instantly shows the result in decimal, binary, and hexadecimal. It also displays a visual bit-by-bit diagram so you can see exactly how the bits move.

How it works

  1. Enter an integer value (positive or negative) in the input field.
  2. Choose the shift direction: left (<<) or right (>>).
  3. Enter the number of bit positions to shift.
  4. The tool computes the result and shows decimal, binary, and hex outputs.
  5. 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-05-29 · Reviewed by Nham Vu