Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: Re: To Trinary or not to Ternaryby l2kashe (Deacon) |
on Dec 05, 2003 at 19:46 UTC ( [id://312612]=note: print w/replies, xml ) | Need Help?? |
A friend and myself sat down and played with trying to create a trinary based system (hardware and software). On the hardware level it was nice, as it seemed to simplify a few things. We never did get to an actual OS implementation. I fought with the if/else structure, and still do. The simple if/else is a binary concept, and it was wrong to try and kludge it into a trinary system. We had to figure out a control structure that did the same thing, yet has 3 possible states. I just couldn't quite seem to get "out of the box" and figure out the right concept to implement. Consequently the project has been collecting dust for about a year now. The farthest I ever got was something along the lines of almost a multiple test structure, but its really just a renamed if/else, with a builtin elsif. Pseudocode below
Maybe some other monks have insight into how to really leverage this at the software level, but at this point I don't. Maybe if I had a CS degree and knew more of the fundamentals of computing I might have gotten further along. The hardware side though was really impressive. Play with the numbers. Take the possible values for a single byte, and instead of it being base 2 take it to base 3. use perl;
In Section
Seekers of Perl Wisdom
|
|