03.01 Number Systems And Twos Complement - Quiz¶
Check your understanding
-
Which base naturally groups into 4-bit chunks (nibbles)?
- Decimal (base 10)
- Binary (base 2)
- Hexadecimal (base 16) { data-correct }
- Octal (base 8)
-
What is 101101₂ in decimal?
- 43
- 45 { data-correct }
- 47
- 51
-
In 8-bit two’s complement, what is the representation of -18?
- 11101101
- 11101110 { data-correct }
- 10010010
- 00010010
-
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
-
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
-
Which Python function converts decimal 45 to binary?
- hex(45)
- bin(45) { data-correct }
- int(45, 2)
- oct(45)