Bit operation
#6

Fixed it.
Код:
 
new some_var;
new bit_pos_to_turn_on = 15;
some_var |= (1 << bit_pos_to_turn_on);

printf((some_var & (1 << bit_pos_to_turn_on)) ? ("pass") : ("fail"));
anyway thanks to all
Reply


Messages In This Thread
Bit operation - by RakeDW - 15.09.2018, 18:50
Re: Bit operation - by RakeDW - 17.09.2018, 15:24
Re: Bit operation - by Grim_ - 17.09.2018, 17:44
Re: Bit operation - by Dayrion - 17.09.2018, 17:51
Re: Bit operation - by NaS - 17.09.2018, 17:51
Re: Bit operation - by RakeDW - 17.09.2018, 21:12

Forum Jump:


Users browsing this thread: 1 Guest(s)