@staticmethod
def _signextend(value):
    """Sign extend a 10-bit number

        Derived from https://stackoverflow.com/questions/32030412/
                             twos-complement-sign-extension-python

        """
    return (value & 511) - (value & 512)
