FFUUTT-code

Balanced Ternary Numeral System - forum was moved from http://ternary.info

Moderator: haqreu

eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

FFUUTT-code

Post by eudoxie »

I will shortly be adding FFUUTT-coding to tunguska. I just want to share the convention with you guys, see if you have any feedback or so.

It is a numbering system for commutative bivalent ternary operations. You simply set up a truth table in the following order

Code: Select all

F F X5
F U X4 (= U F)
U U X3
U T X2 (= T U)
T T X1
T F X0 (= F T)
Where X5-X0 is the results of the operation, and then, to get the number of the operation, you simply treat them as a regular terary number.

N = 243*X5 + 81 * X4 + 27 * X3 + 9*X2 + 3*X1 + X0

So, AND would be given N = -322, XOR would be given N = 241, etc.
User avatar
Shaos
Admin
Posts: 24011
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: FFUUTT-code

Post by Shaos »

Actually ANY ternary operation may not be commutative, so true operation table should have 9 trits, not 6 - see my 3niti alpha instruction set for operation OPB ;)

But if your idea was to put most possible operations to 1 tryte it's OK to think of only commutative ones
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: FFUUTT-code

Post by eudoxie »

Shaos wrote: Actually ANY ternary operation may not be commutative, so true operation table should have 9 trits, not 6 - see my 3niti alpha instruction set for operation OPB ;)

But if your idea was to put most possible operations to 1 tryte it's OK to think of only commutative ones

The idea I had was to catalog the commutative operations, since non-commutative operations really don't make that much sense in a tritwise operator.

It is a subset of ternary operations that is more "usable" than non-commutative ones, not just because they're easier to understand, but they are a lot fewer than the just under 20,000 operations possible.
User avatar
Shaos
Admin
Posts: 24011
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: FFUUTT-code

Post by Shaos »

I will think about hardware implementation of your "FFUUTT-code" to see if it's really simpler than full 9-trit "any binary op"
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: FFUUTT-code

Post by eudoxie »

If you have cheap ternary OR and AND gates it should reduce pretty nicely. Since

in1 AND in2 is min(in1, in2)

and

in1 OR in2 is max(in1, in2)

You could use that fact (and commutativity) to reduce the problem pretty significantly.
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: FFUUTT-code

Post by eudoxie »

For convenience, I made a FFUUTT-code calculator here:

http://nedopc.org/ternary/tunguska/ffuutt.html
User avatar
Shaos
Admin
Posts: 24011
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: FFUUTT-code

Post by Shaos »

eudoxie wrote:For convenience, I made a FFUUTT-code calculator here:

http://nedopc.org/ternary/tunguska/ffuutt.html
I just put this file on our web-site to make it available
Я тут за главного - если что шлите мыло на me собака shaos точка net