Perform the following decimal subtraction problems using binary numbers in a 4-bit word. Use 2's complement notation to convert the subtraction problem into an equivalent addition problem. Then carry out the binary addition. Show your work and your carry bits as in the previous examples. Indicate when an overflow occurs.
From +2 subtract + 2
The subtraction problem is: +2 โ (+2)
The equivalent addition problem is: +2 + (-2)
First find the 2's complement of +2. This will be the representation ofโ 2.
Start with +2: 0010
Flip the bits: 1101
Add one to get โ2: 1110
Add 0010 (+ 2) and 1110 (-2) to get 0000 (0)
Carry bit: 1 1 1 0
First number: 1 1 1 0 (โ 2)
Second number: 0 0 1 0 (+ 2)
Result: * 0 0 0 0 (+ 0) * The final carry is discarded
You might also like to view...
Shielded twisted-pair cable is an example of a Faraday cage
Indicate whether the statement is true or false
What access control system lets owners decide who has access to the objects they own?
A. Role-based access control B. Task-based access control C. Discretionary access control D. Rule-based access control