newBitWidth(bitWidth) {
        if (bitWidth > this.state.length)
            this.state = "0".repeat(bitWidth - this.state.length) + this.state;
        else if (bitWidth < this.state.length)
            this.state = this.state.slice(this.bitWidth - bitWidth);
        this.bitWidth = bitWidth; // ||parseInt(prompt("Enter bitWidth"),10);
        this.output1.bitWidth = bitWidth;
        this.setDimensions(10 * this.bitWidth, 10);
        if (this.direction === "RIGHT") {
            this.output1.x = 10 * this.bitWidth;
            this.output1.leftx = 10 * this.bitWidth;
        } else if (this.direction === "LEFT") {
            this.output1.x = -10 * this.bitWidth;
            this.output1.leftx = 10 * this.bitWidth;
        }
    }
@memberof ConstantVal
function to change bitwidth of the element
@param {number} bitWidth - new bitwidth