[Solved] Which one of the following operations returns the first occurrence of bit 1 in bit arrays?

Which one of the following operations returns the first occurrence of bit 1 in bit arrays?

a) Find First Zero
b) Find First One
c) Counting lead Zeroes
d) Counting lead One

Answer: b
Explanation: Find First One operation returns the first occurrence of bit 1 in the bit array. Find First Zero operation returns the first occurrence of bit 0 in the bit array. If the most significant bit in bit array is 1, then count lead zeroes operation returns the number of zeroes present before the most significant bit. If the most significant bit in bit array is 0, then the count lead one returns the number of ones present before the most significant bit.

Comments