Parameters Used: number: It is the value that is to be tested for CountLeadingZeros.
Return Value: It returns the number of leading zero bits in the 32-bit binary representation of the given number.
Example 1: When a positive number is passed as a parameter.
Output : 29
Example 2: When a negative number is passed as a parameter.
Output : 0
Example 3: When zero is passed as a parameter.
Output : 32
- Google Chrome 1 and above
- Internet Explorer 3 and above
- Firefox 1 and above
- Opera 3 and above
- Safari 1 and above