The hardware stores no sign. One compare sets four flags, and the next instruction chooses which of them to read. This page makes that choice visible for any pair of bytes you pick or tap.
What it covers¶
Who decides. Not the register and not the adder: the ALU serves both readings at once, and the instruction that follows a
CMPpicks one. Instruction sets come in pairs for exactly this reason.One compare, every branch.
CMP A, Bfor your pair, ending inBEQ, then every ARM conditional branch in two tables, unsigned and signed: what it means, which flags it tests, whether it is taken, and whether that agrees with the arithmetic. A “show the working” button draws the subtraction in bits.The same thing as a program. One
if (a < b)in C beside the ARM a compiler turns it into, with auint8_t/int8_ttoggle. The declaration changes the load and the branch; the lines that run are highlighted and a four-step trace follows the flags.What the loads do to the bits. A summary, handing on to From Bytes to Registers.
Next¶
From Bytes to Registers, then the flag drills.