def rshift(val, n):
    """
    Python equivalent to TypeScripts >>> operator.

    @see https://stackoverflow.com/questions/5832982/how-to-get-the-logical-right-binary-shift-in-python
    """
    return (val % 0x100000000) >> n