Question: c++ I need help figuring out how to do this program. I have no idea where to start. The Hamming distance between two strings of
c++ I need help figuring out how to do this program. I have no idea where to start.
The Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. Write a program to determine how many different bits are present, given the two hexadecimal strings of length 8. Each hex digit can be represented as four bits. For example, A in base 16 is equivalent to 1010 in base 2 and 8 in base 16 is equivalent to 1000 in base 2. The resulting Hamming distance between the two hex strings A and 8 would be 1. Input from the keyboard two hexadecimal strings of length 8 separated by a space. Assume valid hexadecimal numbers. Output the Hamming distance between each of the two hexadecimal strings.
Use the STL string class in C++. Do not use C style strings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
