In computers, subtraction is generally carried out by
2’s complement
Computers commonly subtract using two’s complement: invert the subtrahend’s bits, add 1, then add it to the minuend in the fixed word width. Discard the carry beyond that width.
\(A-B\equiv A+\overline{B}+1\pmod{2^w}.\)
What is the full form of EBCDIC?
The 2's complement representation of the number (-100)10 in an 8 bit computer is
Consider the values A = 2.0 × 1030, B = -2.0 × 1030 C = 1.0. Assume, that the floating point numbers are represented with 32 bits. What are the values of X and Y, when the following sequence of operations are executed on a computer?
X = A + B
Y = A + C
X = X + C
Y = Y + B