# Designing the logic

A project log for Base 3 -Ternary Computer from scratch.

Yes - No - Maybe? The goal is to completely step away from the normal binary system and investigate alternative computing systems.

Since the parts are on order I decided to sit down and further hash out the logic.  I had a rough idea on what I wanted to do (and ordered components to reflect the rough idea) but no definite plan.   I took a few pictures of my notebook to show my thought process.  :)

The best place to start is often at the beginning.  I know binary logic and decided to start there.  Below are a couple rough sketches and logic tables for a basic binary system.  By using NAND and/or NOR gates in a binary setup you can construct any logic element that you want.

After some brainstorming I came up with a few rough ideas.  I have considered both a 0/1/2 system and a balanced -/0/+ system.  The later seemed easier to implement.  I began with an idea of first using fets to get the job done.  Using them I could easily control the voltage.  It was late and I know I made mistakes on these, but I find it best to always write down ideas no matter how silly or wrong they are.  Later when I look at them they may spark a correct solution.  It has payed off more than once :)

As you can probably see, I had no idea what I was really going for.  So I went to sleep and had some nice dreams about riding my bike through the wonderful mountains of Alaska ^^;;

The above picture was taken by me while I went for a bike ride through Anchorage.  It was a beautiful day.

I woke up the next morning with an idea, which I sketched down.  I title all my ideas "random thought" when I am just scribbling.  I am sure as this project goes you will notice my other strange habits while designing something. :)

You can probably see the errors in this, if not YAY!

My goal was still in place.  Design a NAND and a NOR gate to get the job done and figure out the basic logic.  After dinner, I sat down again with my pencil and notebook.  This was the result.

I hope this log of last nights dream and today's journey did not bore ya too much.   I know I could use a circuit design program to do all this, but I still prefer to attempt to figure out the logic in my head.  It's a great exercise for the brain, even if I do make mistakes and sometimes use incorrect notation. :)  I am also toying with the idea of using an S-100 style bus for the build itself.  That would allow me to change out modules and possibly extend the system when it is done.  Now if the parts I ordered would just arrive I could test this to make sure it will work in the real world  ^^;;

~Cheers!

ThunderSqueak

## Discussions

shlonkin wrote 05/11/2014 at 13:23 point
I wish I were that organized in my planning.
I've been thinking about this project all day. I don't want to sound discouraging, so ignore this if you want.
You are trying to duplicate basic binary logic gates in ternary, but I don't know why. AND, OR and NOT operators are inherently binary. They all depend on the idea that 1 and 0 are compliments, but when there are three states the idea of a compliment is meaningless. The basic operators that make sense for ternary, at least in my mind, are arithmetic: ADD, INCREMENT and their variants SUBTRACT and DECREMENT. There may be other useful ones, too.
What do you think?

Are you sure? yes | no

ThunderSqueak wrote 05/13/2014 at 07:17 point
oh, I know. I was just playing around with different designs to see what I could come up with. I know when it comes to adding and subtracting I will need to most likely come up with something a bit different to get the job done. That being said, until I get some of the building blocks I ordered I am sort of at a standstill. Current simulation tools often don't work like the real world when you start to use components in ways "not intended by the manufacturer".

I have an idea to get a proper adder going, and am thinking about the opposite. I want to use as few parts as possible ^^. By duplicating some of the logic gates, which obviously don't operate like the binary counterparts I am getting practice in thinking in ternary :) For the adder you just have to keep tabs and extract the remainder to send down the carry line to the next add. I am trying to use the balanced system as it is pretty easy to manipulate it and detect those manipulations using current technology ^^

for a proper truth table for addition, it should probably look something like

A B out
0 0 0
0 1 1
0 2 2
1 0 1
1 1 2
1 2 2
2 0 2
2 1 2
2 2 2

Then I will also need a circuit to detect the carry out with something like this as its truth table

A B out
0 0 0
0 1 0
0 2 0
1 0 0
1 1 0
1 2 1
2 0 0
2 1 1
2 2 2

But then the above numbers may be wrong as well, it is late here and I will look at it a bit more tomorrow :)

Glad to see someone else has taken an interest in this project of mine :)

Are you sure? yes | no