Electronic Systems programming - C Compiler

Job ID: 34773485

Budget: €8 – €30 EUR

1) Write a program that does the following;
• Place a comment at the start of the program stating how many bits you’re assuming are in an
integer.
• Reads in an integer from the keyboard and displays it in hex.
• Clears the upper 4 bits but leaves the lower bits unchanged.
• Sets the LSB (least significant bit) and displays the result in hex
• Toggles bit 1 (remember bit numbering starts at 0) and displays it in hex.


2) a) Write a program that counts from 10 to 0, displaying the numbers.
b) Now modify it so that it sums up the numbers from 5 to 10 and displays the result.