how to return bitwise?

Status
Not open for further replies.

theVoidOne

Solid State Member
Messages
19
im working in c and this is what i have to do:
1. int bit_and(int a, int b):
Allowed operators: + | ~ ^ << ! >>
This function should return the bitwise AND of the a and b parameters (a & b).
i dont really understand the difference between bitwise and int, isnt int just a form of bitwise? can u enlighten me on this? and if u can do this function for me, that would great
 
We can't do your homework for you, this is in our rules. Bitwise operators are a group of operators and not in any way like an int (which would be an operand).

EDIT: I have to say that this is an amazingly easy question, it is a one line function and most of the answer is written into the question.
 
Status
Not open for further replies.
Back
Top Bottom