On Wednesday, 9 June 2021 at 19:13:10 UTC, JG wrote: > produces: > > 123 > > I would expect 0. > > What is the rationale for this behaviour or is it a bug? Processor just takes lower 6 bits for the shift amount and those hold zero in your case, shifting by 65 will shift by 1.