Skip to main content

Logical operators on complex values

Traditionally, computers define logical operators on real values:

AND
0 0 | 0
1 0 | 0
0 1 | 0
1 1 | 1

OR
0 0 | 0
1 0 | 1
0 1 | 1
1 1 | 1

XOR
0 0 | 0
1 0 | 1
0 1 | 1
1 1 | 0

I believe a similar construct can be made for complex values except that logical equivalency could maybe have two interpretations: either the magnitude is the core comparison value or the frequency (radian representation of the complex value in the unit circle) is the core comparison value.

From a magnitude perspective, we could say that X AND Y for two complex values X and Y is itself if and only if both X and Y lie on the same circle.  In a sense, this is establishing a primitive group structure because the value of the operator depends on whether or not an item belongs in a set. Likewise, we could define an XOR operator the same way, just in the inverse, that both X and Y do not belong to the same circle.

From a frequency perspective, we could say that X AND Y for two complex values X and Y is itself if and only if both X and Y lie on the same group structure generated by the radian. Is there an isomorphism between the spirals generated by different magnitudes, but for the same radian? Fundamentally, it feels like there should be a common structure. When the magnitude is iteratively scaled to one, it feels like these structures should grow from the same point of the unit circle. Maybe it is even a fractal?

If the magnitudes of X and Y are both 1, then the frequency check is a simple group check whereby the radian operator is applied iteratively until a group is defined. If the magnitudes of X and Y are both less than 1, then there is some infinite structure that converges to zero? If the magnitudes of X and Y are both greater than 1, then there is some infinite structure that converges to infinity?

Maybe we can define X AND Y to be itself if both X and Y lie on the same spiral that begins on the same point of the unit circle. And similarly, maybe we can define X XOR Y to be itself if X and Y do not lie on the same spiral.


Comments

Popular posts from this blog

Guitar improvisation from May 23, 2025

Time, partitioning, and synchronization

Any time measuring method inevitably runs into the issues of partitioning and synchronization. Partitioning deals with the issue of dividing a larger measure into smaller measures, and combining smaller measures into a larger measure. Synchronization deals with the problem of how a set of devices can self-correct if some of them are corrupted. The two are fundamentally related because often a choice in one determines a choice in the other. A measure is often defined by a set of synchronization points, such as the radioactive decay of an element or the frequency of a crystal oscillator. Synchronization points can often be defined as a measure of a change in space, such as the revolution of a planet around a star, or the change in energy state of an oscillating structure. Fundamental to both is the notion of change. A synchronization event can only be defined if there is a unit of space in which a change is observed. And either the magnitude of the space is large (such as the movement of...

Context, reconciliation, and performance

I believe the software industry needs a word to differentiate the design of performant software from the inside (or bottom up) versus the outside (or top down). There is a heavy focus on algorithms and data structures in the software engineering world, which is great if you are designing performant software from the inside out (bottom up). But this will only be performant so long as there is one monolithic structure. As soon as there are competing components (or silos of functionality) that need to integrate together, the integration of the components often becomes a performance bottleneck. And this phenomenon is unavoidable because there is a limit to any human's working memory. Large problems are broken down to smaller problems so that they can be more easily grappled with. But the choice of how things are isolated often can incur a performance gain or loss that is just as significant in magnitude as choosing the right data structures and algorithms. And it is this way because da...