Discrete Mathematics Questions and Answers – Number Theory – Complement of a Number

This set of Discrete Mathematics Question Bank focuses on “Number Theory – Complement of a Number”.

1. One’s complement in binary is defined as _________
a) Flipping each binary bit
b) Adding one to the binary number
c) Flipping only bits having zero in it
d) None of the mentioned
View Answer

Answer: a
Explanation: While taking 1’s complement we replace 1 with zero and vice versa.

2. What is the one’s complement of the number 1010110?
a) 1111111
b) 0101001
c) 1100110
d) None of the mentioned
View Answer

Answer: b
Explanation: While taking 1’s complement we replace 1 with zero and vice versa.

3. One’s complement of a number x is y, then one’s complement of y is?
a) y
b) x
c) x + y
d) None of the mentioned
View Answer

Answer: b
Explanation: Complement of Complement of number gives the same number.
advertisement
advertisement

4. Nine’s complement of a number is formed by _________
a) replacing each digit by 9 minus that digit
b) replacing each digit by 1plus that digit
c) replacing each digit by 8 minus that digit
d) None of the mentioned
View Answer

Answer: a
Explanation: Nine’s complement of a number is formed by replacing each digit by 9 minus that digit.

5. Radix complement can be obtained fromdiminished radix’s complement by _________
a) Adding one to diminished radox’s complement
b) Subtracting one to diminished radox’s complement
c) Both are same things
d) None of the mentioned
View Answer

Answer: a
Explanation: Radix complement = diminished radix complement +1.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. In binary signed representation if most significant bit is one then that number is positive.
a) True
b) False
View Answer

Answer: b
Explanation: In signed representation, if the most significant bit is one then that number is negative, for positive numbers msb = 0.

7. In signed representation 5 is represented in binary as 0101.
a) True
b) False
View Answer

Answer: a
Explanation: Here msb is the signed bit which is zero, 101 evaluates to 5 hence it is +5.
advertisement

8. The two’s complement of 101110100 is represented as?
a) 010001100
b) 101110101
c) 010001100
d) None of the mentioned
View Answer

Answer: a
Explanation: 2’s complement = 1’s complement +1, 1’s complement = 010001011.

9. 9’s complement of 23456 is?
a) 87654
b) 76543
c) 12345
d) none of the mentioned
View Answer

Answer: b
Explanation: Nine’s complement of a number is formed by replacing each digit by 9 minus that digit.
advertisement

10. Decimal equivalent of one’s complement of 11111001 is?
a) 5
b) 6
c) 4
d) 10
View Answer

Answer: b
Explanation: One’s complement of that number is 00000110 which is 6 in decimal.

Sanfoundry Global Education & Learning Series – Discrete Mathematics.

To practice Discrete Mathematics Question Bank, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.