Bored musings ... Trinary logic and its place in comp sci

All forums need a place for all the posts for people in the community to rant about things not relating to what the forum is about. This is that forum.

Moderator: MacroQuest Developers

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Bored musings ... Trinary logic and its place in comp sci

Post by MacroFiend » Mon Oct 20, 2003 6:55 pm

Once upon a time, I was bored at work. Yes, yes ... I know ... it is a shocking thing. Well, at the time, I was a quality assurance tester for the phone company and worked with some people who really didn't belong in the QA field (way too smart for their own good). Anyway, their intelligence was contagious, so I started musing about the next radical change to computer systems.

As I am sure all of you know, computers are based on a purely binary architecture. Either the switch is on or off. This is a wonderful approach for all things logical and without shades of gray (or grey depending on your nationality). So, in my down time, I started reading about fuzzy logic. If you are not familiar with the term, fuzzy logic is all about the shades of gray observed by organic life. It can also be called the basis for true artificial intelligence.

Now, knowing a little about fuzzy logic, I decided to envision a way to build a fuzzy system in hardware based on a trinary ideal. Instead of True/False of binary, you would add an "indeterminant" or "maybe" to the system. Having a cs/ee background, I figured the best place to start was in attempting to define the pure logical operators that this trinary system would follow. Unfortunately, this is where I ran in to some trouble. (Trinary algebra is fairly simple but moving it to a digital format makes for a bit of a headache)

So, I would like to see if anyone would be interested in helping me flush out a trinary system and how to impliment it in a binary world.

Example: Trinary NOT operator

Code: Select all

True != FALSE
Indif != INDIF
False != TRUE
Trinary AND operator

Code: Select all

True && True == True
Indif && True == Indif
Indif && Indif == Indif
False && Indif == Indif
False && False == False
Trinary OR operator

Code: Select all

True || True == True
Indif || True == True
Indif || Indif == Indif
False || Indif == Indif
False || False == False

Ooka_Chokka
a lesser mummy
a lesser mummy
Posts: 63
Joined: Fri Nov 08, 2002 12:27 am

Post by Ooka_Chokka » Tue Oct 21, 2003 11:31 pm

interesting... What's the pattern of the conversions? If you could find a sequence that you could plug into a conversion equation to scale down from trinary to binary, quad(?) to binary, and so forth, it'd be really cool... I think (not sure) that this has something to do with holographics... e.g. take a small chunk of data to recreate the entire memory system (be it light, or computer memory, or quantum information... whatever.)

You might want to research holographics and see if there is already a basic trinary system out there you can use.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Wed Oct 22, 2003 10:07 am

The "convention" for trinary logic is an extension, if you will, of binary.

True=1
False=0
Maybe=-1

This converts to current flow in an electronic circuit. Current flowing in one direction is true. No current is false. Reversed current is maybe.

Been a while since I read up on it, so current might be the wrong term. Perhaps polarity?

You don't scale down from Trinary to Binary. The hardware itself has to be constructed to support it.

HOWEVER, you might want to hold off on trying to build it! Current research is into quantum computers, where degrees of "maybe" are determined by quantum state. Maybe a year ago (?) a lab was able to replicate quantum state computing by using interference patterns from two crossing lasers, which offers a much easier (and cheaper) method of developing quantum computing. I would presume that the addition of more lasers to the equation would increase the complexity of the computing system.
MQ2: Think of it as Evolution in action.

Ooka_Chokka
a lesser mummy
a lesser mummy
Posts: 63
Joined: Fri Nov 08, 2002 12:27 am

Post by Ooka_Chokka » Fri Oct 24, 2003 8:40 pm

wouldn't i be a better number for a maybe?

where i^2 = -1 and so on? the math there makes it easier to convert to a decimal, and thus binary, system...

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Sat Oct 25, 2003 7:15 am

Conversion to Binary negates the entire purpose. If you try to implement trinary logic on a binary machine, the new language just becomes a subset (or superset) of the old. In other words, it's still binary, because every decision is based on binary hardware, and ultimately is a "yes" or "no".
MQ2: Think of it as Evolution in action.

Ooka_Chokka
a lesser mummy
a lesser mummy
Posts: 63
Joined: Fri Nov 08, 2002 12:27 am

Post by Ooka_Chokka » Sun Oct 26, 2003 12:40 am

bleh, good point

David Bosse
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon May 22, 2006 12:17 am

Trinary Logic

Post by David Bosse » Mon May 22, 2006 12:39 am

Recently I was pondering binary logic while at a meeting. Obviously not paying full attention to the speaker. I thought of the trinary value of each bit and realized the power of the system. A quad logic level, I feel would be unstable, though incredibly powerful. I began to reason hardware designs to support such a system and have a few ideas. I decided to see how big the world of trinary logic advances had already become and ran accross your website. I would love to be involved. Though I am a simple maintenance man, perhaps I could assist in the development of the next generation of machines.

Question: Why do you assume in the "OR" Logic that <i or true> = true?
Wouldn't it absolutely be <i or true> = i because we do not know what the value of <i> is?
Also, I believe the hardware needs to be created for this logic to operate in a (vertical) definition, or perhaps it can be created in a (horizontal) or Parallel definition providing existing information paths are used as "binary carry over", thus allowing the use of binary hardware to do trinary calculations. As you all already have provided means for this. I am interested if you all do not mind a little simplistic curiosity.
Just Curious,
Mr. Bosse

David Bosse
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon May 22, 2006 12:17 am

Post by David Bosse » Mon May 22, 2006 12:42 am

Forget the i or true = i
It's late and I am exhausted. It is absolutely true.
Sorry.
Just Curious,
Mr. Bosse