Question: Write in c++ code: 1- Read two unsigned numbers and pass it to a function that returns the number of bit positions that these two
Write in c++ code:
1- Read two unsigned numbers and pass it to a function that returns the number of bit positions that these two numbers do not have the same value. Display both numbers (in binary) and your program should show the locations that the numbers are different. For example, if one number is 5 and the other number is 9 Output should be: The numbers are different in 2 bit positions. 5: 00000000101 9: 00000001001 00000001100 The last line shows in which bit positions the two numbers are different. Hamming distance Error correction
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
