Exercise: Bit shifts
Explore how to perform arithmetic bitwise shifts on signed two-byte integers and verify results using Bash commands. Learn the difference in outcomes due to Bash's integer storage, enhancing your understanding of bitwise manipulation.
Exercise
Perform arithmetic bit shifts for the following signed two-byte integers:
- 25649 >> 3
- 25649 << 2
- -9154 >> 4
- -9154 << 3
Solution
Here are the results of ...