def rshiftNS(val, n):
    """
    Bitwise operation of right shift with nosign
    - val : original value
    - n   : number of bit to shift
    """
    return val >> n if val >= 0 else (val + 0x100000000) >> n