Show the representation of the following values in 8-bit two's complement notation:
15
-75
-3
109

1) Since this is a positive number. we can directly convert this into binary Divide 15 successively by 2 until the quotient is 0 > 15/2 = 7, remainder is 1 > 7/2 = 3, remainder is 1 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1111 So, 15 of decimal is 1111 in binary Adding 4 zeros on left hand side of this number to make this of length 8 so, 15 in 2's complement binary is 00001111 Answer: 00001111 2) This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 75 successively by 2 until the quotient is 0 > 75/2 = 37, remainder is 1 > 37/2 = 18, remainder is 1 > 18/2 = 9, remainder is 0 > 9/2 = 4, remainder is 1 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1001011 So, 75 of decimal is 1001011 in binary Adding 1 zeros on left hand side of this number to make this of length 8 So, 75 in normal binary is 01001011 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 01001011 is flipped to 10110100 Step 3:. Add 1 to above result 10110100 + 1 = 10110101 so, -75 in 2's complement binary is 10110101 Answer: 10110101 3) This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 3 successively by 2 until the quotient is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11 So, 3 of decimal is 11 in binary Adding 6 zeros on left hand side of this number to make this of length 8 So, 3 in normal binary is 00000011 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00000011 is flipped to 11111100 Step 3:. Add 1 to above result 11111100 + 1 = 11111101 so, -3 in 2's complement binary is 11111101 Answer: 11111101 4) Since this is a positive number. we can directly convert this into binary Divide 109 successively by 2 until the quotient is 0 > 109/2 = 54, remainder is 1 > 54/2 = 27, remainder is 0 > 27/2 = 13, remainder is 1 > 13/2 = 6, remainder is 1 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1101101 So, 109 of decimal is 1101101 in binary Adding 1 zeros on left hand side of this number to make this of length 8 so, 109 in 2's complement binary is 01101101 Answer: 01101101
Show the representation of the following values in 8-bit two's complement notation: 15 -75 -3 109
6. Convert the following 8-bit two's complement notation into base ten numbers. (8 points) a. 00011110 b. 11110100
(b) Convert -41 (written in decimal representation) into its signed integer 8-bit representation using the two's complement method. That is find the two's complement of -41, when the number of overall bits used are 8.
`1) How is -9 (base 10) represented in 8-bit two's complement notation? a) 00001001 b)11110111 c)11110110 d) 11111001 2) The binary addition of 1 + 1 + 1 + 1 = A) 1111(base 2) b) 0001(base2) C) 0100(base2) D) 1001(base2) 3) How is –1 (base 10) represented in 8-bit two's complement notation? A) 1111111- B) 111111111 C) 00000001 D) 00000010
5. Express (76) 10 and (-114)10 in 8-bit binary two's complement arithmetic and then add the numbers. What would be the representation (0)10 in 16-bit binary two's complement? (be sure to show your work). 6. Create two 16-bit 2's complement integer such that their sum causes an overflow. Why does the sum of a negative 2's complement number and a positive 2's complement number never generate an overflow? Discuss.
1. What is the largest decimal number we can represent with a 16 bit two's complement number? 2. Convert the following signed binary numbers to decimals. 11001 010011 1110100 1100111 3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Note if there is an overflow. 7 + 13 Two's complement/binary number for 7: Two's complement/binary number for 13: Sum: Overflow? 4. Convert the following decimal numbers to 6-bit two's complement binary numbers...
. Assume all the values are in 8-bit 2s complement representation. Perform the following operations . i. 01111111 + 11111111 ii. 00100101 - 10110111
Suppose you have two 8-bit registers, A and B. containing signed two's complement values A contains the value 11001110 B contains the value 11111010 What is the decimal value of the difference between them (A - B)?
(5 points) Convert the following decimal numbers to 8-bit two's complement binary numbers and carry out the additions in binary. Indicate whether the sum overflows the 8-bit result. If not show the result as a decimal number. a) 39 + (-78) b) -43 + (-92)
Perform the following three subtraction operations by converting the numbers to 8-bit two's complement and adding: 65-32 32-65 -16-10
Now, suppose you have the following two 8-bit hexadecimal numbers, both of which use two's complement: ef 4a 4. What is the decimal equivalent of each of these numbers? 6. What is their sum in hexadecimal? (Note that the sum must also be confined to 8 bits in order for two's complement to work.)