Answer
procedure bitcount $($ string: a bit string consisting of $1$s and $0$s)
count $:= 0$
Split string into a set of characters $c_1, c_2, c_3, ... c_n$
for $i:=1$ to $n$
$\space\space\space$if $c_i$ is equal to $1$
$\space\space\space$$\space\space\space$count $:=$ count + $1$
return count
Work Step by Step
This algorithm attempts to count the number of $1$s in a bit string. It does this by first splitting the string into a set of characters and then individually checking if each character is a $1$ or not. If it is, it increments $1$ to the counter. It then returns the counter, representing the number of $1$s encountered.