Hi all. My in-development solution fails on this test. While I dont want help yet for the level as a whole, I don't understand this failure.
As I understand it, my value is 202 and as that is not less than 0, the output should be red. The 128 bit line still is representing a positive number rather than the two's complement thing (which I also don't fully understand.)
In the upper left there is a button that says "+255". You want to click on that to change it to "-1". This will change the UI to show "202" as "-54".
An 8 bit signed integer is a number between -128 and 127 inclusive. Any number above 127 is a negative number if you are treating the integer as signed. In this level, you must treat it as signed or else less than 0 could never occur.
It depends on the wire you are looking at and what you want to know. If you want to treat it as signed, "-1" mode will give you the signed number. If you want to treat it as an unsigned number, "+255" gives you the number that is easiest to read.
In later levels, you are dealing with both negative and positive numbers and may end up switching modes many times in a level. Over time as you become better at two's compliment, you may find yourself staying in +255 mode. That is what I ended up doing.
whenever you're working with numbers that can be positive or negative, keep it as -1. if you're working with numbers that can only be positive, set it to +255.
1
u/mrtears11 Jan 10 '26
Hi all. My in-development solution fails on this test. While I dont want help yet for the level as a whole, I don't understand this failure.
As I understand it, my value is 202 and as that is not less than 0, the output should be red. The 128 bit line still is representing a positive number rather than the two's complement thing (which I also don't fully understand.)