1. the function that assigns to each nonnegative integer its last digit

2. the function that assigns to a bit string the number of one bits in a string