精彩Gray code

时间:2014-04-10 04:30:37
【文件属性】:

文件名称:精彩Gray code

文件大小:24KB

文件格式:DOC

更新时间:2014-04-10 04:30:37

Gray code

Gray code is an interesting code sequence and has many applications in computer science.No matter you have known it before or not, here are some introductions about its features: (1) Gray code has 2^n unique elements; (2) Each element contains n digits of O or l; (3) Each pair of adjacent elements has exactly one different digit. For example, when n = 2, one of the gray code sequences is: 00,01,11,10. Now, the task is quite simple, given a positive integer n, generate the corresponding Gray code sequence


网友评论