1. The followingCcode shifts u16_k to the left for each 0 bit present in u16_j. Convert this to PIC24 assembly code. You may want to convert the for loop structure to a while loop structure.
uint16_t u16_i,u16_j,u16_k;
u16_k = 1; // initialize k
for (u16_i = 0; u16_i != 16; u16_i++) { // do for 16 bits
if ((u16_j & 0x0001) == 0) {
u16_k = u16_k
}
u16_j = u16_j >> 1; // look at the next bit
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here