Python Ternary CPUs

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

Moderator: haqreu

User avatar
askfind
Devil
Posts: 798
Joined: 04 Jan 2016 09:15
Location: Russia, S.- Peterburg

Python Ternary CPUs

Post by askfind »

Ternary CPUs: how they work and how Python helps designing one

Description
0/1, False/True, off/on, etc.: the computers which we’re working on are based, from very long time, on the so called binary arithmetic/logic.

“Two states to rule them all": with these we built a complete ecosystem which goes from the hardware to the software… showing even this text that you’re reading now.

However the possibility to use the ternary logic instead, that started just a joke some years ago, generated recent papers and researches about it, with interesting features exploited and documented.

An FPGA project is in development to implement a “ternary CPU” and an ISA (Instruction Set Architecture) draft was roughly defined (and evolving).

But a CPU without code to execute is useless and here comes Python, which allows to quickly implement (and test) some simple, primitive assembler to generate executables ("ternaries”?), which can then be transferred to the FPGA board and run.

A basic emulator with a minimal set of instructions is implemented, in order to test the code even without the physical board.

This talk provides a short overview of the ternary logic, some challenges, and how the basic assembler and emulator are written, tested, and work.

Video link:
"Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)