Arrowspace
Banned
![Full Member level 3](/styles/images/ranks/elevel3.gif)
Code:
#define set_bit(x,y) (x=x|(1<<y))
#define clr_bit(x,y) (x=x|(0<<y))
I am trying to set single bit and clearing it, my set function is working, but clear function is not working.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#define set_bit(x,y) (x=x|(1<<y))
#define clr_bit(x,y) (x=x|(0<<y))
#define set_bit(x,y) (x |= 1 << y)
#define clr_bit(x,y) (x &= ~(1 << y))
#define toogle_bit(x,y) (x ^= 1 << y )
#define read_bit(x,y) ((x>> y) & 1 )
#define clr_bit(x,y) (x=x|(0<<y))