Question
#include #include int main() { unsigned int M1, M2; unsigned int NUM =1457654 ; // Put your NUM here int j, k; system(dir); printf( xx
#include
#include
int main()
{
unsigned int M1, M2;
unsigned int NUM =1457654 ; // Put your NUM here
int j, k;
system("dir");
printf(" xx = %d ", (NUM % 255) & 0xfe);
for (j=0; j<10; j++) {
// Generate pseudo-random 'info' bits
M1 = (NUM * (j+2)) ^ NUM;
// Reduce the number of bits in data and set LSB to zero
M2 = M1 & 0xffff;
M1 >>= 16;
M1 += M2;
M1 &= 0xfffe;
// START mystery block -----------------------------
M2 = M1;
for (k=15; k>0; k--)
M2 = M2 ^ (M1 >> k);
M2 = M2 & 1;
// END mystery block -------------------------------
M1 = M1 | M2;
printf("0x%x ",M1);
}
return 0;
}
.
.
.
.
.
.what is the purpose of the code in the "mystery block" or in other words ,what is the value calculated in M2
this is a c code ,run the program.in the code there is a section i added comments to saying beginning of mystery box and end of mystery box.now the code inbetween im trying to understand what the purpose of that code is in the entire program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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