Binary Subtraction (Adding Signed Binary Numbers)

Binary Subtraction (Adding Signed Binary Numbers)

Binary subtraction is done by transforming the subtraction operation into the addition of signed numbers (positive and negative). A signed number is prefixed with a sign bit and generated by calculating the 2's complement of the original number. If the addition generates an overflow, then this is ignored. If the result is positive then the value can be converted directly to decimal, otherwise it must be 2's complement to be read.