Exercise 2: Add and subtract in 2's Complement We suppose we have 8 bits registers and signed numbers in the 2s complement system. Compute the following: 1. $+8_{10} - 2_{10} = ( )_2$ 2. $-8_{10} + 2_{10} = ( )_2$ 3. $-12_{10} - 11_{10} = ( )_2$ 4. $AF2_H + C0E3_H = ( )_H$
Added by Cheryl L.
Close
Step 1
+8 - 2: To subtract 2 from 8, we can convert both numbers to their 2's complement representation and then add them together. +8 in 2's complement: 0000 1000 -2 in 2's complement: 1111 1110 Now, let's add them together: 0000 1000 + 1111 1110 ------------ 0000 Show more…
Show all steps
Your feedback will help us improve your experience
Derrick Danso and 54 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Perform subtraction on the given unsigned numbers using 2's complement of the subtrahend. Where the result is negative, find its 2's complement and affix a minus sign. a) 10011 - 10010 b) 101000 - 10101 Show your steps.
Akash M.
(a) Determine the 2's complement of each subtrahend and (b) use the 2's complement to solve each of the following subtraction exercises 101110102-11010112 (a) Determine the 2' s complement of each subtrahend and (b) use the 2's complement to solve each of the following subtraction exercises 1011.0112-1001.1012
Madhur L.
Compute the two's complement of the 8-bit signed integer (-253). Please write the steps and write the answer in decimal, binary, and corresponding powers of two (1*2^7 + bla bla..).
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD