Hi, I've read bitwise operators in C programming but I don't know yet how to work with them properly in C codes. ( I know the bitwise operator definitions, the rules of using them, also how they work in c)
My problem is, using the bitwise operators while coding which sometimes stuck me hours just for figuring out the proper idea beyond using bitwise operators!!,lets take an easy example and try to solving it together.
-----------------------------------------------------------------------------
I'm struggling in this question about half hour, which it simplifies to print "1" if the given number is multiple of 3, else printf "it's not multiple of 3". ( the solution must be by bitwise operators and shifting...not by arithmetic maths!) ; by the way- the question is just for understanding the bitwise operators && shifting, so it's not a homework or something!!
So how can I code this? I've no clue how to get started in coding this!
thanks in advance for your cooperation!