Bit shift right

Shifts the bits in each byte towards the right by the specified amount.

Input: Text (UTF-8) or original file bytesResult: Binary bytes

Text input

Tool options

Examples

The high bit of a byte

Input

4f2e968b543c835e6648ddcc.bin

2 bytes

Download

Expected answer

Hexadecimal bytes
40 00
Amount
1
Type
Logical shift
An unsigned RGB channel

Input

40754d147de57db8fe80ee4b.bin

3 bytes

Download

Expected answer

Hexadecimal bytes
3f 1f 00
Amount
2
Type
Logical shift
A four-bit nibble

Input

59cee1525d826e6337dd015e.bin

2 bytes

Download

Expected answer

Hexadecimal bytes
00 0f
Amount
4
Type
Logical shift
One-bit flags

Input

4e225601a48925147f919ace.bin

4 bytes

Download

Expected answer

Hexadecimal bytes
00 01 02 04
Amount
1
Type
Logical shift
The sign-bit boundary

Input

517391d5972c2de2db58edb1.bin

2 bytes

Download

Expected answer

Hexadecimal bytes
0f 10
Amount
3
Type
Logical shift

Logical shifts replace the leftmost bits with zeros. Arithmetic shifts preserve the most significant bit (MSB) of the original byte keeping the sign the same (positive or negative).

Format reference: Bit shift right background and specification

Parameters

ParameterDefault valueInput and choices
Amount1Number
TypeLogical shiftLogical shift, Arithmetic shift

Related tools

Browse arithmetic / logic tools