From 22fd42dcfe13c82ac0dd5e3fb5c4172776b31b33 Mon Sep 17 00:00:00 2001 From: starcells Date: Fri, 12 Jun 2026 21:08:08 +0800 Subject: [PATCH] Full Adder!!! --- .gitignore | 1 + tapes/full_adder.rot8 | 1 + tapes/or.rot8 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 tapes/full_adder.rot8 diff --git a/.gitignore b/.gitignore index 109e128..800254c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build/ .cache/ .continue/ .vscode/ +tapes/test.rot8 diff --git a/tapes/full_adder.rot8 b/tapes/full_adder.rot8 new file mode 100644 index 0000000..c9b03e5 --- /dev/null +++ b/tapes/full_adder.rot8 @@ -0,0 +1 @@ +-+-++-+-+-+-++>>-+-+-++-++++>>->[-]>>>[-]<<<<[->->>>-<<<<]>>>>[-<<<<->>>>]<<<<>>>>[-]<<<[>>>-<<<-]<<<<<>[-]>>>>[-]<<<<<[->->>>>-<<<<<]>>>>>[-<<<<<->>>>>]<<<<<>>>[-]>>[-]<<<[->->>-<<<]>>>[-<<<->>>]<<<>>>>>>><<<[-]<[-][-]<<<<[>>>>-<<<<[-]]>>[>>-<<[-]]>>>>>>[-]<<<[-]>>[->-<<<->>]<<[->>-<<]>><<[-]>>>[<<<<[>[-]-<[-]]>>>>[-]]<<<<<<<<<>[-]>>>>>>>>[-]<<<<<<<<<[->->>>>>>>>-<<<<<<<<<]>>>>>>>>>[-<<<<<<<<<->>>>>>>>>]<<<<<<<<<>>>[-]>>>>>>[-]<<<<<<<[->->>>>>>-<<<<<<<]>>>>>>>[-<<<<<<<->>>>>>>]<<<<<<<>>>>>>>[-]<<<<<<<<[>>[>>>>>>[-]-<<<<<<[-]]<<[-]]>>>>[-]>>>>[<<<<->>>>-]<<<[<[-]->-]<<<<<<>[-]>>>>>[-]<<<<<<[->->>>>>-<<<<<<]>>>>>>[-<<<<<<->>>>>>]<<<<<<>>>[-]>>>[-]<<<<[->->>>-<<<<]>>>>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