APCSP Data Representation 2 — Questions and Answers
Question 1: Which of the following best describes why computers use binary (base-2) rather than decimal (base-10) to store data?
- Binary arithmetic is faster than decimal arithmetic
- Electronic circuits naturally represent two states (on/off), making binary practical (Correct answer)
- Binary uses fewer digits so storage is smaller
- Decimal numbers cannot be converted to machine code
Correct answer: Electronic circuits naturally represent two states (on/off), making binary practical
Electronic components like transistors naturally exist in two stable states (on/off or high/low voltage), making binary the most practical number system for hardware.
Question 2: How many unique values can be represented using 4 bits?
- 4
- 8
- 16 (Correct answer)
- 32
Correct answer: 16
With n bits you can represent 2^n unique values; 2^4 = 16.
Question 3: The hexadecimal value 0xFF is equivalent to which decimal value?
- 15
- 160
- 255 (Correct answer)
- 256
Correct answer: 255
F in hex equals 15, so 0xFF = 15×16 + 15 = 240 + 15 = 255.
Question 4: A color image is stored using 24-bit color (8 bits per channel for red, green, blue). How many distinct colors can it represent?
- 256
- 65,536
- 16,777,216 (Correct answer)
- 4,294,967,296
Correct answer: 16,777,216
24 bits total gives 2^24 = 16,777,216 distinct color combinations.
Question 5: Which encoding standard assigns a unique number to every character and supports over 140,000 characters from multiple languages and symbol sets?
- ASCII
- UTF-8 / Unicode (Correct answer)
- Base64
- EBCDIC
Correct answer: UTF-8 / Unicode
Unicode (with UTF-8 as a common encoding) assigns code points to over 140,000 characters covering most of the world's writing systems.
Question 6: What is the decimal equivalent of the binary number 1010?
- 5
- 8
- 10 (Correct answer)
- 12
Correct answer: 10
1×8 + 0×4 + 1×2 + 0×1 = 8 + 0 + 2 + 0 = 10.
Question 7: Lossless data compression differs from lossy compression in that lossless compression:
- always produces a smaller file than lossy compression
- allows the original data to be perfectly reconstructed (Correct answer)
- works only on text files
- removes data that is perceptually unimportant to humans
Correct answer: allows the original data to be perfectly reconstructed
Lossless compression encodes data so the original can be reconstructed exactly, while lossy compression permanently discards some information.
Which of the following best describes why computers use binary (base-2) rather than decimal (base-10) to store data?