Hashing Checksums Quiz: Applications in Coding – Hashing, Checksums, and Cyclic Redundancy

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11092 | Total Attempts: 9,725,533
| Attempts: 11 | Questions: 20 | Updated: May 7, 2026
Please wait...
Question 1 / 21
🏆 Rank #--
0 %
0/100
Score 0/100

1) Which of the following best describes the primary role of a checksum in data transmission?

Explanation

A checksum is computed from the data before transmission and sent alongside it. When the receiver gets the data, it recomputes the checksum and compares it to the received value. If the two values differ, an error occurred during transmission. Checksums do not compress, encrypt, or reduce data size. Their sole purpose is integrity verification through error detection.

Submit
Please wait...
About This Quiz
Hashing Checksums Quiz: Applications In Coding  Hashing, Checksums, And Cyclic Redundancy - Quiz

Curious how computers catch errors or protect data? This quiz walks you through hashing, checksums, and cyclic redundancy with easy-to-understand examples. You’ll see how tiny input changes produce big output shifts and how checksums help detect mistakes. Explore the logic behind data integrity and see how these ideas show up... see morein everyday tech.
see less

2)

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2) A checksum is computed as the sum of all bytes modulo 256. If the total byte sum is 9999, what is the checksum value?

Explanation

The checksum equals 9999 % 256. The largest multiple of 256 that does not exceed 9999 is 256 multiplied by 39 equals 9984. Subtracting gives 9999 minus 9984 equals 15. So the checksum is 15. This value fits within a single byte since it is less than 256, which is the purpose of applying modulus 256 in byte-oriented checksum schemes.

Submit

3) If the CRC remainder computed at the receiver equals 0, the received data was most likely transmitted without corruption.

Explanation

The answer is True. In CRC verification, the receiver divides the entire received frame including the appended CRC bits by the same generator polynomial. If the remainder is 0, the data is considered intact. A non-zero remainder indicates corruption. This is probabilistic rather than absolute, since two complementary error patterns could theoretically cancel out, but this is extremely unlikely with well-chosen generator polynomials.

Submit

4) A hash function is defined as hash(x) = (5x + 3) % 11. What is hash(9)?

Explanation

Substituting x equals 9: 5 multiplied by 9 plus 3 equals 48. Then 48 % 11: 11 multiplied by 4 equals 44; 48 minus 44 equals 4. So hash(9) equals 4. This linear hash function of the form (ax + b) % m is common in introductory implementations. The modulus 11 is a prime number, which tends to produce more uniform index distributions than non-prime table sizes.

Submit

5) A hash table uses the function h(k) = k % 8. Which of the following pairs of keys produces a collision?

Explanation

Two keys collide when they map to the same hash index. Checking option A: 13 % 8 equals 5 and 21 % 8 equals 5. Both map to index 5, confirming a collision. Checking option B: 9 % 8 equals 1 and 18 % 8 equals 2 — no collision. Checking option C: 7 % 8 equals 7 and 18 % 8 equals 2 — no collision. Checking option D: 4 % 8 equals 4 and 13 % 8 equals 5 — no collision. Only option A produces a collision.

Submit

6) Which of the following statements about hash collisions are correct? (Select all that apply)

Explanation

Option A is correct: a collision is by definition two distinct keys mapping to the same index. Option B is correct: a larger table reduces collision probability by spreading keys across more buckets, but as long as the key space exceeds the table size, collisions remain possible. Option C is incorrect: a prime modulus reduces clustering and improves distribution, but it does not guarantee zero collisions when more keys than buckets exist. Option D is correct: whenever keys can outnumber buckets, some keys must share a bucket and collision resolution is required.

Submit

7) A data packet contains 5 bytes each with value 255. What is the checksum using modulus 256?

Explanation

The total byte sum is 5 multiplied by 255 equals 1275. The checksum is 1275 % 256. The largest multiple of 256 not exceeding 1275 is 256 multiplied by 4 equals 1024. Subtracting gives 1275 minus 1024 equals 251. So the checksum is 251. This result is close to 255 because five bytes of maximum value leave only a small remainder when reduced modulo 256.

