faisaldj
Newbie level 5
Can somebody elaborate the If condition in this sample code
I try to debug it and everytime getting
00000000
or
00000001
but could not interpret the logic.
////////////////////////////// Code ////////////////////////
phase _buff is 8 bit.
unsigned char phase_buff=0x60;
for (b = 0; b < 9; b++)
{
if ( ( phase_buff[a] >> (7 - b) ) & 1 ) {
{
do_something;
}
}
regards,
faisal.
I try to debug it and everytime getting
00000000
or
00000001
but could not interpret the logic.
////////////////////////////// Code ////////////////////////
phase _buff is 8 bit.
unsigned char phase_buff=0x60;
for (b = 0; b < 9; b++)
{
if ( ( phase_buff[a] >> (7 - b) ) & 1 ) {
{
do_something;
}
}
regards,
faisal.