You can now perform binary shift operations with our free Bit Shift Calculator. Easily calculate left and right shifts for decimal, binary, and hexadecimal numbers.
Enter your number in decimal, binary, or hexadecimal format, select the shift amount, and click โLeft Shiftโย or โRight Shiftโย to see the results. Fast, accurate, and user-friendly!
Bit Shift Calculator
Decimal Result
Binary Result
Hexadecimal Result
What is Bit Shifting?
Bit shift operations are a fundamental concept in computer science and programming. They involve moving bits in a binary number to the left or right, which can result in multiplying or dividing by two.ย Learn more about bitwise operations on Wikipedia
Types of Bit Shifts
A bit shift is a fundamental operation in digital systems where binary digits (bits) are moved left or right. There are two main types:
- Left Shift (
<<
)- Moves bits to the left by a specified number of positions.
- New zero bits are introduced on the right side, effectively multiplying the number by 2 for each shift position.
Example: 5 << 1
becomes 10
(binary: 0101 << 1 = 1010
).
- Right Shift (
>>
)- Moves bits to the right, equivalent to dividing by 2n.
- For signed numbers, the sign bit is preserved (arithmetic shift).
Example: 5 >> 1
becomes 2
(binary: 0101 >> 1 = 0010
).
How to Use the Bit Shifting Calculator
- Choose Format: Select Decimal, Binary, or Hexadecimal.
- Enter Number: Valid examples:
- Decimal:
255
- Binary:
11111111
- Hex:
FF
- Decimal:
- Set Shift Amount: Between 0โ31 bits.
- Click Shift: Get instant results in all formats.
Example Usage
For instance, if you input the decimal number 5
and specify a left shift of 1
, the calculator will show:
- Decimal Result:
5 โ 10
- Binary Result:
00000000000000000000000000000101 โ 00000000000000000000000000001010
- Hexadecimal Result:
00000005 โ 0000000A
Ready to try it out? Use our Bit Shift Calculator now to see how bit shifting works in real-time!