Since when is 4 > 14?!

Maybe the easiest way to do this is just by converting the binary inputs to decimal numbers, add them, then convert it into a binary output. That way, there's no complication from the variables and 1-bit adders, and it's just using the basic pre-made addition reporters in the block palette.

I mean, it'd be easier to understand. (Probably not to code, though.)

All it'd be is this:
report (binary convert 4-bit (decimal convert 4-bit (binary input 1) (aka a list of boolean to binary conversions)) + (decimal convert 4-bit (binary input 2)))

That does seem simpler, right? It definitely has to be less blocks than originally.

I think that'd be considered cheating. The whole object of the exercise is for you to understand how binary works, not for you to just do what you already know. Anyway, your DECIMAL CONVERT has the same problem as the rest of the program, so you'd still need to understand what you're doing wrong.

I actually forgot to mention this, but I changed the decimal convert to a "full check" boolean function that checks if the output of all of the inputs will be greater than 14, and will report true if it is.

By the way, where did the 14 come from? 1111 binary is fifteen.

Yes, and 15 is greater than 14. That's what I check in the script.

My point is, 15 isn't an error.

then ill change it to >15

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.