← Course overview and all lessons

Lesson 11 of 23 · 2:42

Negate an input, or negate the output

Distinguish entry complement from row and column permutations.

Keyboard: focus the player, then Space or K to play/pause and arrow keys to seek. Tab moves through the controls. Selectable captions replace the video's caption strip with the same timed text below.

In this lesson

  1. 0:00 · Does negating an input negate the output?
  2. 0:23 · Negate the output: flip every bit
  3. 0:38 · Negate X: swap the rows
  4. 0:55 · Negate Y: swap the columns
  5. 1:09 · Compare all three at one assignment
  6. 1:26 · Negate both inputs
  7. 1:44 · Connect the paper’s rotation notation
  8. 2:02 · Your turn: complement exclusive-or
  9. 2:24 · Answer: equivalence

Complete transcript

This transcript includes the answers to prediction prompts.

Show transcript

Does negating an input negate the output? · 0:00

Does negating an input negate the output? We will compare three changes to implication: complement its output, negate X, or negate Y. Keeping the original matrix visible lets us explain the differences instead of memorizing names. You will learn when to flip cell values and when to permute rows or columns.

Negate the output: flip every bit · 0:23

For output negation, turn every zero into one and every one into zero. The sole true result is now X equal to one and Y equal to zero. Its operator is the upward double arrow, meaning X and not Y.

Negate X: swap the rows · 0:38

For a negated left input, the new X-equals-one row must use the old X-equals-zero row. The other row swaps in the opposite direction. On implication this produces OR: not X implies Y is equivalent to X or Y.

Negate Y: swap the columns · 0:55

For a negated right input, swap the columns. The original failure at X one, Y zero is now at X one, Y one. This is NAND: X implies not Y is false only when both X and Y are true.

Compare all three at one assignment · 1:09

Let X and Y both be one. Original implication gives one. Negating the output gives zero. Negating only X gives one. Negating only Y gives zero. Two answers happen to agree here, but the complete matrices distinguish the operations.

Negate both inputs · 1:26

Swap both rows and columns to negate both inputs. For a two-by-two array, that has the same effect as a half turn. Implication becomes reverse implication. This is the familiar identity: not X implies not Y is equivalent to Y implies X.

Connect the paper’s rotation notation · 1:44

The paper writes some input changes as a transpose followed by a rotation. A transpose followed by ninety degrees clockwise swaps columns; a transpose followed by two hundred seventy degrees clockwise swaps rows. The direct row-and-column rule is usually easier to apply.

Your turn: complement exclusive-or · 2:02

Complement every bit of the exclusive-or matrix. Does the new rule accept equal inputs or different inputs? Name the resulting operator if you remember it. You can answer entirely from the two-by-two array.

Prediction pause: 8 seconds.

Answer: equivalence · 2:24

Complementing exclusive-or produces equivalence, with ones on the diagonal. Equal inputs are accepted and different inputs are rejected. We can now alter inputs or outputs deliberately. Next we will combine complete matrices, starting with exclusive-or composition.