Skip to content

This textbook is in beta – content is actively being refined. Report issues or suggestions

03.01 Number Systems And Twos Complement - Quiz

Check your understanding

  1. Which base naturally groups into 4-bit chunks (nibbles)?

    • Decimal (base 10)
    • Binary (base 2)
    • Hexadecimal (base 16) { data-correct }
    • Octal (base 8)
  2. What is 101101₂ in decimal?

    • 43
    • 45 { data-correct }
    • 47
    • 51
  3. In 8-bit two’s complement, what is the representation of -18?

    • 11101101
    • 11101110 { data-correct }
    • 10010010
    • 00010010
  4. To convert a positive number to its negative in two’s complement, you:

    • Flip the most significant bit only
    • Invert all bits and add 1 { data-correct }
    • Subtract from 255
    • Put a minus sign in front
  5. What is the range of 8-bit two’s complement integers?

    • -127 to +127
    • -128 to +127 { data-correct }
    • -255 to +255
    • 0 to 255
  6. Which Python function converts decimal 45 to binary?

    • hex(45)
    • bin(45) { data-correct }
    • int(45, 2)
    • oct(45)