Computer Fundamentals Multiple choice Questions and Answers on Complements for Freshers
https://www.computersprofessor.com/2018/11/computer-fundamentals-multiple-choice_12.html
1. What is the 1’s complement of 11010?
a) 11010
b) 11011
c) 00110
d) 00101
Answer: d
Explanation: The 1’s complement of a number is obtained by converting all the 0 bits to 1 and all 1’s to 0’s. Here, 11010 gets converted to 00101.
2. 2’s complement is obtained by adding 1 to 1’s complement of a number.
a) True
b) False
Answer: a
Explanation: The statement is true. Let us take an example: Consider the number 110000.
1’s complement of the number is 001111. 2’s complement=001111+1=010000.
3. The 10’s complement of 562 is __________
a) 4
b) 3
c) 7
d) 8
Answer: b
Explanation: 10’s complement is obtained by adding 1 to the 9’s complement of a number.
Here, 9’s complement=999-562=436.
Therefore, 10’s complement=436+1=437.
4. The 9’s complement of 6578 is ___________
a) 1234
b) 3421
c) 3124
d) 3420
Answer: b
Explanation: 9’s complement is obtained by subtracting 9 from each bit of the number.
Here, 9999-6578=3421.
Therefore, the 9’s complement is 3421.
5. >> operator is used to denote _________
a) left shift
b) right shift
c) greater than
d) less than
Answer: b
Explanation: >> operator denotes the right shift in binary arithmetic.
E.g. If we say, >>110 by 2-bits, the value obtained will be 001.
Similarly, << denotes the right shift operator.
6. The subtraction using 1’s complement of 110 – 100 will give the result ___________
a) -011
b) 011
c) 010
d) -010
Answer: c
Explanation: To subtract using 1’s complement: Take the 1’s complement of the 2nd number (here, 011) and add it to the first number. (110+011=1,001).
If the carry is generated, it is added to the result (001+1=010).
If a carry is not generated then it is converted to its 1’s complement form.
7. The result obtained on subtraction using 2’s complement of 1111-0010 will be _________
a) 11101
b) 11011
c) 1101
d) 1011
Answer: c
Explanation: Firstly, the 2’s complement of the 2nd number is obtained.
Then, if carry is generated, it is discarded and the number is positive.
Otherwise, 2’s complement of the result is obtained and the answer is negative.
Here, 1111+1110=1, 1101. Since carry is generated, it is discarded and the answer is positive.
8. The 1’s complement of 1111111110.101 is _______________
a) 1.010
b) 0000000000.010
c) 1111111110.101
d) 1.101
Answer: a
Explanation: The 1’s complement of a number is obtained by reversing the bits with value 1 to 0 and the bits with value 0 to 1. Here, 11111111110.101 gets converted to 000000001.010 in its 1’s complement format.
9. 7’s complement of 432 is _________________
a) 432
b) 543
c) 345
d) 777
Answer: c
Explanation: To find the 7’s complement of any number, we simply subtract 7 from each of the bits.
Here, 777-432=345. So, the 7’s complement is 345.
10. The 16’s complement of 74E will be __________
a) 8B2
b) F8B2
c) 2B8
d) 8C2
Answer: b
Explanation: The 16’s complement is obtained by subtracting 16 from each of the bits of that number.
Here, 16’s complement of 074E will be F8B2.