//************************************************************************************/
//
// invertBits
//
// Description:Accepts a pointer of size uint32_t and inverts
// Each bit of the input data passed
// Preconditions:input argument is passed as a pointer
// Postconditions:The inverted value is returned in the pointer
//
// Calls: N/A
// Called by: main
//
//***********************************************************************************/

void invertBits(uint32_t *intData)
//***********************************************************************************/
//
// writeinBinary
//
// Description: Prints the argument passed in Binary -for example if 15 is passed
// it will print 00000000000000000000000000001111
// Preconditions:
// Postconditions:
//
// Calls: N/A
// Called by: main
//
//***********************************************************************************/

void writeinBinary(uint32_t inData)
//***********************************************************************************/
//*
//* setBit
//*
//* Description: The function sets the bit in the specified bit position in an to the specifid value.
//* Preconditions: Value can be a 1 or 0. bitPosition will be between 0 and 31 (for integer size argument)
//* Postconditions: The bit of *inData at position biPosition will be set to value
//*
//* Calls: N/A
//* Called by: main
//*
//***********************************************************************************/

void setBit(uint32_t *inData, uint32_t bitPosition, uint32_t value)
//***********************************************************************************/
//* hammingDistance
//* Description: Function hammingDistance calculates total number of bits
//* that need to be inverted in order to change inData1 into inData2 or vice versa.
//* Preconditions: The function accepts two unsigned integers as input
//* Postconditions: The function returns the hamming distance
//*
// Calls: N/A
// Called by: main
//*
//***********************************************************************************/

int hammingDistance(uint32_t inData1, uint32_t inData2)
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.