1-4 1. List the bitwise operators available in C and provide a brief description
ID: 3902029 • Letter: 1
Question
1-4 1. List the bitwise operators available in C and provide a brief description. Jim has declared an integer in his program called "motor_speed". Explain what is meant by "&motor;_speed". 2. (a) What pin on our microcontroller is used to access bit 2 of Port A? (b) Jim is thinking of connecting an extra LED to pin 99 of our microcontroller. What port resource(s) will he need to light it? 3. 4. Jim wants to "toggle" (i.e., complement or invert) only bits 7 and 3 of Port G. a. Show how to accomplish this using a function from the Peripheral Library b. Show how to do this using the special function register (SFR) LATGINV c. Show how to do this using only LATG andservariables or constants as needed.Explanation / Answer
1. The following are the bitwise operators available in C :
2. motor_speed is an integer variable which is allocated some space in the computer memory . Now , since it is an integer variable it will occupy 4 bytes in the memory. &motor_speed is the address of this variable ,or more precisely it is the address of the 1st byte of the 4 bytes of the integer variable.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.