# out Classic List Threaded 3 messages Open this post in threaded view
|

## out

 Can someone explain how this last bit determine ng precisely? I was told ng is 1 if it's negative and o if it's positive or 0. But where does it says that negative is 1? It kind of counter my logic since -1 is less than 0 and since 0 is false (0) then negative should be false. But instead I was told negative is true? Please help me untangle this confused mind! Also, how is otherwise (positive or 0) false if we're directly feeding ng from pin 15?
 any bit can either be on (1) or off (0). determining what those values mean is entirely up to the hardware designer. The designer of the HACK ALU decided that if out is set (1), then that means the entire value of out is a negative value. If that bit is not set (0), then we have a positive value. But, in this case, it all stems from how to represent a negative number in binary. Because binary numbers have no concept of negative numbers by themselves, so it was decided that if the most significant bit is set, then we have a negative number. for example: ```0100 4 0011 3 0010 2 0001 1 0000 0 1111 -1 1110 -2 1101 -3 1100 -4 ^ |--- sign bit ```So for this four-bit example, we can only count from 7 to -8 (because we have to reserve the 4th bit for the sign bit)