def unpack_bytes(word):
    """Unpacks a 32 bit word into 4 signed byte length values."""
    def as_8bit_signed(val):
        val = val & 0xff
        return val if val < 128 else val - 256
    return (as_8bit_signed(word),
            as_8bit_signed(word >> 8),
            as_8bit_signed(word >> 16),
            as_8bit_signed(word >> 24))