Submit

8) A perfect hash function is collision-free for a specific known set of keys and is therefore also guaranteed to be collision-free for all possible input values.

Explanation

The answer is False. A perfect hash function is one that produces no collisions for a specific, predetermined set of keys. It is designed and optimised for that particular key set only. When applied to keys outside that set, a perfect hash function may still produce collisions. Perfect hashing is a technique used when the complete set of keys is known in advance, such as in compiler keyword tables or static lookup structures.

Submit

9) A checksum is computed over 4 bytes with values 200, 150, 100, and 50 using modulus 256. What is the checksum?

Explanation

The total byte sum is 200 plus 150 plus 100 plus 50 equals 500. The checksum is 500 % 256. The largest multiple of 256 not exceeding 500 is 256 multiplied by 1 equals 256. Subtracting gives 500 minus 256 equals 244. So the checksum is 244. This value is transmitted alongside the data so the receiver can verify integrity by recomputing the same operation.

Submit

10) What is the checksum for a file whose total byte sum is 4096 using modulus 255?

Explanation

The checksum equals 4096 % 255. The largest multiple of 255 not exceeding 4096 is 255 multiplied by 16 equals 4080. Subtracting gives 4096 minus 4080 equals 16. So the checksum is 16. Note that modulus 255 rather than 256 is occasionally used in specific protocol designs. The computation is the same: find the remainder after dividing by the chosen modulus.

Submit

11) A hash function is defined as hash(x) = (7x + 2) % 13. What is hash(5)?

Explanation

Substituting x equals 5: 7 multiplied by 5 plus 2 equals 35 plus 2 equals 37. Then 37 % 13: 13 multiplied by 2 equals 26; 37 minus 26 equals 11. So hash(5) equals 11. The modulus 13 is prime, which helps distribute keys uniformly across the table. The expression 7x plus 2 is a linear probe function that shifts and scales the key before reducing it modulo the table size.

Submit

12) Using the division method hash function h(k) = k mod 97, what index does key k = 1000 map to?

Explanation

Computing 1000 % 97: the largest multiple of 97 not exceeding 1000 is 97 multiplied by 10 equals 970. Subtracting gives 1000 minus 970 equals 30. So h(1000) equals 30. The number 97 is prime, which is a deliberate choice in the division method. Using a prime table size reduces the clustering of keys and produces a more uniform distribution than composite table sizes.

Submit

13) Two different messages can produce the same CRC value, meaning CRC-based error detection is probabilistic rather than providing an absolute guarantee of correctness.

Explanation

The answer is True. CRC uses a fixed-length remainder, so by the pigeonhole principle, different messages can produce the same CRC value. However, the probability of an undetected error is extremely low with well-chosen generator polynomials. A 32-bit CRC, for example, has a collision probability of approximately 1 in 4 billion for random errors, making it highly reliable in practice while not being mathematically absolute.

Submit

14) A network message arrives with bytes 0x4A, 0x2F, and 0x11. The XOR checksum is computed as the XOR of all bytes. What is the result?

Explanation

Computing step by step: 0x4A XOR 0x2F. In binary: 01001010 XOR 00101111 equals 01100101, which is 0x65. Then 0x65 XOR 0x11: 01100101 XOR 00010001 equals 01110100, which is 0x74. So the XOR checksum is 0x74. XOR-based checksums are fast to compute and have the useful property that XORing the checksum back into the result produces 0 if no errors occurred.

Submit

15) Which of the following correctly illustrate the modular multiplication property ((A multiplied by B) % m = ((A % m) multiplied by (B % m)) % m)? (Select all that apply)

Explanation

