Subtraction becomes addition after invert-and-add-one.

Example

Subtraction becomes addition after invert-and-add-one.

highlighted = computed this step

Build the concrete table

Compute the highlighted logic-table value.

target0111 - 0011\begin{array}{c|c}\text{target}&\hlmath{\text{0111 - 0011}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

target0111 - 0011invert subtrahend0011 -> 1100\begin{array}{c|c}\text{target}&\text{0111 - 0011}\\\text{invert subtrahend}&\hlmath{\text{0011 -> 1100}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

target0111 - 0011invert subtrahend0011 -> 1100add 11100 + 0001 = 1101\begin{array}{c|c}\text{target}&\text{0111 - 0011}\\\text{invert subtrahend}&\text{0011 -> 1100}\\\text{add 1}&\hlmath{\text{1100 + 0001 = 1101}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

target0111 - 0011invert subtrahend0011 -> 1100add 11100 + 0001 = 1101add to minuend0111 + 1101 = 10100\begin{array}{c|c}\text{target}&\text{0111 - 0011}\\\text{invert subtrahend}&\text{0011 -> 1100}\\\text{add 1}&\text{1100 + 0001 = 1101}\\\text{add to minuend}&\hlmath{\text{0111 + 1101 = 10100}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

target0111 - 0011invert subtrahend0011 -> 1100add 11100 + 0001 = 1101add to minuend0111 + 1101 = 10100drop overflow0100\begin{array}{c|c}\text{target}&\text{0111 - 0011}\\\text{invert subtrahend}&\text{0011 -> 1100}\\\text{add 1}&\text{1100 + 0001 = 1101}\\\text{add to minuend}&\text{0111 + 1101 = 10100}\\\text{drop overflow}&\hlmath{\text{0100}}\end{array}

Read the table verdict

Compute the highlighted logic-table value.

target0111 - 0011invert subtrahend0011 -> 1100add 11100 + 0001 = 1101add to minuend0111 + 1101 = 10100drop overflow0100verdict7 - 3 = 4\begin{array}{c|c}\text{target}&\text{0111 - 0011}\\\text{invert subtrahend}&\text{0011 -> 1100}\\\text{add 1}&\text{1100 + 0001 = 1101}\\\text{add to minuend}&\text{0111 + 1101 = 10100}\\\text{drop overflow}&\text{0100}\\\text{verdict}&\hlmath{\text{7 - 3 = 4}}\end{array}
logic-computation Every row is intentionally ordered and pinned to the lesson specification.