--- layout: stdlib-reference --- # firstbitlow ## Description Find first set bit starting at low bit and working up. ## Signature
uint firstbitlow<T>(T value) where T : __BuiltinIntegerType; vector<uint, N> firstbitlow<T, int N>(vector<T, N> value) where T : __BuiltinIntegerType;## Generic Parameters #### T: [\_\_BuiltinIntegerType](../interfaces/0_builtinintegertype-029g/index.html) #### N : int ## Parameters #### value : [T](firstbitlow.html#typeparam-T) The value to find set bits in. #### value : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> The value to find set bits in. ## Return value The bit index number of the least significant set bit, or all ones (-1 when interpretted as signed) if value is 0. ## Remarks For SPIR-V, this function maps to GLSL extended instruction FindILsb. ## Availability and Requirements Defined for the following targets: #### hlsl Available in all stages. #### glsl Available in all stages. #### cpp Available in all stages. #### cuda Available in all stages. #### metal Available in all stages. #### wgsl Available in all stages. #### spirv Available in all stages. #### llvm Available in all stages.