Compute the following decimal arithmetic operation using 8-bit l's complement: \,z i) -16+78; ii) -e0-8; iii) 13-26
Question
Compute the following decimal arithmetic operation using 8-bit l's complement:
-
-16 + 78
-
-e0 - 8
-
13 - 26
Solution
Sure, let's solve these problems one by one:
i) -16 + 78
First, we need to represent -16 and 78 in 8-bit 1's complement form.
-16 in binary is 10000. To make it 8-bit, we add four 0s in front, so we get 00010000. The 1's complement of 00010000 is 11101111.
78 in binary is 1001110. To make it 8-bit, we add one 0 in front, so we get 01001110.
Now, let's add these two numbers:
11101111
- 01001110
= 10111101
But, since we are using 1's complement, if there is a carry out, we need to add it back to the result. In this case, there is no carry out, so the result is 10111101, which is -83 in decimal. So, -16 + 78 = -83.
ii) -80 - 8
First, we need to represent -80 and -8 in 8-bit 1's complement form.
-80 in binary is 1010000. To make it 8-bit, we add one 0 in front, so we get 01010000. The 1's complement of 01010000 is 10101111.
-8 in binary is 1000. To make it 8-bit, we add four 0s in front, so we get 00001000. The 1's complement of 00001000 is 11110111.
Now, let's add these two numbers:
10101111
- 11110111
= 10100110
But, since we are using 1's complement, if there is a carry out, we need to add it back to the result. In this case, there is a carry out, so we add it back:
10100110
-
1
= 10100111
So, -80 - 8 = -39.
iii) 13 - 26
This is equivalent to 13 + (-26).
13 in binary is 1101. To make it 8-bit, we add four 0s in front, so we get 00001101.
-26 in binary is 11010. To make it 8-bit, we add three 0s in front, so we get 00011010. The 1's complement of 00011010 is 11100101.
Now, let's add these two numbers:
00001101
- 11100101
= 11110010
But, since we are using 1's complement, if there is a carry out, we need to add it back to the result. In this case, there is no carry out, so the result is 11110010, which is -13 in decimal. So, 13 - 26 = -13.
Similar Questions
Compute the following decimal arithmetic operation using 8-bit 2's complement: i) t5- 7; ii) -10+6 ; iii) -23-7.
Convert the following decimal values to a 16-bit 2's complement representation. (1*2Marks)i. -2342ii. 234
Convert the following decimal values to 8-bit 2's complement representation(1*2 Marks)i. -92ii. -36
erform six bit signed two’s complement arithmetic operation on (−15)10 +(+65)10
Perform the arithmetic operations ( +42) + ( - 13) in binary using signed-2's complement representation for negative numbers*111110100111000011000001110
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.