Sign-extends a word to a larger width.  It is an error to specify
        a smaller width (use ``extract`` instead to crop off the extra bits).

def sext(self, width):
        """Sign-extends a word to a larger width.  It is an error to specify
        a smaller width (use ``extract`` instead to crop off the extra bits).
        """
        width = operator.index(width)
        if width < self._width:
            raise ValueError('sign extending to a smaller width')
        return BinWord(width, self.to_sint(), trunc=True)