CSC258H1 Lecture : jan23ce.docx
Document Summary
Subtractors: subtractors are an extension of adders. Basically, perform addition on a negative number: negative binary numbers, 2 versions. Unsigned = a separate bit exists for the sign. Data bits store the positive version of the number. Signed = all bits used to store a two"s complement negative : two"s complement. Given number x with n bits, take (2n-1)-x. Result: negates each individual bit (a bitwise not op. ) Two"s complement = (1"s complement + 1) Note: adding a 2"s complement number to the original number produces a result of zero: unsigned subtraction. Get the two"s complement of the subtrahend (term being subtracted, i. e. usually the smaller value) Ex. an 8-bit binary number, there at 256 possible values that can be stored. 127 positive values (00000001 to 01111111: subtraction circuit. Note: sub(xor)y inverts y if sub is high, else y unchanged.