Find the domain and range of these functions. Note that in each case, to find the domain, determine the set of elements assigned values by the function.
- the function that assigns to each bit string the number of ones in the string minus the number of zeros in the string
- the function that assigns to each bit string twice the number of zeros in that string
- the function that assigns the number of bits left over when a bit string is split into bytes (which are blocks of 8 bits)
- the function that assigns to each positive integer the largest perfect square not exceeding this integer