我正在学习 Udacity 课程,并且在其中一堂课(https://www.youtube.com/watch?v=gPQ-g8xkIAQ&feature=player_embedded)中,教授给出的功能high_common_bits
(从讲座中逐字提取)看起来像这在伪代码中:
function high_common_bits(a,b):
return:
- high order bits that a+b in common
- highest differing bit set
- all remaining bits clear
举个例子:
a = 10101
b = 10011
high_common_bits(a,b) => 10100
然后他说这个函数用于高度优化的尝试实现。有谁碰巧知道他指的是哪个确切的实现?