Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include stm321476xx.h unsigned int a,b,c; float x=3.0; int main () { I/ declare pointer to the floating point number x char *ptr =( char *
\#include "stm321476xx.h" unsigned int a,b,c; float x=3.0; int main () \{ I/ declare pointer to the floating point number x char *ptr =( char * )8x; 1/ set bits 15 and 14 of variable a to 01 leaving all other bits unchanged a= exffffffff; 1/ reset bits 16 and 15 of b to b=000018000 I/ replace byte 1 of variable b with the value 0x80 leaving the other bytes unchanged // shift right variable b by 4 bits, what is the resulting value? // shift left variable b by 3 bits, what is the resulting value? I/ obtain the 1s complement of c c=8155; I/ obtain the 2s complement of c c=08555; // toggle the 16th bit of bOON and OFF while (1) \{ \} I/ Determine the address pointed to by ptr[3] I/ Explain the following operation ptr[3]=080; I/ Explain the following operation (ptr+2)=880; return ; \}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started