Is it possible to undo right bits-hifting operation?

Viewed 22

I have a piece of code where part of it does some bits-shifting manipulation. One of the operations Its right shift by 8 bits. I need a function to get the original value after the manipulations, I tried few ways but with no success. I know there are operations which are destructive and cannot be undone because lost of bits. Can 8 bit right-shifting be undone? If not, Is there other operator I can use the achieve the same result as the bit shifting but can be reversed? My piece of code with an example (I used chrome console to simplify, My original code is also JS):

let x = 11297 >> 8
undefined
x
44
let y = x << 8
undefined
y
11264
0 Answers
Related