newBitWidth(bitWidth) {
        if (bitWidth < 1) return;
        const diffBitWidth = bitWidth - this.bitWidth;
        this.state = undefined;
        this.inp1.bitWidth = bitWidth;
        this.bitWidth = bitWidth;
        this.setWidth(10 * this.bitWidth);

        if (this.direction === "RIGHT") {
            this.x -= 10 * diffBitWidth;
            this.inp1.x = 10 * this.bitWidth;
            this.inp1.leftx = 10 * this.bitWidth;
        } else if (this.direction === "LEFT") {
            this.x += 10 * diffBitWidth;
            this.inp1.x = -10 * this.bitWidth;
            this.inp1.leftx = 10 * this.bitWidth;
        }
    }
@memberof Output
function to change bitwidth of the element
@param {number} bitWidth - new bitwidth