eexuke
Full Member level 4
Hi all,
If I have a sequence of binary bits such as "00001010111",how can I detect the position of the first "1" in the fifth position from left during hardware implementation?
One way is continuous "OR" the adjacent bits until a "1" is got. e.g forth"0" | fifth "1" = 1,so I know the first one is at position five. However,I don't think that is an efficient way. Can anybody give me some advice on how to deal with such situation?
Many thanks in advance!
If I have a sequence of binary bits such as "00001010111",how can I detect the position of the first "1" in the fifth position from left during hardware implementation?
One way is continuous "OR" the adjacent bits until a "1" is got. e.g forth"0" | fifth "1" = 1,so I know the first one is at position five. However,I don't think that is an efficient way. Can anybody give me some advice on how to deal with such situation?
Many thanks in advance!