count_ones

count_ones(x::Integer) -> Integer

Number of ones in the binary representation of x.

julia> count_ones(7)
3

Examples

See Also

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: