Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
> The overflow flag is thus set when the most significant bit (here considered the sign bit) is changed by adding two numbers with the same sign (or subtracting two numbers with opposite signs).
so, you mixed up overflow for subtraction and overflow for addition.
Conditional jumps work perfectly for all cases except B = -128.
It doesn't remain the same because behavior with -128 is not the same: -(-128) equals -128 in binary (you can even see that in your own screenshot, compare number before and after NEG)
0 + (-128) = -128 (no overflow)
0 - (-128) = 128 in math, -128 in 8bit math (overflow)
You're using 1s compliment instead of 2s compliment. whack an "on" gate (or constant 1) on the carry in of the adder in your design and it stops saying 0 is less than -128
I'm using NEG (2's complement) rather than NOT (1's complement).
I'll try SunCat's suggestion later.