51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 4084|回复: 1
打印 上一主题 下一主题

[求助] 关于IMEI的CD的算法...

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-3-13 11:04:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
谁能帮助阐述一下手机IMEI的check digit(CD)的计算方法
有英文的但是没有看懂
Computation of CD from the IMEI proceeds as follows:

Step 1: Double the values of the odd labelled digits D1, D3, D5 ... D13 of the IMEI.

Step 2: Add together the individual digits of all the seven numbers obtained in Step 1, and then add this sum to
the sum of all the even labelled digits D2, D4, D6 ... D14 of the IMEI.

Step 3: If the number obtained in Step 2 ends in 0, then set CD to be 0. If the number obtained in Step 2 does not
end in 0, then set CD to be that number subtracted from the next higher number which does end in 0.

Example of computation
IMEI (14 most significant digits):
                               TAC      FAC                SNR
D14 D13 D12 D11 D10 D9   D8 D7   D6 D5 D4 D3 D2 D1
2    6      0      5    3    1     7   9    3    1   1   3   8   3
Step 1:
2  6 0 5 3 1 7 9 3 1 1 3 8 3
   x2  x2  x2   x2   x2  x2 x2
   12  10   2   18    2   6   6
Step 2:
2 + 1 + 2 + 0 + 1 + 0 + 3 + 2 + 7 + 1 + 8 + 3 + 2 + 1 + 6 + 8 + 6 = 53
Step 3:
CD = 60 - 53 = 7
例子里面的step 2是怎么得来的?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2007-3-13 14:19:04 | 只看该作者
Step 2: Add together the individual digits of all the seven numbers obtained in Step 1, and then add this sum to
the sum of all the even labelled digits D2, D4, D6 ... D14 of the IMEI

我大概把这句话翻译一下。
把第一步中得到的所有七个数字累加起来,注意是individual digits,也就是说凡是两位数的数字要把十位和个位分开累加,比如是12,那么就是1+2。得到这个和以后,再把这个和与先前标记为D2,D4,D6的数字累加。

D14 D13 D12 D11 D10 D9   D8 D7   D6 D5 D4 D3 D2 D1
2    6      0      5    3    1     7   9    3    1   1   3   8   3
Step 1:
2  6 0 5 3 1 7 9 3 1 1 3 8 3
   x2  x2  x2   x2   x2  x2 x2
   12  10   2   18    2   6   6
Step 2:
2 + 1 + 2 + 0 + 1 + 0 + 3 + 2 + 7 + 1 + 8 + 3 + 2 + 1 + 6 + 8 + 6 = 53
Step 3:
CD = 60 - 53 = 7

从右到左,6是D1的3X2,8是D2,依此类推,到D7的时候,应该是9X2=18,所以分开1+8,后面凡是涉及到两位数的都是如此。楼主一看便知。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-20 00:40 , Processed in 0.070795 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表