Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

20. Assume numbers are represented in 8-bit twos complement representation. Conv

ID: 3877464 • Letter: 2

Question

20. Assume numbers are represented in 8-bit twos complement representation. Convert to binary and show the calculation. Also indicate if the operation results in a carry bit, and/or if it is a case of overflow. a. 6+13 b. -6+ 13 c. 6-13 d. 6-13 21. Find the following differences using twos complement arithmetic. Also indicate if the operation results in a carry bit, and/or if it is a case of overflow. a. 111000 b. 11001100 c. 111100001111 d. 11000011 - 11101000 - 110011 - 101110 - 110011110011 22. Perform the following operations of unsigned integers in Binary: 1001 (9) 1101/10110111 x 1011 (11)

Explanation / Answer

20.

for negative numbers 2's complement = 1's complemnt +1 , 1's complement is inverting the bits . for decmial number 5 , its binary representation is 00101 and its 1's complement get by invertings its bits 11010 .

6= 00000110

13= 00001101

-6=11111010

-13 =11110011

a) 6+13 = 00000110+00001101 = as first bit is 0 number is positive , 00010011 = 19

b)-6+13 = 11111010 +00001101 = (discarding overflow bits from 0100000111 ) , since first bit is 0 , so number is positive , 00000111 = 7

c)6-13 = 00000110 + 11110011 = (discarding overflow bits from 011111001)  11111001 , converting in binary as first digit is 1 means number is negative ,-(00000110+1 ) =-00000111 = -7

b)-6-13 = 11111010 + 11110011 = (discarding overflow bits from 0111101101) 11101101 , converting from 2's complement to normal binary is -(00010010+1) = -00010011 = 19 .