In this blog post, we’ll explore how 0s and 1s are repeated and utilized inside electronic devices through the “Dodge the Poop” game.
Modern Society and the Foundations of Digital Technology
Modern society is one where cutting-edge equipment is ubiquitous—in homes, offices, cars, and on the streets. We now have self-parking cars, and we can even operate our home’s boiler while we’re out. We use these devices with such ease, yet they conceal highly complex processes and formulas. It’s often said that the digital world consists solely of 0s and 1s, but the meaning of this statement may not be immediately apparent. This is because many devices omit the complex underlying components and show only the simple, high-level interface. While there are many examples, the computer game “Dodge the Poop” can be used to explain this concept simply. This game, which takes up less than 1 MB of space, is a simple game where you just have to dodge countless pieces of poop falling from above. However, if you analyze the game, you’ll find it contains a surprisingly complex structure.
The Structure of “Dodge the Poop”
Broadly speaking, the structure of “Dodge the Poop” consists of poop falling from above, the player moving to dodge it, and the player’s score increasing each time they successfully dodge. Breaking down the falling poop in more detail, we can see that it is generated randomly, falls in a straight line across the screen, varies in speed depending on the level, and falls randomly but not all at the same time. It’s difficult to cover all of these, so here we’ll only examine the basic principles of how poop is generated.
The Power Switch and the 0/1 Connection
If we translate the 0s and 1s mentioned so far into an electrical circuit, this can be viewed as whether voltage is applied (1) or not (0); in the context of poop generation, it can be viewed as whether poop is generated (1) or not (0). Poop does not flow continuously but rather goes through a cycle of being produced and then stopping. However, since the power source remains constantly on—we do not turn the power on and off while dodging poop—the first problem we face is how to make the power source, which always comes in as 1, produce alternating 1s and 0s.
Creating a Loop with AND, OR, and NOT
First, there are devices called AND, OR, and NOT gates. As their names suggest, an AND gate outputs a 1 only when both inputs are 1, while an OR gate outputs a 1 if either of the two inputs is 1. A NOT gate takes a single input and inverts its value. Each of these devices takes a certain amount of time to process a current, much like the time it takes to pass through an obstacle. By utilizing this delay time, we can build a device that repeatedly generates 0s and 1s.
To explain the operating principle more simply, let’s consider a similar example. Suppose students at school are allowed to leave one at a time at regular intervals, and they can only go home once there are two of them. The first person to come out cannot go home alone, so they must wait in the waiting room for the second person to come out; once the second person arrives, the two go home together.
The third student, after the first two have gone home, is left alone and must return to the waiting room to wait for the next person. In this way, the cycle of being able to leave and not being able to leave repeats.
Let’s apply this analogy to an actual circuit. Think of the incoming power supply (1) as a continuous stream of students, the AND gate as the main gate, and the NOT gate as the waiting room. First, if we connect the power supply (student) to one input of the AND gate (main gate), the output will be 0 (cannot go) because a 1 has not yet been applied to the other input. If we feed this output into the NOT gate (waiting room) and connect that line back to the other input of the AND gate, the output that was originally 0 becomes 1 after passing through the NOT gate. This 1, combined with the power input, sets the AND gate’s output to 1; this then passes through the NOT gate again and becomes 0. In this way, the delay (waiting time) caused by the NOT gates is intermixed among the output values, resulting in a repeating pattern of 0s and 1s.
Meaning and Conclusion
As seen in the example above, even a simple problem involving the repetition of 0s and 1s requires such a complex structure. Other components are made up of far more complex systems, and if we look at smartphones—rather than simple circuits—we’ll find an enormous number of 0s and 1s interacting with one another. It may feel as though the scenes we saw in ‘The Matrix’ are not entirely fictional. Creating complex machines from such simple principles and refining them so that people can use them conveniently is one of the key roles of electrical engineering.