Gatekeeping Logic

Nothing is sacred to mathematicians. Something as simple as the standard binary logic can be expanded, but how, and can we build gates for these new logics?

Binary Logic

Let’s start with a brief summary of classical logic, also called Binary or Boolean Logic. We have two states, 0 and 1, and a collection of connectives,

  • Conjunction or “AND”, denoted A \wedge B.
  • Disjunction or “OR”, denoted A \vee B.
  • Negation or “NOT”, denoted \neg A.

Those who are familiar with propositional calculus might note that we have not included implication (\to) here, however this is not a problem as we can represent implication by the above. We actually can also remove disjunction as well, however this could cause problems later.

It should also be noted that we will ignore the distinction between propositional logic and boolean algebra like structures for simplicity.

Gate Time

We can then combine these to get logic gates, I’m assuming you have some background with logic gates here.

For example, here is an XOR gate.

And a Full Adder.

Getting More Logical

Like all things in mathematics, we can get more general that the Boolean Logic above, that logic has 2 states, 0 and 1, so what if we introduce a third 1/2?

We then need to decide what our connectives do with this new symbol. First we can note that when we take our symbols to be the actual numbers 0 and 1,

  • A \wedge B = \min(A,B).
  • A \vee B = \max(A,B).
  • \neg A = 0 for A = 1 and \neg A = 1 for A = 0.

So let’s just extend it this way to our new symbol, using the above definitions for \wedge and \vee while we set \neg 1/2 = 0. We can then directly copy the previous XOR gate to see what happens now.

Let’s see if our adder works.

Sadly, it does not work as we’d want.

Unfulfilled Adder

So what do we want? We want to be able to represent A + B into two new variables, however before we were working in base 2, now we will be working in base 3. So we can view 0 as 0, 1/2 as 1, and 1 as 2 and work mod 3.

So for example here are a few examples of what we want

ABCSOUTCOUT
01/201/20
1101/21/2
1/21/21/201/2
11/2111/2

But it turns out that we cannot create this in Gödel logic, this is because all of our binary connectives (the connectives which take 2 inputs) map (0,0) to 0 and (a,b) to c, for a,b,c \in \{1/2,1\}. We can then combine this with negation not being able to tell 1 and 1/2 apart to get that we can’t have a gate which gives the bottom two lines of the table above.

We can see that this also holds even if we add constants, e.g. fixed elements which always have a specific value. (In fact there is far a far easier case for when we don’t have constants).

Stronger Gates

The main problem we have is that Gödel’s logic is the logic of relative comparison – Let’s us order statements by which are more likely – which is too weak for our needs. Instead we consider Łukasiewicz (pronounced “WUUK – A – SHEV – ITCH”) logic, the logic of absolute comparison – In some sense we can quantify how different two statements are. This new logic still has the same basic structure as Gödel’s logic, however we have 2 new gates.

  • Strong Conjunction or Strong AND, denoted \otimes
  • Strong Disjunction or Strong OR, denoted \oplus

We also change the form of negation so that \neg x = 1 - x. Proper Łukasiewicz logic does again feature more properties, but we will not talk about them here.

We can then define our new gates as follow

  • x \otimes y = \max(0, x+y -1)
  • x \oplus y = \min (1, x+y)

Adding this all together

We can then use this to build a full adder, below is my way of doing this. It is by no means the best option.

What’s Next

Now that we have done this for 3 states, a good question is if we can do this for more states, in fact we can do this for any finite amount of states, the above adder does break however.

Overall this raises a few questions I am unable currently to answer

  • Is there a circuit which works for all n?
  • We can go beyond the finite case and consider all rational or even irrational points in the interval [0,1], can we build an adder for this?
  • Can these strong gates be made in actual physical circuits?

If you want to have a go making some circuits, You can use the tool I use here.

Tags:

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *