Skip to content
Michelle’s Computer
Terminal

Binary and hexadecimal quiz

Practise number conversion, binary shifts, bytes, overflow, and two's complement with worked explanations.

Try the command: free text to binary converter.

syllabus — topic scope & references
  • Convert between binary, decimal, and hexadecimal
  • Trace logical shifts and recognise overflow
  • Interpret unsigned and two's-complement values

Cambridge IGCSE 0478 (2026–2028): 1.1 Number systems.

IB Computer Science (first assessment 2027): A.1 Computer fundamentals.

Original practice on shared foundations. Topic-area links do not imply complete syllabus or SL/HL coverage. Not affiliated with or endorsed by Cambridge or the IB.

Related: Boolean logic and truth tables · Computer architecture and memory

BINARY AND HEXADECIMAL QUIZ
10 questions. Type a, b, or c, then Enter. Explanations follow each answer.
Type review for all worked answers; quiz to restart; topics to switch.
 
Question 1/10: What is binary 1010 in decimal?
a) 8
b) 10
c) 12
Type answer a, answer b, or answer c. (A single letter works too.)
review — read all questions & worked answers

Binary and hexadecimal: questions, answers & explanations

This is the readable reference for the same 10 MCQs. Close this file to continue your quiz, or type quiz to start again.

1. What is binary 1010 in decimal?

  1. a) 8
  2. b) 10
  3. c) 12

Answer: b) 10

The place values are 8, 4, 2, 1. In 1010, the 8 and 2 positions are set: 8 + 2 = 10.

2. Which binary number represents decimal 13?

  1. a) 1101
  2. b) 1011
  3. c) 1110

Answer: a) 1101

13 = 8 + 4 + 1, so the 8, 4, and 1 bits are set. That gives 1101.

3. What is hexadecimal 2F in decimal?

  1. a) 32
  2. b) 47
  3. c) 215

Answer: b) 47

F represents 15. The 2 is in the sixteens column: 2 × 16 + 15 = 47.

4. What is the largest unsigned integer an 8-bit register can hold?

  1. a) 127
  2. b) 256
  3. c) 255

Answer: c) 255

Eight bits have 256 different patterns. Unsigned values start at 0, so the largest is 255, represented by 11111111.

5. Why does 11111111 + 00000001 overflow an unsigned 8-bit register?

  1. a) The sum needs nine bits
  2. b) The answer must be negative
  3. c) Binary addition cannot use carries

Answer: a) The sum needs nine bits

255 + 1 = 256, which is binary 100000000. That ninth bit does not fit in an 8-bit register.

6. Logically shift 00101101 one place left in an 8-bit register. What remains?

  1. a) 00010110
  2. b) 01011010
  3. c) 10110100

Answer: b) 01011010

Move every bit left once and fill the rightmost position with 0. The result is 01011010, or decimal 90.

7. Logically shift 10010000 two places right, filling with zeros. What is the result?

  1. a) 00100100
  2. b) 01001000
  3. c) 00010010

Answer: a) 00100100

Two right shifts give 01001000 and then 00100100. Decimal 144 becomes 36.

8. How many bytes are in 24 bits?

  1. a) 2
  2. b) 4
  3. c) 3

Answer: c) 3

One byte contains eight bits. 24 ÷ 8 = 3 bytes.

9. One hexadecimal digit corresponds to how many binary bits?

  1. a) 2
  2. b) 4
  3. c) 8

Answer: b) 4

Hexadecimal has 16 digit values. Four binary bits also have 16 patterns, from 0000 to 1111.

10. What does 11111111 represent as an 8-bit two's-complement integer?

  1. a) 255
  2. b) −128
  3. c) −1

Answer: c) −1

In 8-bit two's complement, the leftmost position has weight −128. The remaining set bits total 127: −128 + 127 = −1.

↑ ↓ recall commands · Tab autocomplete · Enter run