hi, i am trying to write a simulation for a very simple ALU and am having trouble with the AND/OR operations. I want to AND/OR integers bit wise with the two integers being passed to a function in hex form and the result returned in hex form so :
int ANDoperation(0x0011, 0x0101)
would return: 0x0001.
iv tried to turn the int's into strings, compare them, then convert the result to int and return that but was having problems with that.
any help is appreciated