cholland89 wrote
0100000000000000 (16,384)+
0100000000000000 (16,384)
----------------
1000000000000000 (32,768)
cholland89 wrote
I'll await the sections on software to see if HACK allows the use of unsigned ints.
The Hack computer and its software are designed around signed integers; there is no provision for unsigned integers in the Virtual Machine nor in the Jack language.
The supplied tests carefully avoid signed integer overflows, which can be quite tricky to handle in software.
You have shown that something as simple as
x=abs(
y) can cause an overflow if
y=-32768.
--Mark