1. Introduction
Most of quantum computing today is written in the mathematics of quantum mechanics [1]. In that language, a state is a list of complex numbers, called amplitudes. A gate is a matrix that acts on this list. Several bits are joined by the tensor product, which multiplies the length of the list. This mathematics has served physics relatively well, and we can build on it with gratitude. Yet it is not a Euclidean number system in the sense of [2]. A state does have a length. However, no product takes two states of one system to a state of the same system, so that lengths multiply and the product can be divided back. Moreover, the Euler relation
is written for the one imaginary unit i. Therefore a turn about any other axis becomes a matrix, , rather than a number. In the same way, Schrödinger’s equation carries i on its time derivative alone [3], while space stays real. In three dimensions, however, one imaginary unit cannot hold three directions. Consequently, spin is written with Pauli’s matrices, which are the quaternion units multiplied by the complex unit [4]. Dirac’s equation uses larger matrices [5] to satisfy the relativistic mathematics of Minkowski, which is fundamentally non-Euclidean. These are differences of form. They do not limit what can be computed, since the matrices represent the same turns faithfully. Our motivation is the form itself.
The arrow numbers, by contrast, are a Euclidean number system [2]. Together with the real numbers, they are the normed division algebras of Section 4. Every arrow has a Euclidean length, the ordinary length of Pythagoras. The length of a product is the product of the lengths. Moreover, every arrow except zero can be divided by, so that every product can be undone. Finally, the Euler relation
(1)
holds for every unit imaginary vector
. Thus, a turn about any axis is a single number. The arrows keep the same turns as Pauli’s matrices and simply write them as numbers. Therefore, we ask a simple question. What if we develop a new type of Boolean algebra, based on the Euclidean mathematics of arrows?
To see what such an algebra must do, recall how a computer thinks. Every digital machine is built from a handful of logic gates. An inverter, or NOT, turns true into false and false into true. An exclusive OR, or XOR, answers whether two bits differ. An AND answers whether both bits are true. Boolean algebra is the arithmetic of these gates [6] [7]. However, it is usually written with its own symbols, apart from the numbers of geometry. In this paper, by contrast, the gates come from the arithmetic of the arrow numbers themselves.
This paper belongs to a series that develops physics using only one family of numbers, the Euclidean arrow numbers. They consist of the complex numbers
, the quaternions
and the octonions
[2]. This approach grew from some questions regarding the anisotropic effective mass in semiconductors. This is a mass that differs from one direction to another, and it cannot be written as a quotient of ordinary vectors [8]. The solution to this problem then continued with quaternion time and matter [9]-[13]. In Arrow of Time [14], the time moment of a physical event in spacetime is an arrow. We also postulate there that time progresses along the vertical scalar axis, from the negative (past) to the positive (future). Thus, its direction changes from −1 to 1 along the vertical axis of a unit sphere. Furthermore, a communication signal travels from the negative space (source) to the positive space (detector) along the horizontal imaginary axis. This mental picture suggested the first gate of this paper. Indeed, the passage of an arrow from −1 to 1, both vertically and horizontally, looks like the transfer curve of an inverter.
![]()
Map of the paper: a property of the arrow numbers, the gate it gives, and the circuit that builds it.
Accordingly, this paper takes up seven problems and resolves each of them.
1) Bits in arrows. A bit has two values, while an arrow has a length and a direction. It is not obvious, therefore, how a bit should be written as an arrow, or which logic the mathematical operations of arrows perform. We write a bit as a sign. Then the basis units of the arrows turn out to multiply as XOR (Section 2).
2) NOT and its square root. An arrow can go from −1 to 1 in two ways, around zero or through it. So it is unclear whether these make the same inverter. In fact they differ. The rotation keeps the length, whereas the passage through zero, still a one-to-one NOT, holds the threshold that decides. Moreover, the square root of NOT is just one unit (Section 3).
3) AND by deciding. XOR and NOT alone cannot build every gate, because AND is needed as well. The passage through zero, however, acts as a threshold. Therefore the sign of a sum of three inputs gives the majority gate, hence allowing AND, OR and NAND (Section 6).
4) AND without loss. Products of one arrow and symmetries of the multiplication table give only reversible gates of the XOR kind. Thus reversible AND, the Toffoli gate, seems out of reach. Nevertheless, the non-commutative order of a quaternion product gives the AND gate of two bits. Likewise, the grouping of an octonion product gives the AND gate of three bits (Sections 5, 7 and 8).
5) The ladder. Each doubling, from
to
to
, gives up a rule of arithmetic. One may therefore ask what it gains in return. The answer is a ladder. The quotient that measures each lost rule carries one more degree of AND (Sections 4 and 9).
6) The quantum edge. Quantum computing writes its gates as complex matrices. So it is natural to ask how much of its logic the arrows hold as numbers. The quaternion units
,
,
are Pauli’s three gates, up to the complex unit. Their XOR table is the one that quantum error-correcting codes already use. On their own, however, Pauli’s gates only flip bits, which is the XOR half of logic. The arrows add AND, from the order and the grouping of a product. Moreover, they hold the single-spin Clifford gates exactly. The T gate is a unit quaternion too, outside the finite Clifford set. However, following many entangled spins remains a separate open problem (Section 10).
7) Cheap hardware. Finally, a new algebra is useful only if it can be built cheaply. In standard CMOS, a sign is carried on a pair of wires. Then the NOT function and every multiplication by a fixed basis unit become wiring connections. The Toffoli gate is built with fourteen transistors, and the majority gate takes three CMOS capacitors and an inverter. Together, the two arrow operations make a full adder, as SPICE simulations confirm (Section 11).
The paper treats the gates of single arrows and their products. Positional number codes with arrow radices are left for a separate paper, although the same algebra makes them possible. Throughout, every new statement is checked by a script, in exact rational arithmetic wherever possible. Moreover, each check carries a control. A control is a nearby case that must fail, so that a check cannot pass by accident (Section 12). Table 1 collects the terms.
Table 1. Arrow terms used in this paper, as in [2] [14].
Term |
Symbol |
Meaning |
Arrow number, arrow |
|
An element of
,
or
: a real number and a vector |
Scalar arrow |
|
The real part as an arrow |
Imaginary vector |
|
The vector part as an arrow |
Unit arrow |
|
A point on the unit circle or sphere |
Unit imaginary vector |
,
|
A direction;
in
|
Basis unit |
,
|
in
;
in
;
in
|
Euler turn |
|
A unit arrow turned by
whole turns about
|
Half turn, quarter turn |
,
|
−1 and
|
Zero crossing |
|
The passage of an arrow through zero, where its length vanishes |
Two hands |
,
|
Multiplying on the left and on the right |
Quasi-arrows |
|
Systems beyond
; division and the product of lengths fail |
2. Bits, Signs and Unit Arrows
A bit is a choice between two things. Thus, the first task is to hold that choice in a number. The simplest way is a sign. We write false as +1 and true as −1. In other words, the bit
becomes
. Then multiplication already performs a gate, since
(2)
where
is XOR, the addition of bits without a carry. Two equal bits give +1, and two different bits give −1. Thus, the product of two signs is the XOR of the bits they carry. This way of writing Boolean functions with ±1 is familiar from the Fourier-Walsh analysis of Boolean functions [15]. Here it is simply the first gate of the arrows.
Before we use the quaternions, let us recall how their units multiply. Each of
,
,
squares to −1, just as
does in
. The product of two different units is the third unit, with a sign. The sign follows the right-hand rule of the cross product, which every student of mechanics already knows:
, whereas
. Thus
(3)
Going around the circle
forward gives plus, and going backward gives minus. Therefore, the order of the factors matters. The likeness to the cross product is exact: for two imaginary vectors,
(Section 7). Consequently, a unit times itself keeps only the dot part, −1, and two different units keep only the cross part.
The arrow numbers, however, offer a second and richer way. An arrow system with
components has
basis units. These are the arrows of length one that point along the axes, and we may label them by
bits. In
, the unit 1 carries the label 0, and
the label 1. In
, the units 1,
,
,
carry the labels 00, 01, 10, 11. In
, the units
carry the three bits of their index. Each system is built from the previous one by a doubling rule, the Cayley-Dickson construction. This rule pairs two arrows of the smaller system into one arrow of the larger system [16]. Consequently, each doubling adds one bit to the label. Then the product of two basis units is again a basis unit, and its label is the XOR of the two labels:
(4)
For example,
reads
, and
reads
. As a worked example, take the register
, which holds the bits 01, and multiply it on the right by
, whose label is 11. The product is
. The label of
is
, so both bits of the register flip, exactly where the label of
has a one. The minus sign is the second Boolean function, which rides along. Figure 1 shows the quaternion table written in this way. The labels follow XOR exactly. Moreover, the sign is a second Boolean function on top of it. Among the
products, exactly
carry a minus sign. There is one in
, there are six in
, 28 in
, and 120 in the sixteen-component system that follows. As a control, the labels do not follow addition modulo
, the other natural guess.
Figure 1. The products of the quaternion units. Labelled by two bits, the product’s bits are the XOR of the factors’ bits; the sign, shaded where it is minus, is a second Boolean function on top.
Algebraists already know the structure in Equation (4). In their language, the Cayley-Dickson systems are group algebras of bit strings under XOR, “twisted” by the sign [17] [18]. In plain words, the units multiply like bit strings, and a sign rides along. We build on this result and add its reading as logic. Indeed, the units form a register of
bits. Multiplying by a unit is then a gate that flips exactly the bits set in its own label. In conclusion, the arrows multiply as XOR in two ways. The first is through the signs of scalar arrows, Equation (2). The second is through the labels of basis units, Equation (4).
3. NOT and Its Square Root
An inverter turns +1 into −1 and back. In the arrows there are two ways to do so, and Figure 2 shows both.
Figure 2. Two inverters, both sending
. (a) The half turn keeps the length 1 and passes through
: reversible. (b) The straight path from
to
passes through zero, where the length vanishes: the zero crossing, a threshold.
The first way is a rotation. The Euler turn
(5)
starts at −1, passes through
at
, and ends at 1. Its length stays 1 all the
way. It is therefore a half turn, like the hand of a clock moving from nine o’clock to three o’clock over the top. Moreover, it can be run backwards, so it is a reversible NOT. Every point on the way is a unit arrow. Consequently, nothing is lost.
The second way is a straight line. Our first picture was an arrow whose real part goes from −1 to 1, while its imaginary part goes from
to
. This is the path from
to
. Its end is minus its start, so it is again an inverter. Halfway, however, the arrow passes through zero. There its length vanishes, and its direction is, for that moment, undefined. We call this passage the zero crossing. Therefore the straight path is not a rotation. As a gate, however, it is still reversible. It sends −1 to 1 and 1 to −1, which is a one-to-one map, so the input can always be recovered from the output. Only the direction of the arrow is undefined, for the single instant at zero.
The zero crossing matters for another reason. Zero separates the two signs, so it is where a threshold sits, as in an electronic inverter. Section 6 uses it to decide. Landauer’s principle charges energy to gates whose map from inputs to outputs is many-to-one [19]. NOT is one-to-one, so it owes none. By contrast, the majority gate of Section 6 maps eight inputs onto two outputs, and it does owe energy. A vanishing length alone neither erases information nor sets a dissipation. As a control, the rotation of Equation (5) never passes through zero.
Next, the square root of NOT is a gate that gives NOT when it is applied twice. In the arrows it is simply the unit imaginary vector, the quarter turn:
(6)
Two quarter turns make the half turn (Figure 3). In quantum computing,
acts on the two amplitudes of a qubit as the matrix
[1]. Here, by contrast, NOT is a sign, and its square root is a single unit. As a control, an eighth of a turn applied twice gives a quarter turn rather than NOT.
Figure 3. The square root of NOT. Multiplying by
turns an arrow a quarter turn; two quarter turns are the half turn, , which is NOT.
Finally, gates must compose into gates. One gate followed by another should again be a gate of the same family. The quaternions offer a small and exact family that does so, the 24 unit Hurwitz quaternions [20] [21],
(7)
Their components are whole or half-whole numbers, so a computer holds them exactly. Moreover, their products and inverses stay among them. In other words, they form a group of 24 elements, called the binary tetrahedral group. As a control, adding the arrow
breaks the closure. In conclusion, the arrows hold two inverters. The rotation keeps the length, and the zero crossing holds a threshold, while both are one-to-one. The square root of NOT is a single unit.
4. How Far Division Reaches
A gate followed by a gate should again be a gate, and a reversible gate needs an inverse. In the arrows, both follow from one property. The length of a product is the product of the lengths,
(8)
Then the product of two unit arrows is again a unit arrow, and every arrow except zero can be divided by. Number systems with this property are called normed division algebras. By Hurwitz’s theorem, it holds in
,
,
and
, and in no other system of this kind [16] [22]. One more doubling gives the sixteen-component quasi-arrows. There Equation (8) fails. Indeed, two nonzero numbers can even multiply to zero. For example, in the doubling convention of our checks,
.
Something, however, survives. The basis units still multiply to ± basis units by Equation (4), in sixteen components and in every system beyond. Thus, the XOR logic of the labels survives the loss of division. Likewise, a unit imaginary vector still squares to −1. Therefore, the half turn and the quarter turn of Section 3 survive as well. What is lost is that a product by a unit no longer keeps every length. Consequently, a general unit arrow is no longer a gate on general arrows. For more bits than an octonion holds, we therefore place several arrows side by side, in a register. Each of them keeps its own division. In conclusion, the gates between general unit arrows live in
,
and
, while the XOR logic of the basis units reaches every dimension.
5. The Reversible Linear Gates
Products and rotations give a whole family of reversible gates. The symmetries of the octonion table show them most clearly. Suppose we relabel the seven imaginary units and change some of their signs. If every product of the table is kept, the relabelling is a symmetry of the octonions. There are exactly
such signed relabellings. Their action on the labels is exactly the set of 168 invertible linear maps of three bits. These are the maps that respect XOR, and they form the group
. The same group permutes the lines of the Fano plane, the seven-point diagram of the octonion table [16]. The factor 8 counts the sign changes that go with each map.
Among these maps are two familiar gates of reversible logic. The controlled NOT, or CNOT, flips bit 0 if bit 1 is set. SWAP exchanges bits 0 and 1. Both are symmetries of the octonions. The Toffoli gate, by contrast, flips bit 0 if bits 1 and 2 are both set. It is not among them, and it cannot be, because it is not linear in the bits. Every gate of this family is XOR logic. Consequently, products by fixed units, rotations and symmetries of the multiplication table give reversible and exact gates. Yet none of them makes AND.
Several arrows can work together in two ways. In an array, or register, each element keeps its own division and its own gates. However, products taken element by element never mix the elements. In a matrix of arrows, by contrast, the elements mix. Matrices of quaternions multiply associatively, but they do not commute, so gates on several elements are matrices. Those whose inverse is the conjugate transpose form the compact symplectic group. This group is the setting of quaternionic quantum mechanics [23] [24]. Matrices of octonions, on the other hand, are not associative. In conclusion, the reversible linear gates, CNOT and SWAP among them, are the symmetries of the arrows. AND needs a step beyond them.
6. Deciding Gates through Zero
The straight inverter of Section 3 passes through zero. Zero separates two sides, like the line on a playing field. Hence it can decide. We add the input arrows and keep only the side of zero on which the sum falls,
(9)
with each input ±1. This is the majority gate, a gate of threshold logic [25]. Like a vote of three, it follows the majority. Holding one input at false, +1, gives AND. Holding it at true, −1, gives OR (Figure 4). Moreover, AND followed by the inverter is NAND, from which every Boolean function can be built. The third input is needed, however. With two inputs alone, two different bits add to zero, and the gate cannot decide. This is the role of the zero crossing in the arrows. It is also the role of the threshold in a transistor or a neuron.
Figure 4. Gates through zero. The inputs are added and the zero crossing decides the side. With a constant +1 (false) as the third input the result is AND, with −1 (true) it is OR. Two inputs alone would leave the mixed cases at zero, undecided.
The same gates also have an exact algebraic form. Every Boolean function of ±1 inputs is a polynomial in them [15]. Sums and products are arrow operations, and so
(10)
Both are exact on all four inputs. As a control, the product
alone gives XOR rather than AND. However, these polynomials are not rotations, because between the bit values they leave the unit arrows. In conclusion, the zero crossing gives the deciding gates, majority, AND, OR and NAND, and with them all of Boolean logic. Like every irreversible gate, majority loses information about its inputs.
7. AND from the Order of a Product: The Toffoli Gate
Reversible logic keeps every input recoverable, so that a computation can always be run backwards. Its universal gate, found by Toffoli, is a gate of three bits. It flips the third bit when the first two are both set [26] [27]. This gate needs AND. Yet, as we saw, the gates of Section 5 cannot make it. The quaternions, however, have one property that the complex numbers lack. The order of a product matters. First
then
gives
, whereas first
then
gives
(Figure 5).
Figure 5. AND from the order of a product. First
then
gives
; first
then
gives
. With the bits written as
and
, the quotient of the two orders is −1 only when both bits are 1.
We write the bit
as the arrow
, which is 1 or
, and the bit
as
. The quotient of the two orders of their product is then
(11)
It is −1 only when both bits are 1. In other words, it is the AND of two bits, written as a sign. Non-commutativity, the dependence on order, makes it. Geometrically, the product of two imaginary vectors is [2]. Thus two parallel arrows give the same product in either order, whereas two perpendicular arrows give products of opposite sign. The units
and
are perpendicular. Therefore, the AND of two bits asks a geometric question: are both arrows imaginary, and so perpendicular? As controls, two bits on the same axis always give 1, and so do two bits in the complex numbers.
The Toffoli gate then follows at once. We write the target bit
as a sign,
, and multiply it by the quotient:
(12)
The target flips exactly when both controls are 1, and the controls are unchanged. Applying the gate twice restores the target (Figure 6). Moreover, a target written as a sign returns exactly to an axis code by
. This map gives 1 for
and
for
. The Toffoli gate with constant inputs is universal for reversible classical logic [26]. Therefore the quaternions carry universal reversible logic.
The sign in Equation (11) is, however, known. For the basis units, it is the commutation sign of the twisted group algebra, which is bilinear, that is, linear in each of the two labels [17] [18]. In quantum computing, it is the commutation phase of Pauli’s gates,
, written as a symplectic product of bits, a sum of crossed products [28] [29]. Furthermore, in the theory of computation, commutators of group elements are a classic way to compute AND [30]. What we add is the reading as a reversible gate. The quotient of the two orders is the control of the Toffoli gate.
Figure 6. The Toffoli gate in the arrows. The controls choose the units
and
; the target is a sign
, multiplied by the quotient of the two orders. It flips the target exactly when both controls are 1 and undoes itself when applied twice.
In conclusion, the quaternions turn the order of a product into the AND of two bits, and with it into the Toffoli gate.
8. AND of Three from the Grouping of a Product
The octonions give up one more rule. The grouping of a product matters, so that
in general. The same idea therefore goes one step further. We write three bits on three octonion units,
,
,
. The quotient of the two groupings is
(13)
which is −1 only when all three bits are 1. Thus, it is the AND of three bits. The choice of units matters, however. The units
,
,
lie in one quaternion plane, where products associate. As a control, they always give 1. In general, there are 343 ordered triples of imaginary octonion units. Over all of them, the two groupings differ exactly when the three labels are independent as bit vectors. This means that no two labels are equal, and none is the XOR of the other two. In geometric words, three independent labels span a volume, just as three vectors that do not lie in one plane do. Thus the AND of three bits asks whether the three arrows span a volume.
This, too, is a known result. Morier-Genoud and Ovsienko write the associator sign of the octonions as
[18]. Here the associator measures how much the grouping matters, and the exponent is the determinant of the three labels over the bits. Likewise, the code loops of Griess carry the same sign as the parity of the bitwise AND of three words [31]. Equation (13) is its special case for three independent units, where the determinant is
. We read it as a gate with three controls. In conclusion, the octonions turn the grouping of a product into the AND of three bits.
9. The Ladder of the Arrow Numbers
The results so far fall into a pattern, shown in Figure 7. The complex numbers commute and associate. Their units already carry the AND of two bits as a carry,
. However, this AND is mixed with the XOR of the labels. The quotient of the two orders, which would separate it, is always 1. The quaternions give up commutativity. Then the quotient of the two orders, Equation (11), gives the AND of two bits by itself. The octonions, in turn, give up associativity. Then the quotient of the two groupings, Equation (13), gives the AND of three. Geometrically, the ladder climbs in dimension. The complex numbers have only one imaginary direction, so none of their units are perpendicular. The quaternions add perpendicular pairs, which span an area, and with them the AND of two bits. The octonions add independent triples, which span a volume, and with them the AND of three. Thus, each doubling of the arrow numbers gives up one rule of arithmetic. Consequently, the quotient that measures the lost rule carries one more degree of AND.
![]()
Figure 7. The ladder of the arrow numbers. Each doubling loses one rule of arithmetic, and the quotient that measures the lost rule carries one more degree of AND: none in
, where AND appears only as a carry mixed with XOR; the AND of two in
; the AND of three in
.
Algebraically, this rise is known. The sign function of the basis units is bilinear in
and
, that is, of degree two in the label bits. It is cubic, of degree three, in the octonions, and it gains quartic terms, of degree four, in sixteen components [17]. Its commutator part first appears in
, and its associator part in
. The ladder reads this rise as logic. The next doubling, to the sixteen-component quasi-arrows, gives up alternativity. Alternativity is the weaker rule that a product with two equal factors still associates. The quartic sign terms suggest an AND of four. However, whether a gate of four controls follows from these products is open. In conclusion, the quotient that measures each lost rule of arithmetic carries one more degree of logic.
10. Spin as Logic and the Quantum Edge
A spinning electron has its own logic, since spin up and spin down form a bit. In the arrows, a vector
turns by the sandwich
(14)
where
is the Euler angle and
the conjugate. The arrow
turns by half the angle, and it is called the spinor. Consequently, one whole turn of the vector makes
, while the vector is back where it started. Only two whole turns bring
back to 1. Since
and
turn every vector in the same way, the sign of the spinor is a bit hidden from vectors.
The spin flip, NOT on the spin, is a half turn of the vector. Its spinor is the unit
itself, since
. Flipped twice, the spin is up again, while
. In other words, the hidden bit has flipped. The units
,
,
are Pauli’s three gates, up to the complex unit that quantum mechanics attaches to them [1] [4]. Consequently, the XOR rule of Equation (4) with
,
,
is the binary table of the Pauli gates. Stabilizer codes, the codes that protect quantum information against errors, use this table [28]. The arrows give it a geometric origin in the Cayley-Dickson doubling. Moreover, multiplying on the left and multiplying on the right, the two hands, act independently and commute with each other. Together they make the rotations of four-dimensional space [21].
The eight units
are the Pauli gates up to phase. The 24 Hurwitz units of Equation (7) contain them. Together with the 24 arrows
, where
are two of
, they form the 48 spinors of the single-spin Clifford gates. This set is the binary octahedral group [21]. Up to sign, these are the 24 rotations of the octahedron. Circuits of Clifford gates on many spins can be followed on a classical computer with little effort. This is the Gottesman-Knill theorem [32] [33], which tracks Pauli strings, that is, registers of quaternion units. One more gate, however, makes the set universal for quantum computing [34]. It is the T gate, which turns the spin by an eighth of a turn.
The T gate lies outside the finite Clifford set. Yet it is still a single unit quaternion, the spinor
. This spinor is a sixteenth of a turn about the spin axis
. Its components lie beyond the halves and
of the Clifford spinors. Thus, every single-spin gate is an arrow, up to phase. Following many entangled spins efficiently is a separate problem. It needs an arrow encoding of the joint state of several spins, and an algorithm that follows that state through a circuit. Neither is given here. Classically, the cost of such circuits is believed to grow exponentially, and whether an arrow encoding changes this is open. This question is related to the one that Bell’s theorem settles for local classical descriptions [35], though it is not the same. In conclusion, the arrows hold Pauli’s gates and the single-spin Clifford gates exactly. The T gate is a unit arrow as well, and the open edge is the joint state of many entangled spins.
11. Arrow Logic in Hardware
The gates so far are algebra. We now ask how they could be built. Hardware for the arithmetic of complex numbers is not new. Khmelnik developed the algorithms and hardware of an arithmetic of complex numbers, vectors and figures, in which a complex number is coded as a single binary string [36]. Here, by contrast, the arrow numbers serve chiefly as logic, and their units and signs become gates. We keep to the cheapest technology, standard CMOS, with its transistors, its transmission gates and its MOS capacitors. A transmission gate is an n-type and a p-type transistor side by side. It is a switch that passes both logic levels.
How a gate is built depends on the way a sign is carried. Fast CMOS circuits often carry a bit on a pair of wires, with the signal on one wire or on the other. This is called dual-rail signalling. We let the signal on the first wire,
, be the sign +1 (false), and the signal on the second wire,
, be the sign −1 (true). With both wires low, the pair holds 0. Then the gates of the previous sections take simple forms (Figure 8). The circuits below are checked at the level of switches, and also in SPICE (Section 11.6).
Figure 8. Arrow logic in dual rail. (a) The half turn, NOT, is two crossed wires. (b) The product of two signs, XOR, is a crossing controlled by
: four CMOS transmission gates. (c) Multiplying a quaternion bus on the left by
re-routes its four lanes, two of them crossed: wiring only.
11.1. NOT, XOR and the Basis Units
First, multiplying by −1, the half turn, swaps the two wires. Hence the inverter is two crossed wires, with no transistor (Figure 8(a)). In dual-rail logic, an inversion is free. Second, the product of two signs, the XOR of Equation (2), is a controlled crossing. It uses four transmission gates. The straight pair conducts when
, and the crossed pair conducts when
(Figure 8(b)). This is the familiar transmission-gate XOR of CMOS design [37], with eight transistors.
Third, a quaternion is a bus of four dual-rail lanes, one for each part
. Multiplying the bus by a fixed basis unit sends each lane to another lane, some with a minus sign. A minus sign is simply a crossed pair. For example,
(15)
so the left product by
is the re-routing of Figure 8(c). This, too, is wiring only, and the two hands are different wirings. Thus NOT, its square root and every product by a fixed basis unit cost no transistor at all.
Each lane holds one component, −1, 0 or 1. A high
wire means +1, a high
wire means −1, and two low wires mean 0, the idle (spacer) state of dual-rail logic. A bus therefore holds the arrows whose components are −1, 0 or 1. These include the eight signed basis units and sums such as
. A product by a fixed basis unit,
,
,
or
, is a signed permutation of the lanes. Hence it is wiring, whatever the bus holds. By contrast, a product by a general unit, such
as the Hurwitz unit
, mixes the lanes and needs adders. Arbitrary
magnitudes need several bits per lane, for example a sign-magnitude word or Khmelnik’s code [36]. A product by a basis unit is then still a re-routing of the words, with their sign bits crossed.
11.2. A Multiplier of Units
A signed quaternion unit fits in three bits, the sign
and the label
. The product of two units therefore has the label
, given by two XOR gates. Its sign is
, where
(16)
is the shortest polynomial in the label bits that reproduces the sign table of
. We found it by a search over all such polynomials. The whole multiplier thus takes about nine gates, six XOR and three AND. Its commutator is
, the symplectic form of the Pauli table [28] [29]. In other words, it is Equation (11) in gates. For the octonions, the label has three bits, and the sign gains a cubic term [17]. This term is the source of Equation (13).
11.3. The Toffoli Gate
In the algebra, the Toffoli gate is four controlled stages on a quaternion bus,
,
,
and
. Each stage uses one bit to choose between the straight bus and the bus multiplied by a unit. Together, the stages multiply the bus by
. This product is
, so it equals
(Figure 9). When
, a target sign on the real lane travels
. Built literally, with transmission gates on all eight wires, the four stages would take 128 transistors. The multiplier of units, however, shows what they compute. For
, with label
, and
, with label
, the commutator sign
is simply
. Therefore, in CMOS, the four stages collapse to one AND, which drives the crossing of the target pair (Figure 10). This takes a NAND, an inverter and four transmission gates, 14 transistors in all. It is the same circuit as a conventional CMOS gate for
with a dual-rail target. The circuit is logically reversible, since it is a one-to-one map of three bits. As static CMOS, however, it still dissipates energy at each transition. As a control, with both bits on the
axis, the commutator sign does not give the AND.
![]()
Figure 9. The Toffoli gate in the algebra: four stages on a quaternion bus, each a switch between the straight bus and the bus multiplied by a unit; the target sign flips exactly when
.
Figure 10. The CMOS Toffoli gate at transistor level. A NAND and an inverter form
and its complement; four transmission gates, each an n-type and a p-type transistor in parallel, cross the dual-rail target when
. Fourteen transistors.
11.4. Majority through Zero
The deciding gates of Section 6 need a threshold, and CMOS offers two cheap ones. In the first (Figure 11), three equal capacitors join at one node, the gate of a CMOS inverter. In this way they add the inputs [38]. We make the capacitors from transistors, the cheapest capacitors of any CMOS process. The gate of a transistor is one plate, and its channel is the other. A single n-type transistor, however, holds charge only when its gate is above the channel by a threshold. Therefore it responds to inputs that rise, and hardly to inputs that fall. For this reason we pair it with a p-type transistor in its own well, which holds charge when the gate falls. Together, the two respond in both directions.
The circuit then works in two clock phases. The first phase prepares the zero. The inputs sit at half the supply,
, which plays the part of zero. Meanwhile, a reset switch shorts the inverter’s output to its input, so the node settles at the inverter’s own switching point. In the next phase the inputs go to their bits. The node moves by an amount that grows with
, and the inverter reads its sign. This auto-zeroed comparator is standard in switched-capacitor CMOS [39]. Because it cancels the offset of the inverter, it widens the range of inverter thresholds over which the decision is correct (Section 11.6). Finally, a latch of two transmission gates and two inverters holds the result during the reset phase. With the third input tied low, the circuit gives AND, and with it tied high, OR. The inverted output gives NAND and NOR.
The second threshold is the carry of a binary full adder, which is the majority of its three inputs. The CMOS mirror adder computes it with ten transistors and an inverter [37].
Figure 11. Majority through zero in CMOS, at transistor level. In the reset phase
the plates sit at
and a transmission gate shorts the inverter, so the summing node
rests at the inverter’s own switching point, the zero. In the evaluate phase
the plates go to the bits,
steps by an amount proportional to
, and the inverter reads its sign.
11.5. A Full Adder
Little more is needed to add. Indeed, the two arrow operations together make an adder. A one-bit full adder adds three bits
,
,
into a sum bit and a carry bit, with
. Written as signs, the sum bit is the product of the three signs, and the carry is their majority:
(17)
Thus the product of arrows gives the sum, and the passage through zero gives the carry (Figure 12). In CMOS, the sum is two crossbars in series on the dual-rail
. It takes 22 transistors with the complements of the controls. The carry is the capacitor majority with its latch. It takes 26 transistors and three capacitor pairs, plus a shared reference at
. This is larger than the 28-transistor mirror adder of standard CMOS [37]. With the mirror carry in place of the capacitors, it takes 34. The interest of this adder, therefore, lies in its form rather than its size. Its two outputs are the two arrow operations. Shannon, too, built a binary adder, from relays, in the work that founded switching algebra [7].
Figure 12. A full adder from the arrows. The sum is the product of the three signs: two crossbars act on the dual-rail
. The carry is the majority through zero: three CMOS capacitors onto an auto-zeroed inverter, held by a latch.
11.6. SPICE Simulation
To see the circuits work as circuits, we simulated them with ngspice [40]. We used the BSIM3v3 model cards of a 0.35 μm, 3.3 V CMOS process that come with ngspice. This is a mature and inexpensive technology. All switching transistors have the minimum length, 0.35 μm, while the capacitor transistors are 5 μm long. Every check is made at the end of each input’s time slot, with a control that must fail. Table 2 collects the results.
Table 2. SPICE results, 0.35 μm CMOS, 3.3 V, ngspice with BSIM3v3 model cards.
Circuit |
Transistors |
Result |
Toffoli gate |
14 (+buffers) |
Correct on all 8 inputs; a second gate restores the input; delay about 160 ps (conditions in the text) |
Capacitor
majority |
3 CMOS capacitor pairs,
7 TGs, 2 inverters, latch |
All 8 inputs for switching points 1.29 - 2.14 V; precharged to
: only at 1.64 V; single n-type capacitor: 5 of 8 |
Two-input sum |
2 capacitor pairs |
Mixed inputs: node step 86 mV, near the zero |
Full adder |
22 (sum) + 26 and
3 pairs (carry), +
buffers |
on all 8 inputs |
Mirror-adder carry |
10 + 2 |
Majority on all 8 inputs |
First, Figure 13 shows two Toffoli gates in series, driven through all eight inputs. The target flips exactly in the two slots where
. The second gate then restores it, as a reversible gate must. The delay from the target to the output is about 160 ps.
This delay holds under the following conditions. The model cards are modelcard.nmos and modelcard.pmos of the ngspice-42 distribution, BSIM3v3, level 8, version 3.3.0, used unchanged. The temperature is 27˚C, which is the ngspice default and the nominal temperature of the cards. In the inverters and the transmission gates, the n-type transistors are 1 μm wide and the p-type transistors 2 μm wide. All four transistors of the NAND are 2 μm wide. The inputs are ideal sources with 0.2 ns rise and fall times. Each output rail is restored by a buffer of two such inverters. The only load of this buffer is the transmission gates of the second Toffoli gate. The delay is measured from the
crossing of the rising target input
to the
crossing of the falling output rail
. This transition occurs for the input
, at
ns. It is a single transition, and its path runs through the input buffer that forms the dual-rail target, the crossbar and the output buffer.
![]()
Figure 13. SPICE simulation of the CMOS Toffoli gate (Figure 10), 0.35 μm, 3.3 V. Each 20 ns slot is one input
; shown is the
rail of the dual-rail target. After one gate the target flips where
(shaded); after two gates it is restored.
Next, Figure 14 shows the capacitor majority with CMOS capacitors. Each capacitor is an n-type transistor (1.8 × 5 μm) beside a p-type transistor (5 × 5 μm). To test the auto-zero step, we gave the comparator inverter five switching points, from 0.99 to 2.35 V, by sizing its transistors. With the auto-zero step, the circuit decides all eight inputs correctly at every tested switching point from 1.29 to 2.14 V. It fails at 0.99 and 2.35 V. The window therefore extends at least 0.36 V below and 0.49 V above
. Precharging the node to
instead succeeds only at the centre, 1.64 V, among the points tested. As a control, a single n-type capacitor fails, deciding only five of the eight inputs correctly, as its one-sided response predicts. With three inputs, every step of the node is at least 0.289 V. With two inputs alone, by contrast, the mixed cases step by only 86 mV, near the zero. There the small asymmetry of the capacitors, rather than the inputs, would decide them. Finally, the mirror-adder carry gives the majority on all eight inputs.
![]()
Figure 14. SPICE simulation of the capacitor majority with CMOS capacitors (Figure 11). (a) The summing node for comparator inverters with switching points 1.29, 1.64 and 2.14 V (dotted): in each 40 ns slot the node rests at the inverter’s own zero during reset and then steps with
. (b) Inputs decided correctly: with the auto-zero step, all eight from 1.29 to 2.14 V; with the node precharged to
, only at the centre.
Figure 15 shows the full adder of Equation (17). On all eight inputs,
. The sum follows the inputs at once, whereas the carry is updated once per clock period, at the start of each evaluation.
Figure 15. SPICE simulation of the full adder (Figure 12), 0.35 μm CMOS. One input
per 40 ns slot; the count
is printed above the sum. The sum is the product of the three signs; the carry, the majority through zero, is updated at each evaluation and held by the latch.
Two limits should be stated. First, the CMOS capacitors vary with voltage, and this is why the window of switching points is finite. Linear capacitors, the poly-poly or metal capacitors of a mixed-signal process, would widen it at a higher cost. Second, the summing node floats. During evaluation it may therefore move beyond the supply rails, as Figure 14(a) shows. Our netlists give no junction areas at the switch terminals. In silicon, those junctions, together with the well of the p-type capacitors, would limit this swing. The largest swings, however, belong to the unanimous inputs, far from the threshold.
In conclusion, the arrow gates are cheap in standard CMOS. NOT and every product by a fixed basis unit are wiring, and XOR is four transmission gates. The Toffoli gate collapses, through the commutator sign, to fourteen transistors. Majority takes three CMOS capacitors and an inverter, or a full-adder carry. Together, the two arrow operations make a full adder. SPICE simulations of a 0.35 μm process confirm every truth table.
12. Verification of the Results
Every new statement of this paper is checked by a script written in Julia [41]. The arithmetic is exact and rational, except for the length along the rotation path. Standard results, such as Hurwitz’s theorem and the Gottesman-Knill theorem, are cited instead. The circuits of Section 11 are checked by a second script, in Python, at the level of switches, and also by SPICE (Table 2). Moreover, each check is paired with a control, a nearby case that must fail, so that a check cannot pass by accident. Table 3 lists them. All 59 tests of the sets in the table pass, and so do all checks of the second script. Sets 8 and 9 of the first script, on positional codes, belong to the separate paper.
Table 3. The checks: each statement with its control. Exact rational arithmetic, except the length along the rotation path.
Set |
Statement |
Control (must fail) |
1 |
Units multiply as XOR with a sign,
;
minus signs |
Addition modulo
|
2 |
Half turn is NOT, length 1 throughout; the straight path passes through zero; |
The rotation through zero; an eighth turn squared as NOT |
3 |
The 24 Hurwitz units form a group |
Adding
|
4 |
Lengths multiply for
; zero divisors and unit products for
|
Lengths multiplying for
|
5 |
Quaternion matrices associate |
Commuting; octonion matrices associating |
6 |
Spinor −1 after one turn, 1 after two; hidden sign; spin flip by
; two hands commute |
The spinor home after one turn;
|
7 |
Product is XOR; majority gives AND, OR, NAND; Equation (10); 1344 symmetries, 168 linear label maps, CNOT, SWAP |
Two inputs deciding; product as AND; Toffoli as a symmetry |
10 |
Equations (11), (12), (13); the 343 triples |
Same axis;
;
|
C |
Fixed units are signed lane permutations, Equation (15); the four-stage Toffoli and its 14-transistor CMOS form; the crossbar XOR; Equation (16); capacitive MAJ, AND, OR, NAND; with ideal linear capacitors, auto-zeroed for any inverter threshold (tested at
,
,
); with CMOS capacitors in SPICE, the window 1.29 - 2.14 V of Table 2 |
Left equal to right; stages on one axis; crossbar as AND; a trivial sign; two capacitors deciding; an offset without auto-zero |
13. Conclusions
We asked whether a Boolean algebra can be built on the Euclidean mathematics of arrows, and what each arrow system adds. The sign identities we use are known in the algebra of the Cayley-Dickson systems [17] [18]. Their reading as gates, and their realization in CMOS, are the contribution of this paper. The seven problems of the Introduction are resolved as follows.
1) Bits in arrows. Written as signs, bits multiply as XOR. Moreover, when they are labelled by bit strings, the basis units of
,
and
multiply as XOR up to a sign. This rule survives in every higher dimension.
2) NOT and its square root. A half turn is a reversible NOT. The straight path passes through zero, the zero crossing, where a threshold sits. Both inverters are one-to-one. The square root of NOT is simply the unit imaginary vector.
3) AND by deciding. Through zero, the sign of a sum of three inputs gives the majority gate. Consequently, AND, OR and NAND follow, and with them all of Boolean logic.
4) AND without loss. The symmetries of the octonions give CNOT and SWAP but no AND. The order of a quaternion product, however, gives the AND of two bits. It therefore gives the Toffoli gate, which is universal for reversible logic. Likewise, the grouping of an octonion product gives the AND of three bits.
5) The ladder. Each doubling,
, gives up a rule of arithmetic. The quotient that measures the lost rule carries one more degree of AND.
6) The quantum edge. The quaternion units are Pauli’s gates, and the arrows hold the single-spin Clifford gates exactly. The T gate is a unit quaternion too, outside the finite Clifford set. However, following many entangled spins remains a separate open problem.
7) Cheap hardware. In standard CMOS, NOT and every product by a fixed basis unit are wiring, and XOR is four transmission gates. The Toffoli gate takes fourteen transistors, and majority takes three CMOS capacitors and an inverter. Together, the product and the zero crossing make a full adder. SPICE simulations of a 0.35 μm process confirm every truth table.
Overall, the arrows give two kinds of logic. The products of arrows are reversible. NOT, its square root, XOR, the linear gates, the Toffoli gate and the AND of three can all be undone, since every arrow except zero can be divided. The deciding gates through zero, by contrast, are not reversible. Majority, and the AND, OR and NAND built from it, lose information about their inputs, and so does the full adder through its carry, although a reversible majority can be built from the Toffoli gate. Therefore only the deciding gates owe energy under Landauer’s principle, although our static CMOS circuits still dissipate at each transition.
Two questions remain open. First, do the sixteen-component quasi-arrows give the AND of four? Second, how close can a physical zero-crossing majority come to the dissipation that Landauer’s principle requires of its many-to-one map [19] [42]?
Data Availability
The check scripts (Julia for the algebra, Python for the circuits) and the SPICE netlists are archived at Zenodo, https://doi.org/10.5281/zenodo.23301436, and are available from the author on request.
Declaration of Generative AI Use
The author derived the results and prepared the draft of the manuscript. The author also directed the preparation of the final manuscript and takes full responsibility for the work. During its preparation the author used Claude Opus 5.5 (Anthropic) to assist with symbolic and numerical verification, the literature search, revision of the text for clarity, and preparation of the text and figures using LaTeX. The author obtained an independent critical review of the manuscript from DeepSeek V4.1 Flash (DeepSeek), run through the Hermes Agent. All AI-assisted output was reviewed and verified by the author, who is accountable for the accuracy and integrity of the manuscript.