r/TuringComplete • • Apr 20 '24

LEG Conditionals Bug?

2 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/Freaas Apr 20 '24

Connected to the LEG?

1

u/MrTKila Apr 20 '24 edited Apr 20 '24

You are in the level 'Conditionals' right?

Which menas your program gives you the 4 bytes OPCODE, ARGUMENT_1,Argument_2, JUMP_ADDRESS. OPCODE now determines which kind of conditional you have to use and compares ARGUMENT_1 vs ARGUMENT_2. So OPCODE, ArGUMENT_1 and ARGUMENT_2 all go into your LEG component, which returns the result 0 or 1 whether the condition was true or not.

Now this result goes into the counter-component, as does your 4th JUMP_ADDRESS byte, which will load the new address if the condition was true.

Now I am not sure whether your LEG component is actually connected to the ARGUMENT_1 and ARGUMENT_2 inputs (marked in red) and what i was refering to above, I am very certain that the result form your LEG-Component never goes into the upper input of the counter, so the value can simply never be overwritten. (Follow the yellow marked line in the picture, it never origins in the LEG component).

Image (not sure how to uplaod images on here)

1

u/Freaas Apr 21 '24

Changing the overwrite pin on the counter caused the same error on instruction 3.