write a C program
for Q4-5 Q6
Write a function to convert a 2's complement 32 bit integer to a string of '1's and '0's in 2's complement form: void integer2Bits(char bitString[], int a); The integer is passed in the second argument, and the caller provides a string which is passed via the first argument and is where the bit string is stored (in "natural" form as in 3 above). Don't forget to terminate the string with NULL. Write a C program that reads an integer, converts it to a bit string using the function you wrote in 3 above, prints the string, and converts the string back to the integer using the function you wrote in 4 above. For example: where the output number (45) is the result of the conversion of the bit string. Consider the code you've written in this assignment. How is it similar to the LC-3 assembler you wrote? How similar is it to the programming you've done in previous courses? Write a function to convert a 2's complement 32 bit integer to a string of '1's and '0's in 2's complement form: void integer2Bits(char bitString[], int a); The integer is passed in the second argument, and the caller provides a string which is passed via the first argument and is where the bit string is stored (in "natural" form as in 3 above). Don't forget to terminate the string with NULL. Write a C program that reads an integer, converts it to a bit string using the function you wrote in 3 above, prints the string, and converts the string back to the integer using the function you wrote in 4 above. For example: where the output number (45) is the result of the conversion of the bit string. Consider the code you've written in this assignment. How is it similar to the LC-3 assembler you wrote? How similar is it to the programming you've done in previous courses