asked 153k views
4 votes
Sometimes integers are encoded by using four-digit binary expansions to represent each decimal digit. this produces the binary coded decimal form of the integer. for instance, 791 is encoded in this way by 011110010001. how many bits are required to represent a number with n decimal digits using this type of encoding

1 Answer

4 votes
You're wasting a whole lot of possible 'space' in that encoding solution, but the answer is 4n.

Related questions

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.