I don't understand what the third line is trying to accomplish. I just recently learned bit-wise operators. It would be great if someone could walk me though the last two lines. I understand shift operator but i.t.o the shift operator I'm not entirely sure of what it means.
void create(uint8_t bInt[], int64_t num){
for (int pos = 0; pos < 32; pos++){
bInt[pos] = (num & mask) ? 1 : 0;
mask = mask << 1;
}
}
For this assignment, we're using 32-element array of uint8_t values to represent 32 bit integers. For example, the integer 84193 in binary is 0....0001 0100 1000 1110 0001. In bInt[], it would be stored as 1000 0111 0001 0010 1000 0000....0. Thank you for your time