Question: write C program for Q4 Write a function to convert a 2's complement 32 bit integer to a string of '1's and '0's in 2's

write C program for Q4  write C program for Q4 Write a function to convert a

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!