← Course overview and all lessons

Lesson 8 of 23 · 3:09

Find a cell in the repository layout

Split an assignment, convert binary groups to indices, and check the stored output.

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 · Which cell belongs to these four input bits?
  2. 0:23 · Give the rule a concrete meaning
  3. 0:37 · Declare the order before looking up
  4. 0:54 · Split the assignment
  5. 1:10 · Convert the row group
  6. 1:24 · Convert the column group
  7. 1:40 · Explain the stored value
  8. 1:53 · Your turn: a second assignment
  9. 2:17 · Answer: two passing checks disagree?
  10. 2:32 · Check the both-false case too
  11. 2:50 · A repeatable lookup method

Complete transcript

This transcript includes the answers to prediction prompts.

Show transcript

Which cell belongs to these four input bits? · 0:00

Which cell belongs to these four input bits? A repository explicit C M stores the answers to a rule with inputs A, B, C and D in an ordered grid. We will declare which inputs select rows and columns, split an assignment into those groups, and turn the binary groups into a checked matrix address.

Give the rule a concrete meaning · 0:23

Our rule asks whether two checks disagree. The first check is A and B: both must be true. The second is C or D: at least one must be true. Exclusive-or returns one when exactly one of these two checks passes.

Declare the order before looking up · 0:37

Use A and B for rows, and C and D for columns. The repository orders each group as zero-zero, zero-one, one-zero, one-one. The first bit is the more significant bit, so the corresponding numeric indices are zero, one, two, three.

Split the assignment · 0:54

Take assignment one-zero-one-one in A, B, C, D order. Split it according to our declared groups. A B is one-zero, and C D is one-one. These groups identify a row and a column; they are not yet the output.

Convert the row group · 1:10

For a two-bit binary group, the first position has weight two and the second has weight one. Row bits one-zero mean one times two plus zero times one. That gives row index two, the third displayed row.

Convert the column group · 1:24

Column bits one-one mean one times two plus one times one. That gives column index three, the fourth displayed column. Follow the selected row and column to their intersection. We have found the location for this assignment.

Explain the stored value · 1:40

Now evaluate the rule. A and B is one and zero, giving zero. C or D is one or one, giving one. The two checks differ, so exclusive-or returns one. That is the value stored at row two, column three.

Your turn: a second assignment · 1:53

Try one-one-one-zero. Split the bits into the same two groups, find their indices, and decide the output. Be careful: the selected column contains a one bit, but that does not by itself determine whether the whole rule is true.

Prediction pause: 10 seconds.

Answer: two passing checks disagree? · 2:17

A B is one-one, so choose row three. C D is one-zero, so choose column two. Both component checks return one. They agree, so exclusive-or returns zero. The cell at row three, column two confirms that answer.

Check the both-false case too · 2:32

One more example: zero-one-zero-zero. The row group gives index one, and the column group gives index zero. A and B is false, and C or D is false. Equal results again give zero. Exclusive-or rejects both agreement cases.

A repeatable lookup method · 2:50

The method is always the same: read the declared variable order, split the assignment, convert each group, and select the intersection. Evaluating the original rule gives an independent check. Next we will change the split while keeping every answer the same.