Step 1: Understand 1's complement and 2's complement representations.
- In 1's complement, the smallest number that can be represented in an \( n \)-bit system is \( -(2^{n-1} - 1) \).
- In 2's complement, the smallest number that can be represented is \( -2^{n-1} \).
Step 2: Apply to the 9-bit representation.
For a 9-bit representation:
- In 1's complement, the smallest number is \( -255 \) (since \( 2^{8} - 1 = 255 \)).
- In 2's complement, the smallest number is \( -256 \) (since \( -2^{8} = -256 \)).
Step 3: Conclusion.
Thus, the correct answer is (d) (i) -255, (ii) -256.
Given an unsigned 32-bit integer \( x \), which of the following C/C++ expressions correctly toggles its bits starting from position \( p \) (with the least significant bit at position 0)?
Assume: \( x \) is the input integer; \( p \) is the starting position of the bit range (0-based, LSB at position 0); \( m \) is the number of bits to toggle; and no overflow or invalid input conditions occur. Which of the following correctly toggles \( m \) bits starting from position \( p \)?
A remote island has a unique social structure. Individuals are either "Truth-tellers" (who always speak the truth) or "Tricksters" (who always lie). You encounter three inhabitants: X, Y, and Z.
X says: "Y is a Trickster"
Y says: "Exactly one of us is a Truth-teller."
What can you definitively conclude about Z?
Consider the following statements followed by two conclusions.
Statements: 1. Some men are great. 2. Some men are wise.
Conclusions: 1. Men are either great or wise. 2. Some men are neither great nor wise. Choose the correct option: