Jump to content
  • Advertisement
Sign in to follow this  
vaneger

wedded to binary or is trinary possible?

This topic is 3347 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is modern computer memory (RAM) limited to just working in binary data or could code be made to allow it to use trinary? From what I understand, RAM uses 0.5 volts as 0 and 1 volt as 1, could it be possible to use 0, 0.5 and 1 ? If so how would I do so ?

Share this post


Link to post
Share on other sites
Advertisement
Whoa there! What level are we taking about doing this on?

If you are asking whether you can mod your PC to work in trinary at the hardware level, then the answer is an unequivocal 'NO'.

If on the other hand you are a playing around with an FPGA attached to a RAM chip, or something similar, then I don't have an answer for you (need to ask an electrical engineer).

Share this post


Link to post
Share on other sites
Why stop at merely storing trinary? [grin]

Ram typically uses a range of values to represent logical 1 and 0, AFAIK*. I believe they leave a gap in the range to give a chance to detect memory corruption too. So for example, between 5V and 3V might be logical 1, and from 2V to 0V would be logic 0. Values between 3V and 2V indicate that the RAM is defective or corrupted somehow.

But given that trinary is simply a number system like decimal, you can encode the digits in binary and store them as usual in the RAM chips.

* This is likely ignorance and outdated assumptions from long forgotten computer architecture classes, forgive me.

Share this post


Link to post
Share on other sites
I was merely thinking that since 1 trit ~ 1.585 bits one could store trits over bits to reduce energy consumption.

Share this post


Link to post
Share on other sites
We use 2-state flip-flops and binary (rather than ternary, or otherwise) because boolean logic allows us to build systems of logic gates that perform the operations that are the foundation of computing.

Share this post


Link to post
Share on other sites
Quote:
Original post by PKLoki
Is there something you can store in base 3 that base 2 can't handle?


Yes, it's a problem commonly encountered in Enterprise-level software.

It's also very convenient for storing real-world result of coin flip in a single trit. (Heads, Tails, Edge).

Quote:
We use 2-state flip-flops and binary (rather than ternary, or otherwise) because boolean logic allows us to build systems of logic gates that perform the operations that are the foundation of computing.


I guess the original reason has to do with simpler hardware and higher noise tolerance. For example, +12/-12V is much easier to classify three distinct states. But I don't know if there's some other trick as to how trits should be realized in hardware.


Quote:
If so how would I do so ?

On conventional hardware, you'd use 2 bits to store a single trit. Perhaps 00, 01, 10, with 11 being undefined.

Quote:
From what I understand, RAM uses 0.5 volts as 0 and 1 volt as 1, could it be possible to use 0, 0.5 and 1 ?


I don't know what current generation of hardware uses, but we were taught that RAM uses flip-flops. So it's not stored just as trivially. Hence the original term "volatile" memory.

Share this post


Link to post
Share on other sites
Well binary logic gates can also be made from trinary units so that isn't really a reason to choose one over the other. It would seem it was just as engineering decision early on, but it also seems that a trinary computer would be possible today if the appropriate companies wanted to devote time to it.

Share this post


Link to post
Share on other sites
Quote:
Original post by vaneger
Well binary logic gates can also be made from trinary units so that isn't really a reason to choose one over the other. It would seem it was just as engineering decision early on, but it also seems that a trinary computer would be possible today if the appropriate companies wanted to devote time to it.


Key word there: binary logic gates. Unless I'm mistaken, in order for trinary storage to work you would need trinary logic gates, because a flip-flop is based on top of multiplexers which are based on top of logic gates. So, to have a trinary flip-flop you'd need a trinary multiplexer which means you'd need trinary logic gates.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!