I need to create two functions
One receives an integer value and returns another containing only the 8 lowest-order bits of the original value, with the other bits set to zero.
The other receives an integer value and returns another containing only the 8 highest order bits of the original value, with the other bits set to zero.
How could this be done? I had some ideas, but I did not come to any conclusion that worked, thank you in advance.