WEBVTT

1
00:00:00.180 --> 00:00:04.220
Which cell belongs to these four input bits?

2
00:00:04.220 --> 00:00:10.385
A repository explicit C M stores the answers to a rule with inputs A, B,

3
00:00:10.385 --> 00:00:16.631
C and D in an ordered grid. We will declare which inputs select rows and columns,

4
00:00:16.631 --> 00:00:22.784
split an assignment into those groups, and turn the binary groups into a checked matrix address.

5
00:00:22.964 --> 00:00:30.232
Our rule asks whether two checks disagree. The first
check is A and B: both must be true. The second is C or D:

6
00:00:30.232 --> 00:00:36.744
at least one must be true. Exclusive-or returns one when exactly one of these two checks passes.

7
00:00:36.924 --> 00:00:43.635
Use A and B for rows, and C and D for columns. The repository orders each group as zero-zero,

8
00:00:43.635 --> 00:00:48.255
zero-one, one-zero, one-one. The first bit is the more significant bit,

9
00:00:48.255 --> 00:00:53.756
so the corresponding numeric indices are zero, one, two, three.

10
00:00:53.936 --> 00:01:00.589
Take assignment one-zero-one-one in A, B, C, D order. Split it according to our declared groups.

11
00:01:00.589 --> 00:01:05.534
A B is one-zero, and C D is one-one.

12
00:01:05.534 --> 00:01:10.317
These groups identify a row and a column; they are not yet the output.

13
00:01:10.497 --> 00:01:15.687
For a two-bit binary group, the first position has weight two and the second has weight one.

14
00:01:15.687 --> 00:01:20.424
Row bits one-zero mean one times two plus zero times one.

15
00:01:20.424 --> 00:01:24.138
That gives row index two, the third displayed row.

16
00:01:24.318 --> 00:01:29.159
Column bits one-one mean one times two plus one times one.

17
00:01:29.159 --> 00:01:34.175
That gives column index three, the fourth displayed column.

18
00:01:34.175 --> 00:01:39.816
Follow the selected row and column to their intersection.
We have found the location for this assignment.

19
00:01:39.996 --> 00:01:46.289
Now evaluate the rule. A and B is one and zero, giving zero. C or D is one or one, giving one.

20
00:01:46.289 --> 00:01:52.802
The two checks differ, so exclusive-or returns one.
That is the value stored at row two, column three.

21
00:01:52.982 --> 00:02:00.006
Try one-one-one-zero. Split the bits into the same
two groups, find their indices, and decide the output.

22
00:02:00.006 --> 00:02:17.319
Be careful: the selected column contains a one bit, but that
does not by itself determine whether the whole rule is true.

23
00:02:17.499 --> 00:02:23.095
A B is one-one, so choose row three. C D is one-zero, so choose column two.

24
00:02:23.095 --> 00:02:28.111
Both component checks return one. They agree, so exclusive-or returns zero.

25
00:02:28.111 --> 00:02:31.791
The cell at row three, column two confirms that answer.

26
00:02:31.971 --> 00:02:37.683
One more example: zero-one-zero-zero. The row group gives index one,

27
00:02:37.683 --> 00:02:44.405
and the column group gives index zero. A and B is false, and C or D is false.

28
00:02:44.405 --> 00:02:49.977
Equal results again give zero. Exclusive-or rejects both agreement cases.

29
00:02:50.157 --> 00:02:57.506
The method is always the same: read the declared
variable order, split the assignment, convert each group,

30
00:02:57.506 --> 00:03:03.961
and select the intersection. Evaluating the original rule gives an independent check.

31
00:03:03.961 --> 00:03:08.767
Next we will change the split while keeping every answer the same.
