Welcomte to G4EF.

Use the code block for better formatting.

Thats because when you shift 16 bits for some values it becomes zero but not for all and so you get
the output unpredicted.