|
nedoPC.orgElectronics hobbyists community established in 2002 |
|
Author |
Message |
hemuman
|
Hello All,
I have just started over the ternary Computers(TCs), and by my understanding of the market, i can say that its tough to have a actual working model of TCs, what I wish is , if we really have to make it popular we should come up with some kind of Virtual Machines for TCs i.e. a TVM, So that people can actually work on them, much like JVM.
Please post your views.
|
01 Aug 2008 09:34 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
Well, that is sort of what I'm trying to do with Tunguska. It's not a quite a virtual machine, in the java sense; it emulates a complete ternary computer.
The main problem with doing what you propose is speed. Regular binary virtual machines can rely heavily on native instructions (through JIT or whatever) to gain some sort of semblance of speed, but ternary virtual machines must emulate everything.
|
01 Aug 2008 10:19 |
|
|
Shaos
Admin
Joined: 08 Jan 2003 23:22 Posts: 22821 Location: Silicon Valley
|
Do you plan to have support for graphics, windows, networks in your "TVM"?
P.S. I removed duplicate post from "Ternary Hardware" section
|
01 Aug 2008 16:16 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
Yes, you're absolutely right. I'm working on prototype of such a virtual machine. Thought my vision slightly different from yours, I myself want to have something like configurable platform, that allow me define many things, such as amount of memory, how many radixes should contain registers and memory values, have number and type of instructions, how should machine perform arithmetics operations (fixed set or radixes, or variable), etc. From user's point of view the machine looks very much like VirtualBox, that also have low level programming tools (editor, compiler, debugger, memory inspector, profiler) and tools to inport binary data to balanced ternary one and of course to export it.
|
01 Aug 2008 22:31 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
Interesting idea. I think there should be some sort of standardized way of describing any given virtual machine.
What would be really awesome if we could use XML to do it, and have the virtual machine parse it and automatically build itself.
You could probably also implement functionality hooks (say you want your virtual machine to be more of an emulator, like Tunguska) in some lightweight interpreted language, like lua or python.
I think, with some careful design work, it could actually work. Since you can describe pretty much any grammar with a tree structure, you might even be able to describe opcode functionality with it, which would be immensely powerful. You could specify an entire system architecture with nothing but a few hundred lines of easily readable XML code.
Here's an example of what I'm thinking
|
02 Aug 2008 19:56 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
I will think about using XML in configuration file, it looks exactly what I need
|
02 Aug 2008 22:30 |
|
|
hemuman
|
Hello All,
I have just come up with ternary representation of "Trits" and "Trytes" much like a byte but here in 1 Tryte we have 6 Trits. i.e. 729 values(3^6=729).(WKT 1Byte has 8Bits i.e. 2^8)
I will post the link in a day or two once formatting is done.
If any one has specific file format for the data please let me know.
Thanks,
Manoj
|
04 Aug 2008 03:53 |
|
|
hemuman
|
@ Shaos
I have just started working on the representation of data for "TVM". Once its complete i will start working on Interpreters.
|
04 Aug 2008 03:59 |
|
|
hemuman
|
@Mbr
Hi
I will be taking care of following:
"how should machine perform arithmetics operations (fixed set or radixes, or variable), etc. From user's point of view the machine looks very much like VirtualBox, that also have low level programming tools (editor, compiler, debugger, memory inspector, profiler) and tools to inport binary data to balanced ternary one and of course to export it."
Thanks,
|
04 Aug 2008 05:50 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
That's what I'm using in Tunguska. I'm storing it in a plain array of signed shorts (that is, 16 bits per tryte), and compressing it with zlib (which saves a lot of space effective). It isn't very space effective once in the host memory, but it's a lot faster than using bit twiddling to store it more effectively.
|
04 Aug 2008 09:54 |
|
|
hemuman
|
That sounds great so I think we have done good amount of homework.
My main intention here is first to come up with a fair architecture, so I am just trying to prepare some standard requirements.
If you can share the representation or help me in preparing a logical representation, it will be great.
Following are the locations for the "Tryte representation"
(Pls try after Aug 5)
http://manojky.net/
or direct link:
http://manojky.net/terPrj/TernaryWithCharC.xml
http://manojky.net/terPrj/TernaryWithCharC.htm
http://manojky.net/terPrj/TernaryCode.htm
Thanks,
|
04 Aug 2008 11:56 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
I've been representing ternary data with F, U and T; or N 0 and P. So -1,0,1,1 may be written either FUTT or N0PP.
I've also been using balanced nonary for quick represntation of 6-trit wide trytes, where {D, C, B, A, 0, 1, 2, 3, 4} represent {-4, -3, -2, -1, 0, 1, 2, 3, 4}. So, D1B balanced nonary represents -4 * 81 + 9 - 2 = -317 decimal.
|
04 Aug 2008 14:24 |
|
|
hemuman
|
|
05 Aug 2008 02:00 |
|
|
hemuman
|
Hi,
That's cool, then
How are you doing the addition and subtraction of the trytes ?
b'cause thats where i am stuck now.
Thanks,
Manoj
|
05 Aug 2008 02:27 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
I use the host ALU to do arithmetics in tunguska (that is, convert to int, add, convert to tryte). Mostly because it's something like 30 times faster than using an addition algorithm.
I think I used to do it manually in a really old version. It's not that hard to implement, I think what probably is causing your problems is how negative modulo is handled. (See the wikipedia article on the modulo operation)
|
05 Aug 2008 04:02 |
|
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|