Skip to main content\(\newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 4.4 Signed Binary Integers
Checkpoint 4.4.1. Two’s Complement.
Which statement about two’s complement representation is correct?
It’s a format for signed integers.
Correct!
It’s an alternative format to represent unsigned integers.
Incorrect.
It’s a format for unsigned values, including both integers and fractions.
Incorrect.
It’s a format for signed values, including both integers and fractions.
Incorrect.
Checkpoint 4.4.2. Two’s Complement.
Checkpoint 4.4.3. Two’s Complement.
C has a signed char data type that uses 8-bit two’s complement representation. What’s the range of values this data type can represent?
\(0\) to \(2^8 - 1\)
Incorrect.
\(0\) to \(2^8\)
Incorrect.
\(-2^7\) to \(2^7 - 1\)
Correct!
\(-2^8\) to \(2^8 - 1\)
Incorrect.
Checkpoint 4.4.4. Two’s Complement.
Which of the following statements is true about negating a two’s complement binary number?
Flip each bit and add a 1.
Correct!
The process is different for a positive number vs. for a negative number.
Incorrect.
Simply place the negative sign (-) before the number to negate it.
Incorrect.
Flip the most significant bit.
Incorrect.
Checkpoint 4.4.5. Most Significant Bit.
Given the following 4-bit two’s complement binary number, how much does the most significant bit contribute to its total value?]
1011
-8
Correct!
8
Incorrect.
1
Incorrect.
-1
Incorrect.
Checkpoint 4.4.6. Binary to Decimal.
Hint.
Non-negative values have the same representation under unsigned binary vs. two’s complement of the same width (other than leading zeros).
Checkpoint 4.4.7. Two’s Complement.
Checkpoint 4.4.8. Binary to Decimal.
Hint.
The most significant bit is now 1. How does that impact the value of the sign?
Checkpoint 4.4.9. Two’s Complement vs. Unsigned Binary.
Which of the following statements correctly complete the sentence below?
Bit sequence 10101000 ________________.
represents a positive value in unsigned binary format.
Correct!
represents a negative value in unsigned binary format.
Incorrect.
represents a positive value in 8-bit two’s complement format.
Incorrect.
represents a negative value in 16-bit two’s complement format.
Incorrect.
represents a negative value in 8-bit two’s complement format.
Correct!
Checkpoint 4.4.10. Negating Two’s Complement.
Checkpoint 4.4.11. Sign Extention.
Checkpoint 4.4.12. Sign Extention.
Checkpoint 4.4.13. Extension Uses.