![](http://www.nedopc.org/nedopc/image/nedobanner3.gif) |
nedoPC.orgElectronics hobbyists community established in 2002 |
![](http://www.nedopc.org/nedopc/image/nedobanner4.gif) |
RISC-V и реализация функций работы с тритами
Author |
Message |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
TODO Emulator-Setun-1958-Assembler ver.0.10
### 3.7. Операции над троичными числами TRS_t
``` TRS_t tests(...) : a0=0xAAAA, a1=0xBBBB; clean_trs(a0,a1)->0 0 ts1=0x1, ts0=0x1,pos=0; get_trit(ts1,ts0,pos)->1 ts1=0x0, ts0=0x1,pos=0; get_trit(ts1,ts0,pos)->-1 ts1=0x0, ts0=0x0,pos=0; get_trit(ts1,ts0,pos)->0 ts1=0x4, ts0=0x4,pos=2; get_trit(ts1,ts0,pos)->1 ts1=0x0, ts0=0x4,pos=2; get_trit(ts1,ts0,pos)->-1 ts1=0x0, ts0=0x0,pos=2; get_trit(ts1,ts0,pos)->0 ts1=0x0000, ts0=0x0000, pos=5, val=-1; set_trit(ts1,ts0,pos,val)->32 0 ts1=0x0000, ts0=0x0000, pos=5, val=0; set_trit(ts1,ts0,pos,val)->0 0 ts1=0x0000, ts0=0x0000, pos=5, val=+1; set_trit(ts1,ts0,pos,val)->32 32 ts1=0x0080, ts0=0x0080, shift=+2; shift_trs_t11(ts1,ts0, shift)->128 128 ts1=0x0080, ts0=0x0080, shift=-3; shift_trs_t11(ts1,ts0, shift)->16 16 ```
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
09 Mar 2024 08:56 |
|
![](./styles/getaway/theme/images/spacer.gif) |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
![Reply with quote Reply with quote](./styles/getaway/imageset/en/icon_post_quote.gif)
TODO Emulator-Setun-1958-Assembler ver.0.11
### 3.7. Операции над троичными числами TRS_t
``` TRS_t tests(...) : a0=0xAAAA, a1=0xBBBB; clean_trs(a0,a1)->0 0 ts1=0x1, ts0=0x1,pos=0; get_trit(ts1,ts0,pos)->1 ts1=0x0, ts0=0x1,pos=0; get_trit(ts1,ts0,pos)->-1 ts1=0x0, ts0=0x0,pos=0; get_trit(ts1,ts0,pos)->0 ts1=0x4, ts0=0x4,pos=2; get_trit(ts1,ts0,pos)->1 ts1=0x0, ts0=0x4,pos=2; get_trit(ts1,ts0,pos)->-1 ts1=0x0, ts0=0x0,pos=2; get_trit(ts1,ts0,pos)->0 ts1=0x0000, ts0=0x0000, pos=5, val=-1; set_trit(ts1,ts0,pos,val)->32 0 ts1=0x0000, ts0=0x0000, pos=5, val=0; set_trit(ts1,ts0,pos,val)->0 0 ts1=0x0000, ts0=0x0000, pos=5, val=+1; set_trit(ts1,ts0,pos,val)->32 32 ts1=0x0080, ts0=0x0080, shift=+2; shift_trs(ts1,ts0, shift)->128 128 ts1=0x0080, ts0=0x0080, shift=-3; shift_trs(ts1,ts0, shift)->16 16 ts1=0x0100, ts0=0x0100, pos1=8,pos2=4; slice_trs ($ts1,$ts0,$pos1,$pos2)->16 16 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x00FF, tryte2.0=0xFFFF; and_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x0000, tryte2.0=0x0000; and_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x00FF, tryte2.0=0xFFFF; or_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x0000, tryte2.0=0x0000; or_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x00FF, tryte2.0=0xFFFF; xor_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 0 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x0000, tryte2.0=0x0000; xor_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 0 ```
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
09 Mar 2024 13:06 |
|
![](./styles/getaway/theme/images/spacer.gif) |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
![Reply with quote Reply with quote](./styles/getaway/imageset/en/icon_post_quote.gif)
Re: RISC-V и реализация функций работы с тритами TODO Emulator-Setun-1958-Assembler ver.0.12### 3.7. Операции над троичными числами TRS_t ``` TRS_t tests(...) : a0=0xAAAA, a1=0xBBBB; clean_trs(a0,a1)->0 0 ts1=0x1, ts0=0x1,pos=0; get_trit(ts1,ts0,pos)->1 ts1=0x0, ts0=0x1,pos=0; get_trit(ts1,ts0,pos)->-1 ts1=0x0, ts0=0x0,pos=0; get_trit(ts1,ts0,pos)->0 ts1=0x4, ts0=0x4,pos=2; get_trit(ts1,ts0,pos)->1 ts1=0x0, ts0=0x4,pos=2; get_trit(ts1,ts0,pos)->-1 ts1=0x0, ts0=0x0,pos=2; get_trit(ts1,ts0,pos)->0 ts1=0x0000, ts0=0x0000, pos=5, val=-1; set_trit(ts1,ts0,pos,val)->32 0 ts1=0x0000, ts0=0x0000, pos=5, val=0; set_trit(ts1,ts0,pos,val)->0 0 ts1=0x0000, ts0=0x0000, pos=5, val=+1; set_trit(ts1,ts0,pos,val)->32 32 ts1=0x0080, ts0=0x0080, shift=+2; shift_trs(ts1,ts0, shift)->128 128 ts1=0x0080, ts0=0x0080, shift=-3; shift_trs(ts1,ts0, shift)->16 16 ts1=0x0100, ts0=0x0100, pos1=8,pos2=4; slice_trs ($ts1,$ts0,$pos1,$pos2)->16 16 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x00FF, tryte2.0=0xFFFF; and_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x0000, tryte2.0=0x0000; and_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x00FF, tryte2.0=0xFFFF; or_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x0000, tryte2.0=0x0000; or_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 32 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x00FF, tryte2.0=0xFFFF; xor_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 0 tryte1.1=0xFF00, tryte1.0=0xFFFF, tryte2.1=0x0000, tryte2.0=0x0000; xor_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->32 0 tryte1.1=0x0000, tryte1.0=0x00FF; not_trs ($tryte1_1,$tryte1_0)->255 -1 tryte1.1=0x0001, tryte1.0=0x0001, tryte2.1=0x0001, tryte2.0=0x0001; add_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->3 2 tryte1.1=0x0000, tryte1.0=0x0001, tryte2.1=0x0000, tryte2.0=0x0001; add_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->1 1 tryte1.1=0x0002, tryte1.0=0x0002, tryte2.1=0x0001, tryte2.0=0x0001; sub_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->3 0 tryte1.1=0x0000, tryte1.0=0x0001, tryte2.1=0x0000, tryte2.0=0x0001; sub_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->0 0 tryte1.1=0x0000, tryte1.0=0x0001, tryte2.1=0x0000, tryte2.0=0x0001; sub_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->1 1 tryte1.1=0x0000, tryte1.0=0x0001, tryte2.1=0x0000, tryte2.0=0x0001; sub_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->1 0 ```
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
10 Mar 2024 03:51 |
|
![](./styles/getaway/theme/images/spacer.gif) |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
Эмулятор троичной машины 'СЕТУНЬ' SETUN-1958 VM на языке Assembler Ссылка: https://github.com/askfind/Emulator-Set ... embler.gitEmulator-Setun-1958-Assembler ver.0.13TEST Ok' Макросы работы с полем тритов: TRITS-32 = [t31...t0] - обозначение позиции тритов в числе Операции с тритами:and_t or_t xor_t not_t sum_half_t sum_t
Операции с трайтами:get_trit set_trit shift_trs slice_trs and_trs or_trs xor_trs not_trs add_trs sub_trs inc_trs dec_trs
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
10 Mar 2024 08:02 |
|
![](./styles/getaway/theme/images/spacer.gif) |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
![Reply with quote Reply with quote](./styles/getaway/imageset/en/icon_post_quote.gif)
Re: RISC-V и реализация функций работы с тритами TODO Emulator-Setun-1958-Assembler ver.0.14 Вывод троичного числа в тестах.![](images/spacer.gif) | ![](images/spacer.gif) | ![](images/spacer.gif) | ![](images/spacer.gif) | Code: tryte1.1=0x0001, tryte1.0=0x0001, tryte2.1=0x0001, tryte2.0=0x0001; add_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->trs : [000000000000000000000000000000+-] tryte1.1=0x0000, tryte1.0=0x0001, tryte2.1=0x0000, tryte2.0=0x0001; add_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->trs : [000000000000000000000000000000-+] tryte1.1=0x0002, tryte1.0=0x0002, tryte2.1=0x0001, tryte2.0=0x0001; sub_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->trs : [000000000000000000000000000000--] tryte1.1=0x0000, tryte1.0=0x0001, tryte2.1=0x0000, tryte2.0=0x0001; sub_trs ($tryte1_1,$tryte1_0,$tryte2_1,$tryte2_0)->trs : [00000000000000000000000000000000] tryte1.1=0x0004, tryte1.0=0x0004; inc_trs ($tryte1_1,$tryte1_0)->trs : [00000000000000000000000000000-0+] tryte1.1=0x0004, tryte1.0=0x0004; dec_trs ($tryte1_1,$tryte1_0)->trs : [00000000000000000000000000000-0-] SETUN_trs tests(...) : | ![](images/spacer.gif) | ![](images/spacer.gif) | ![](images/spacer.gif) | ![](images/spacer.gif) |
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
10 Mar 2024 13:04 |
|
![](./styles/getaway/theme/images/spacer.gif) |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
Re: RISC-V и реализация функций работы с тритами TODO Emulator-Setun-1958-Assembler ver.0.15
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
10 Mar 2024 14:19 |
|
![](./styles/getaway/theme/images/spacer.gif) |
askfind
Doomed
Joined: 04 Jan 2016 09:15 Posts: 662 Location: Russia, S.- Peterburg
|
ОНЛАЙН ТРАНСЛЯЦИЯ в группе Telegram "SETUN" Доклад на тему: "Троичные операции на ассемблере для архитектуре RISC-V. Эмуляция троичной машины "СЕТУНЬ". Место: г.С-Петербург, Failover Bar (4-ая Советская, д. 7) Дата: 6 апреля 2024 года.Время: 17-00 мск.Докладчик: Владимир Васильев.Приглашение от мобильных разработчиков: Ссылка: Канал с анонсами — https://t.me/mobile_broadcast_newsПо вопросам сообщества: @packovv, @CLTanuki
_________________ "Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
|
01 Apr 2024 11:38 |
|
|
Who is online |
Users browsing this forum: No registered users and 9 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
|
|