BSD Checksum Calculator
Enter text to compute its BSD sum-16 checksum.
Result
How it is calculated
The tool reads the text as bytes (UTF-8 for anything beyond plain ASCII) and keeps a 16-bit running value that starts at 0. For every byte it does two things: rotate the value right by one bit, so the lowest bit moves to the top, s = (s >> 1) + ((s & 1) << 15), and then add the byte and cut the result to 16 bits, s = (s + byte) & 0xFFFF. The final value is shown in decimal and in hexadecimal, together with the byte count. It matches the traditional BSD algorithm of the Unix sum command for the strings tested. Every character counts, including spaces and line breaks, and accented letters or emoji are several bytes. Empty text gives no result. It is a quick legacy check, not protection against tampering.
Worked example
For the text Hello the bytes are 72, 101, 108, 108, 111. Start at 0: rotating changes nothing and adding 72 gives 72. Next, 72 rotated is 36, plus 101 is 137. Then 137 is odd, so its low bit wraps to the top: 68 + 32768 = 32836, plus 108 is 32944. Rotating 32944 gives 16472, plus 108 is 16580. Finally 16580 rotated is 8290, plus 111 gives 8401. The tool shows 8401 (0x20D1) for 5 bytes.
Common mistakes
- Adding or dropping a space or line break. A trailing newline is one more byte and changes the checksum completely: Hello with a newline at the end gives a different value from Hello.
- Comparing with a file checksum when the text was typed in a form. A file with Windows line endings has two bytes per break and a typed text may have different breaks, so the byte counts can differ.
- Ignoring letter case. Hello and hello are different bytes and give different checksums.
- Expecting the same number as the CRC or other checksum algorithms. BSD sum-16, sum -s (System V), CRC-32 and MD5 are different algorithms with different results.
- Using it to prove a file was not altered on purpose. It is easy to make two different texts with the same value, so use SHA-256 for integrity against tampering.
About this calculator
The BSD checksum (sum-16) is the classic 16-bit checksum algorithm implemented by the traditional Unix sum command, computed with a simple rotate-and-add loop: for each byte of input, the running checksum is right-rotated by one bit (wrapping the low bit around to the high bit) and then added to that byte’s value, with the whole result kept within 16 bits throughout.
It predates and is much weaker than later checksums like CRC-32 or cryptographic hashes such as MD5 or SHA-256 — collisions are easy to construct and it offers no protection against deliberate tampering — but it remains present as the default algorithm behind the Unix/Linux sum utility for quick, legacy-compatible file integrity spot-checks. This calculator computes the BSD sum-16 of any input text and shows the result in both decimal and hexadecimal.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments