Two of the main forces that help keep the universe orderly are gravitation and electromagnetism. Electromagnetism actually seems to have “if/then” logic embedded within it, although scientists have used a semantic cheat that tends to hide this reality.
Before scientists advanced an equation describing electromagnetism, there was first Newton's famous law of gravitation. The equation for this law is one that can be used to calculate the gravitational attraction between any two objects in the universe. The equation looks like this.
In this equation F represents the force of gravitation between the two objects, m1 represents the mass of the first object, m2 represents the mass of the second object, and d is the distance between the two objects. G is a fundamental constant of nature called the gravitational constant.
After this equation was introduced, scientists began learning a lot about electrical charges. Before too long, someone had the idea: let's try to describe electromagnetism with an equation similar to the equation for gravitation. But there was a problem with that. Gravitation always results in attraction. But electromagnetism is a force that can either result in attraction that moves thing closer together, or repulsion that tends to push things apart.
It works like this: if you have two particles nearby that are both protons (or both electrons), there is an electromagnetic force of repulsion between them. But if one of the particles is an electron and the other particle is a proton, there is an electromagnetic force of attraction between them. If one of the two particles is a neutron, then there is neither a force of electromagnetic repulsion between the two, nor a force of electromagnetic attraction between the two.
But how to shoehorn such a setup so that it follows an equation similar to the law of gravitation? Scientists came up with an answer. The answer was to create a semantic convention by which electrons are considered negative charges, and protons are considered positive charges. Using such a convention, it was possible to declare Coulomb's law, which is stated as follows.
In this equation F represents the force of electromagnetic attraction or repulsion between the two objects, qa represents the charge of the first object, qb represents the charge of the second object, and r is the distance between the two objects. K is a fundamental constant of nature. Under this formula, a negative number (for F) is considered a force of attraction, and a positive number (for F) is considered as a force of repulsion.
For scientists, this semantic convention works very well. It allows them to do exact calculations involving electrical charges. There is just one problem with this semantic convention: it is a cheat, a cheat that is not justified by the actual situation we find in nature. We can call this cheat “Coulomb's cheat.”
Judging nature purely by its actual characteristics (without considering semantic conventions or what is convenient for scientists doing calculations), it is not accurate to say that electrons are negative charges and protons are positive charges. Nature itself has no characteristics that justify the claim that a proton has a positive charge and an electron has a negative charge.
It is easy to imagine universes in which it might be justified and accurate to call the electron charge negative and the proton charge positive. One such universe would be one in which electrons always caused a repulsion between themselves and other particles, and in which protons always caused an attraction between themselves and other particles. But we don't live in such a universe. It might also be accurate to call the electron charge negative if electrons tended to produce repulsion more often than they tend to produce attraction. But as far as scientists can tell, electrons do not tend to produce more repulsion than attraction, and produce just as much attraction as repulsion. The same thing is true for protons.
So the long-honored semantic convention of considering electrons as negative charges and protons as positive charges is not actually warranted by what we find in nature. But how can we accurately describe what is going on, without using this time-honored cheat? For starters, we can stop using the terms “negative” and “positive” in talking about charges, and simply use the term “proton-like charges” to refer to charges like that of the proton, and the term “electron-like charges” to refer to charges like that of the electron.
To describe what is going on in nature (without using Coulomb's cheat), we can use two flowcharts. Below is a flowchart that describes the rule followed by a proton in regard to how to react to some nearby particle.
Below is a flowchart that describes the rule followed by an electron in regard to how to react to some nearby particle.
These flowcharts give us an accurate description of electromagnetism, without the unwarranted cheat of considering electrons as negative charges and protons as positive charges. But when you look at these flowcharts, you might have quite a realization. The realization is: nature is actually computing to determine whether there should be an attraction, a repulsion or neither between two particles. What is going on is not simply a law that can be expressed as an equation. What is going on is that nature is using an algorithm, a bit of programming, some “if/then” logic. Each one of those diamonds in the diagram represents a piece of “if/then” logic. Each line leading out of the diamond represents either an “if” or a “then” in some "if/then" logic.
This particular piece of “if/then” logic is actually fundamental to our existence, because if nature stopped performing this piece of code at any instant, the chemistry in our bodies would instantly be turned off, and we would all die within a few seconds.
The realization that electromagnetism is fundamentally algorithmic is not at all a trivial one. If nature has programming inside its very core – if it has "if/then" logic at the heart of one of its most fundamental forces – it is reasonable to assume that programming is controlling other key operations of nature, such as the development of large-scale order, the origin of life, and the origin of intelligence. Pondering this at length, it becomes all too reasonable to assume that since the time of the Big Bang, the universe has been progressing along a path that it was programmed to achieve from the very beginning.
So far I have justified the first part of this post's title, by explaining why electromagnetism is algorithmic. But what about my claim that electromagnetism is exquisitely balanced? I will justify that claim in the second part of this two-part post, and will explain two ways in which electromagnetism is as finely balanced as the Washington Monument would be if it were positioned upside down, and balanced on its top tip.