NGHỆ THUẬT
LÀM ĐẸP VÀ SỨC KHỎE
THỦ CÔNG
VĂN HÓA VÀ LỊCH SỬ
GIẢI TRÍ
MÔI TRƯỜNG
THỰC PHẨM VÀ ĐỒ UỐNG
KỸ THUẬT NGƯỢC
KHOA HỌC
THỂ THAO
CÔNG NGHỆ
THIẾT BỊ ĐEO
Check Digit
Mark

Tạo bởi

Mark

21. tháng Tám 2026FI
0
0
0
0
0

Check Digit

Hamming codes correct errors made by machines. Check digits catch errors made by PEOPLE, and people fail in a very particular way: they mistype a single digit, or they swap two adjacent digits. A check digit is one extra digit appended to a number, computed so that both of those mistakes make the arithmetic fail. The Luhn formula — double every second digit from the right, add the digits of the doubled results, and require the total to be a multiple of ten — is on every bank card in your wallet. Hans Peter Luhn patented it at IBM in 1960 and it was placed in the public domain. It corrects nothing, its overhead is one digit, and it stops a wrong number from ever reaching the system.
Cơ bản
45 minutes

Hướng dẫn

1

Find out how people actually mistype

Design the check around the real error, not an imagined one.

  1. Read a list of twenty 16-digit numbers aloud while a partner writes them down.
  2. Compare against the originals and classify every mistake.
  3. Tally: single wrong digits, swapped neighbours, everything else.
Single-digit errors and adjacent transpositions will dominate — studies of transcription put them together at the large majority of all mistakes. Random bit flips, which Hamming codes are built for, do not appear at all. Different error source, different code.

Vật liệu cho bước này:

Graph PaperGraph Paper1 pad
Graphite Pencil SetGraphite Pencil Set1 bộ
2

Compute a Luhn check digit

Four steps, all mental arithmetic.

  1. Starting from the RIGHT of the number, double every second digit.
  2. If a doubled result exceeds 9, add its two digits together.
  3. Sum everything.
  4. The check digit is whatever makes that total a multiple of 10.
Work through 7992739871 by hand — the check digit is 3, giving 79927398713. Verify by running the whole thing through the same process and confirming the total ends in zero.

Vật liệu cho bước này:

Cardstock Assorted Pack (50 Sheets)Cardstock Assorted Pack (50 Sheets)1 gói
3

Attack it with the two errors it targets

Test the claim rather than accepting it.

  1. Take your valid number and change ONE digit. Re-check. It fails.
  2. Repeat for every position, one digit at a time.
  3. Now SWAP two adjacent digits and re-check.
  4. Try the swap 0 and 9 specifically.
Every single-digit change is caught. Almost every adjacent swap is caught — but 0 and 9 next to each other slips through, because doubling 0 gives 0 and doubling 9 gives 18 which reduces to 9, so the sum is unchanged. That is a known, documented hole in the Luhn formula, not a mistake in your working.
4

Compare the three error strategies

Put the family side by side and price each one.

  1. Tabulate overhead: parity 1 bit per block, Hamming several bits per block, Luhn one digit per number.
  2. Tabulate capability: parity detects one error, Hamming corrects one, Luhn detects the human ones.
  3. Ask of each: what happens when the check fails?
The last question is the real divider. Hamming must repair the data because there is no one to ask. Luhn can simply refuse and say "check that number" — a human is standing right there. When retransmission is free, detection beats correction, and it costs a fraction as much.
5

History and context

Hans Peter Luhn, a researcher at IBM, filed the patent in 1954; US 2,950,048 was granted in 1960 and placed in the public domain, which is a large part of why it became universal. Luhn is an interesting figure — he also did foundational work in information retrieval, and the KWIC index is his.

Where you meet it daily: every payment card number ends in a Luhn check digit, which is why a mistyped card is rejected instantly by the web page rather than after a round trip to the bank. IMEI numbers on phones use it. National identification numbers in several countries use it.

Its relatives are chosen for their own error profiles. The ISBN-10 used weights 1 to 10 and a modulo-11 check, which catches ALL adjacent transpositions including 0-9 — at the cost of sometimes needing the check character X, which is exactly why ISBNs occasionally end in an X. ISBN-13 moved to a modulo-10 scheme to align with the barcode system, deliberately giving up that completeness for compatibility. Each design is a specific answer to "which mistakes must never get through, and what may we pay for that?"

What to take from it: before choosing an error-handling approach, characterise the errors. The catalogue holds several — parity, Hamming, check digits, and the retransmission request that needs no code at all — and the right one follows entirely from who or what is making the mistakes and whether anyone can be asked to try again.

Vật liệu

3

Blueprint liên quan

Các blueprint này chia sẻ kiến thức — kỹ thuật, vật liệu hoặc nguyên tắc

CC0 Phạm vi công cộng

Bản thiết kế này được phát hành theo CC0. Bạn tự do sao chép, sửa đổi, phân phối và sử dụng cho bất kỳ mục đích nào mà không cần xin phép.

Hỗ trợ nhà sáng tạo bằng cách mua sản phẩm qua bản thiết kế, nơi họ nhận Hoa hồng nhà sáng tạo do nhà bán hàng đặt, hoặc tạo phiên bản mới và kết nối trong bản thiết kế riêng để chia sẻ doanh thu.

Thảo luận

(0)

Đăng nhập để tham gia thảo luận

Đang tải bình luận...