Option A is correct: (15 x 8) % 7 = 120 % 7 = 1, and (1 x 1) % 7 = 1 — both paths give 1. Option B is correct: (12 x 10) % 6 = 120 % 6 = 0, and (0 x 4) % 6 = 0 — both paths give 0. Option C is incorrect: the final % m step is mandatory. Without it, (A % m) multiplied by (B % m) could exceed m, giving a wrong result. Option D is correct: this property is used in hash computation and cryptography to avoid computing enormous intermediate products.

Submit

16) Convert the 16-bit binary number 1010111100110101 to hexadecimal.

Explanation

Split the 16-bit binary number into 4-bit groups from left to right: 1010, 1111, 0011, 0101. Converting each group: 1010 equals A, 1111 equals F, 0011 equals 3, 0101 equals 5. Concatenating gives AF35. This conversion is directly relevant to CRC and checksum work, where remainders are often expressed in hexadecimal for compactness.

Submit

17) A hash table currently stores 75 keys across 100 available buckets. What is the load factor of this hash table?

Explanation

The load factor of a hash table is defined as the number of stored keys divided by the total number of buckets. Here that is 75 divided by 100 equals 0.75. The load factor is a key performance metric: a low load factor means few collisions but wasted memory, while a high load factor means better memory usage but more collisions. Most implementations resize the table when the load factor exceeds a threshold such as 0.7 or 0.75.

Submit

18) Increasing the size of a hash table always eliminates all collisions.

Explanation

The answer is False. Increasing table size reduces the load factor and lowers the probability of collisions, but it cannot eliminate them entirely unless the table is at least as large as the entire key space. Since the key space in most applications is enormous (for example all possible strings), a hash table large enough to avoid all collisions is impractical. Collision resolution strategies such as chaining or open addressing are always necessary in real implementations.

Submit

19) What is the result of computing (15 multiplied by 8) % 7 using the modular multiplication property?

Explanation

Using the modular multiplication property: (15 multiplied by 8) % 7 equals ((15 % 7) multiplied by (8 % 7)) % 7. Computing each remainder: 15 % 7 equals 1 (since 7 multiplied by 2 equals 14 and 15 minus 14 equals 1), and 8 % 7 equals 1 (since 7 multiplied by 1 equals 7 and 8 minus 7 equals 1). So (1 multiplied by 1) % 7 equals 1. Confirming directly: 15 multiplied by 8 equals 120; 120 % 7 equals 1 since 7 multiplied by 17 equals 119 and 120 minus 119 equals 1.

Submit

20) What is 5432 % 17 when used as a raw hash computation?

Explanation

The largest multiple of 17 that does not exceed 5432 is 17 multiplied by 319 equals 5423. Subtracting gives 5432 minus 5423 equals 9. So 5432 % 17 equals 9. In hash computation, reducing a large key value by a prime modulus such as 17 helps distribute keys more uniformly across hash table buckets compared to non-prime moduli.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following best describes the primary role of a checksum...
A checksum is computed as the sum of all bytes modulo 256. If the...
If the CRC remainder computed at the receiver equals 0, the received...
A hash function is defined as hash(x) = (5x + 3) % 11. What is...
A hash table uses the function h(k) = k % 8. Which of the following...
Which of the following statements about hash collisions are correct?...
A data packet contains 5 bytes each with value 255. What is the...
A perfect hash function is collision-free for a specific known set of...
A checksum is computed over 4 bytes with values 200, 150, 100, and 50...
What is the checksum for a file whose total byte sum is 4096 using...
A hash function is defined as hash(x) = (7x + 2) % 13. What is...
Using the division method hash function h(k) = k mod 97, what index...
Two different messages can produce the same CRC value, meaning...
A network message arrives with bytes 0x4A, 0x2F, and 0x11. The XOR...
Which of the following correctly illustrate the modular multiplication...
Convert the 16-bit binary number 1010111100110101 to hexadecimal.
A hash table currently stores 75 keys across 100 available buckets....
Increasing the size of a hash table always eliminates all collisions.
What is the result of computing (15 multiplied by 8) % 7 using the...
What is 5432 % 17 when used as a raw hash computation?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!