public void combineUnaryInput() {
		/***** Take care of left *****/
		if (left instanceof LvalExpression &&
			    ((LvalExpression) left).hasUnaryInput()) {
			if (((LvalExpression) left).unaryInputIsNotResult()) {
				// input is result of Not gate - combine in to this gate
				op = ((PrimitiveOperator) op).negLeft();
			}

			// input is result of ID gate - no changes to this gate is needed
			left = ((LvalExpression) left).getMiddleOfUnaryInput();
		}

		/***** Take care of middle *****/
		if (middle instanceof LvalExpression &&
			    ((LvalExpression) middle).hasUnaryInput()) {
			if (((LvalExpression) middle).unaryInputIsNotResult()) {
				// input is result of Not gate - combine in to this gate
				op = ((PrimitiveOperator) op).negMid();
			}

			// input is result of ID gate - no changes to this gate is needed
			middle = ((LvalExpression) middle).getMiddleOfUnaryInput();
		}

		/***** Take care of right *****/
		if (right instanceof LvalExpression &&
			    ((LvalExpression) right).hasUnaryInput()) {
			if (((LvalExpression) right).unaryInputIsNotResult()) {
				// input is result of Not gate - combine in to this gate
				op = ((PrimitiveOperator) op).negRight();
			}

			// input is result of ID gate - no changes to this gate is needed
			right = ((LvalExpression) right).getMiddleOfUnaryInput();
		}
	}