Classroom Worksheet
Counting in Computer Science: A Multiple-Choice Practice Worksheet
College-Level Foundations in Binary, Decimal, Hexadecimal, and Algorithmic Counting
Name____________________________
Date________________
Score______ / 10
Instructions:
Read each question carefully and choose the best answer. Circle or mark one option for each item. Work through the questions in order, as they increase in difficulty. Use scratch paper if needed. When you finish, review your answers and check your reasoning against the concepts of counting, number bases, and combinatorics.
Skills Practiced:- Counting in positional number systems
- Converting between binary, decimal, and hexadecimal
- Applying the multiplication principle
- Counting possible outcomes in computing contexts
- Interpreting combinatorial reasoning in algorithms
- Recognizing overflow and representation limits
1Multiple Choice
In the decimal system, what is the value of the digit 7 in the number 472? A. 7 B. 70 C. 700 D. 4,000
2Multiple Choice
What is the binary value of the decimal number 5? A. 101 B. 110 C. 111 D. 100
3Multiple Choice
How many distinct values can be represented with 3 bits? A. 3 B. 6 C. 8 D. 9
4Multiple Choice
A computer uses 4 bits to store an unsigned integer. What is the largest value it can represent? A. 7 B. 8 C. 15 D. 16
5Multiple Choice
How many different 2-character passwords can be formed if each character is either A, B, or C, and characters may repeat? A. 3 B. 6 C. 8 D. 9
6Multiple Choice
A web app generates a 4-digit code using only the digits 0–9. Digits may repeat. How many codes are possible? A. 40 B. 100 C. 1,000 D. 10,000
7Multiple Choice
How many 3-bit binary strings contain exactly one 1? A. 1 B. 2 C. 3 D. 4
8Multiple Choice
How many different ordered pairs of distinct characters can be formed from the set {X, Y, Z} without repetition? A. 3 B. 6 C. 8 D. 9
9Multiple Choice
A filename suffix uses hexadecimal digits. How many possible one-digit hexadecimal values are there? A. 8 B. 10 C. 12 D. 16
10Multiple Choice
A system has 256 possible byte values. Which expression correctly shows why? A. 2^4 B. 2^8 C. 8^2 D. 16^2
Answer Key
Teacher Notes:
This worksheet reinforces counting concepts used in computer science, including base conversion, binary patterns, combinatorics, and complexity-aware reasoning. Suggested use: warm-up, homework, quiz review, or exam prep. Learning objectives: identify place values in positional systems; convert between common bases; count outcomes in structured computing scenarios; apply the multiplication principle; and recognize how counting supports storage, encoding, and algorithm analysis. Differentiation: support struggling learners with a base-value chart and fewer decimals-to-binary steps; challenge advanced learners with bonus discussion on asymptotic counting and overflow limits. Extension activity: have students write a short explanation of how counting appears in hash tables, permissions, or state-space searches.
| # | Answer | Explanation |
|---|
| 1 | B. 70 | The 7 is in the tens place, so its value is 7 × 10 = 70. |
| 2 | A. 101 | 5 in binary is 101 because 4 + 1 = 5. |
| 3 | C. 8 | Each bit has 2 possibilities, so 3 bits represent 2^3 = 8 values. |
| 4 | C. 15 | With 4 bits, the unsigned range is 0 through 2^4 - 1 = 15. |
| 5 | D. 9 | There are 3 choices for each of 2 positions, so 3 × 3 = 9. |
| 6 | D. 10,000 | Each of 4 positions has 10 choices, so 10^4 = 10,000. |
| 7 | C. 3 | The single 1 can be in any of 3 positions, giving 3 strings: 100, 010, and 001. |
| 8 | B. 6 | There are 3 choices for the first position and 2 for the second, so 3 × 2 = 6. |
| 9 | D. 16 | Hexadecimal uses 16 symbols: 0–9 and A–F. |
| 10 | B. 2^8 | A byte contains 8 bits, and each bit has 2 choices, so 2^8 = 256 possible values. |