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

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!