How this calculation works
Shift a word left or right within its specified width and see discarded high bits.
Left = (word × 2ˢ) mod 2ʷ, right = floor(word/2ˢ)A worked example
150 shifted left twice in eight bits becomes 88. Shifting right twice gives 37.
Good to know
Logical right shift fills with zeros.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Shift a word left or right within its specified width and see discarded high bits.
The primary result is labeled “Left shift”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Logical right shift fills with zeros.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
150 shifted left twice in eight bits becomes 88. Shifting right twice gives 37.
Which rule does this calculator apply?
Left = (word × 2ˢ) mod 2ʷ, right = floor(word/2ˢ)