Question

In: Computer Science

Identify the following numbers using 2’s complement by making suitable assumptions: a. 1710 + 610 b....

Identify the following numbers using 2’s complement by making suitable assumptions:
a. 1710 + 610
b. 2110 – 410
c. -1310 - 2010

Solutions

Expert Solution

Hello there, Hope you're doing fine. I hope you know that 2s complement is an alternative binary representation to make operations on binary numbers easier. Usually in the cases where a negative number is to be represented, 2s complement is introduced.

So, to convert a given number to 2s complement, you must first convert it to its 1s complement form and then add 1 to the least significant bit. Keep in mind that, to convert a number to 1s complement, you simply invert every individual bit in it.

Here, I am assuming the 10s on the end are actually subscripts to show they are Decimal numbers.

1. (17)10 + (6)10 (converting to binary[base 2]) -> 10001 + 110 = 10001 + 00110 = 10111 (converting to decimal[base 10]) -> 23.

Here, no 2s complement calculation was required as all numbers were positive.

2. (21)10 - (4)10 (converting to binary) -> 10101 + -(00100), since -4 is a negative number, here we require 2s complement calculation.

Thus, it become => 10101 + 11100

performing binary addition and discarding the end around carry since positive number (21) was the bigger number;

10101 + 11100 = 1 10001, discarding end around carry(MSB) as 21 is bigger, result = 10001 = (17)10

3. -(13)10 - (20)10 (converting to binary) -> -(1101)+-(10100) Here, both are negative, so the digits are balanced and their complements calculated.

-(001101) + -(010100) (2s complement calculation) -> 110011 + 101100

Now, simple addition is performed and the end around carry (MSB) is discarded, the final result's 2s complement be calculated and presented with a negative sign since both original numbers were negative.

110011 + 101100 = 1 011111

Discarding the end around carry, final result -> 011111

Converting to 2s complement, => 100001 (converting to decimal) -> (33)10

adding negative sign, -33

I hope this clears up your doubt. Have a Good day and happy learning.


Related Solutions

Compute the following operations using 8-bits 2’s complement encoded numbers: a. 127-47 b. 47-56 c. 19-120
Compute the following operations using 8-bits 2’s complement encoded numbers: a. 127-47 b. 47-56 c. 19-120
Add or subtract the following 2’s complement form signed numbers, then convert the entire problem to...
Add or subtract the following 2’s complement form signed numbers, then convert the entire problem to decimal and confirm: 110110 + 111000 001100 – 011100
7 – For the following operations: • write the operands as 4-bit 2's complement binary numbers,...
7 – For the following operations: • write the operands as 4-bit 2's complement binary numbers, • perform the operation shown, • show all work in binary operating on 4-bit numbers, and • identify overflow if necessary. a) 4 + 2 b) 4 – 2 c) 2 – 4 d) 4 + 4
Convert each of the following 5-digit 6’s complement base 7 numbers to 9-digit 4’s complement base...
Convert each of the following 5-digit 6’s complement base 7 numbers to 9-digit 4’s complement base 4. Be careful, show all your reasoning/arithmetic, and make no unwarranted assumptions! (a) 50135 (b) 11402
The standard method of representing negative numbers in the binary system is with 2's complement notation....
The standard method of representing negative numbers in the binary system is with 2's complement notation. What are the advantages and disadvantages of using this method to represent negative numbers?
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system....
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system. Make sure there are enough digits in the results to be able to perform arithmetic operations with these two numbers. (b) Perform in the signed 2’s complement system, (+70) + (-26) (c) Perform in the signed 2’s complement system, (-70) - (-26) (d) Perform in the signed 2’s complement system, (+70) + (+26)
Evaluate the following expressions, where two’s complement numbers, A is 11111110 and B is 00000010 and...
Evaluate the following expressions, where two’s complement numbers, A is 11111110 and B is 00000010 and indicate the results. a. A + B b. A – B c. B–A d. –B e. – (-A)
Digital arithmetic: a) Convert +35 to 2-complement b) Convert -35 to 2-complement c) Convert 2-complement from...
Digital arithmetic: a) Convert +35 to 2-complement b) Convert -35 to 2-complement c) Convert 2-complement from 1101 1101 to decimal d) Add 35 - 35 in binary
Please read carefully. Using the minimum number of digits in 2’s complement notation, perform 25 –...
Please read carefully. Using the minimum number of digits in 2’s complement notation, perform 25 – 18 (subtraction by preserving addition). Show all the significant steps in your work by indicating the starting values, sign conversion and the addition operation aligning all numbers including the carry values in each position using the Courier New font. Indicate the final value as a decimal.
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate...
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of (+31)+(-47), (-31)+(+47), and (-31)+(-47). Convert the answers back to decimal and verify that they are correct.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT