Part 16 of 39

Black and White

By Madhav Kaushish · Ages 10+

The binary basket system had eliminated counting errors. But Glagalbagal soon noticed that two-state baskets were useful for more than just representing numbers.

The Monthly Reports

Each month, the managers at each location sent a report to Glagalbagal via carrier pterodactyl. The report included the usual pebble arrangement for the herd count, but it also included answers to yes-or-no questions: Did any animals die this month? Was there a predator sighting? Is the grazing land still adequate? Did the feed supply run low?

These yes-or-no answers were currently sent as verbal messages — the pterodactyl was told "yes, there was a predator sighting" and was expected to relay this accurately. The results were about as reliable as you would expect from a pterodactyl with a one-hour flight and a short attention span. Messages arrived garbled, reversed, or entirely forgotten. Frojj once received an alert about a predator at his location when the sighting had actually been at Qveshna's, because the pterodactyl confused which message was for whom.

Glagalbagal realised that yes-or-no answers were themselves two-state information — exactly what his new binary baskets were designed for. He placed a small basket next to each question on the report form. A pebble in the basket meant yes. An empty basket meant no. No verbal messages. No reliance on pterodactyl memory.

To avoid confusion with the counting baskets, he used coloured pebbles: black for yes, white for no. (Technically, the white pebble was redundant — an empty basket already meant no. But Glagalbagal had learned from Krothva that "nothing" could be ambiguous. Did the velociraptor leave the basket empty deliberately, or did she forget? A white pebble made "no" an affirmative act.)

The Combined Condition

The binary reports worked well for individual questions. But Glagalbagal's rule tablets — the ones governing what the velociraptors should do in his absence — often required checking multiple conditions together.

One rule said: "Send an alert to Glagalbagal if the herd shrunk AND there was a predator sighting." Both conditions were now represented as baskets — herd-shrunk and predator-sighted, each containing a black or white pebble. But the rule tablet needed to combine them into a single answer: should an alert be sent, yes or no?

Glagalbagal needed an operation that took two baskets as input and produced one basket as output. For the AND rule, the output should be black (yes) only if both inputs were black (yes). If either input was white (no), the output should be white.

He carved a small reference tablet:

AND operation: Look at the two input baskets. If both contain a black pebble, place a black pebble in the output basket. Otherwise, place a white pebble.

He tested it. Herd shrunk: yes (black). Predator sighted: yes (black). AND result: yes (black). Alert sent. Correct.

Herd shrunk: yes (black). Predator sighted: no (white). AND result: no (white). No alert. Correct — the rule required both conditions.

The Other Operations

Other rules required different combinations. "Send an alert if the herd shrunk OR the feed ran low" — either condition being true should trigger the alert.

Glagalbagal defined the OR operation: if either input basket (or both) contains a black pebble, the output is black. The output is white only if both inputs are white.

He also needed NOT — the ability to invert a condition. "Send an alert if the herd shrunk AND the grazing land is NOT adequate." The NOT operation was the simplest: if the input is black, the output is white. If the input is white, the output is black.

Three stone tablets showing the AND, OR, and NOT operations with black and white pebbles for each possible input combination

The Mistake with OR

Qveshna's month-end report arrived with two conditions both marked black: herd shrunk (yes) and predator sighted (yes). The rule tablet said "send an alert if herd shrunk OR predator sighted." Glagalbagal's original OR operation, however, had been carved slightly differently from what was described above. His first version read:

OR operation: If one input is black and the other is white, the output is black. If both are the same colour, the output is white.

Under this definition, when both inputs were black (yes), the output was white (no). No alert was sent. Qveshna was furious — both conditions were true, and she received no response.

Qveshna: My herd is shrinking and there are predators and you sent nobody?

Glagalbagal: The rule says to alert if one OR the other is true. Both were true, so... neither?

Blortz: That is not what "or" means when you are deciding whether to send help. If someone says "call a healer if the patient has a fever or a cough," and the patient has both, you still call the healer.

Glagalbagal had defined what is called exclusive or — true when exactly one condition holds, false when both hold or neither holds. This was the wrong operation for alerting. The correct one for "at least one condition is true" was inclusive or — true when either or both conditions hold, false only when neither holds.

He re-carved the OR tablet to use the inclusive definition and created a separate tablet for the exclusive version, labelling it carefully. The distinction between the two was subtle but, as Qveshna's predator-besieged herd could attest, consequential.

The Truth Tables

To prevent further confusion, Glagalbagal carved stone slabs showing every possible combination of inputs and the corresponding output for each operation. There were only four possible input combinations (black-black, black-white, white-black, white-white), so each table was small:

For AND: black only when both inputs are black. For OR (inclusive): black when at least one input is black. For NOT: swaps black and white. For exclusive-or: black when exactly one input is black.

He mounted these on the wall next to the instruction tablets. Velociraptors no longer needed to interpret the meaning of "and" or "or" — they looked at the two input baskets, found the matching row in the table, and placed the prescribed pebble in the output basket. Pure mechanical lookup. No judgment required.

The Compound Rule

With AND, OR, and NOT, Glagalbagal discovered he could express any condition he needed, no matter how complex, by chaining operations. "Send an alert if (the herd shrunk AND it is NOT lambing season) OR there was a predator sighting" required three operations: a NOT on lambing season, an AND with herd-shrunk, and an OR with predator-sighted. Each step took two baskets in and produced one basket out. The output of one step became the input to the next.

Any decision, however intricate, could be broken down into a sequence of these three simple operations on black and white pebbles.