Question

In: Computer Science

x=61,y=73 compute x+y and x-y in8-bit 2's complement system, then convert the answer to decimal

x=61,y=73 compute x+y and x-y in8-bit 2's complement system, then convert the answer to decimal

Solutions

Expert Solution

2's Compliment addition and subtraction:

1) Convert the given numbers to 8 bit binary values.

2) Convert those binary numbers to 2's complimant.

          -->First we have to convert the number to 1's compliment. To find the 1's compliment we have to make all the zeroes as 1's and all the 1's as 0's.

           -->Then add 1 to the the obtained binary number. That becomes the 2's compliment.

we have to note that 2's compliment is used to represent the negative numbers.

3) Now addition and subtraction of the numbers will done using the above results.

The values of addition of numbers as follows.

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0 here we get the carry as 1 and we have to add that carry to left counted values.

we also have know that 1 + 1 + 1 = 1 and here the carry is 1. We use this in some situations where we get a carry.

4) From the above values, we can add the binary numbers.

5) Now we have to convert the obtained to decimal numbers from binary.

              --> To convert from binary to decimal, we use place values of binary and adds them to get the relavant decimal number for the binary numbers.

6) Now we can cross check the result by adding the previous decimal values and the result that we got after the conversion from binary to decimal are same.

The above are the anwers for the question given and steps are noted there in the above answer in an order.

                     Hope the above is helpful. Please feel free to comment if any queries in the

                                 comment section. I will try to solve them as soon as possible.

                                            Do an up vote. Thank you...


Related Solutions

(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)
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030...
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030 b.404 c.5050 d.-5050 e.-20000 Show work with steps
Convert the following hexadecimal representations of 16-bit 2’s complement binary numbers to decimal. a.FCAD b.DEAD c.1111...
Convert the following hexadecimal representations of 16-bit 2’s complement binary numbers to decimal. a.FCAD b.DEAD c.1111 d.8000 e.FACE
1) Convert negative fractional decimal number to 8-bit binary number: – 16.625 (use 2's complement binary...
1) Convert negative fractional decimal number to 8-bit binary number: – 16.625 (use 2's complement binary format) Hint: –17 + 0.375 Given the hint above, the fractional number will be divided into two parts, - Whole number, - Fractional part, must be positive (2) Proof to check that your calculation above is correct
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT