一千萬個為什麽

搜索

將10位ISBN轉換為13位ISBN的公式是什麽?



我沒有在這裏看到這個問題,所以我想我會問,如果有人有公式將10位ISBN轉換為13位數字的ISBN,反之亦然。我知道有幾個網站提供轉換功能,例如來自Bowker的 ISBN.org 和一些有宏的電子表格,但有人可能會找到有用的公式。

轉載註明原文: 將10位ISBN轉換為13位ISBN的公式是什麽?

一共有 1 個回答:

Wikipedia gives it as

  1. 從最後刪除ISBN 10校驗碼
  2. 將978添加到前面
  3. 將ISBN-13校驗碼添加到最後

The check digit is calculated as per Wikipedia

  1. Take each digit as an element in in an array x_ i.e. the ith digit i the ISBN is x_i e.g. x4 is the 4th digit.
  2. Multiply the even digits by 3 and sum these.
  3. add these to the sum of the odd digits
  4. find the remainder mod 10
  5. subtract from 10 (you have a number 1-10)
  6. This is the result as a number between 1 and 10, unless the figure is 10 then the result is 0

    x_13 = (10 - (x_1 + 3x_2 + x_3 + 3x_4 + ... + x_11 + 3x_12) mod10 ) mod 10