function(e, t) {
return e << t | e >>> 32 - t
}
I have this method in js, I do not understand in deep about shift operation. I w
There is not a built-in zero fill right shift operator in Python, but you can easily define your own zero_fill_right_shift
function:
def zero_fill_right_shift(val, n):
return (val >> n) if val >= 0 else ((val + 0x100000000) >> n)
Then you can define your function:
def f(e, t):
return e << t or zero_fill_right_shift(e, 32 - t)