Lets say a = 0x6db7 and b = 0x736.How to compute a&b and a|b manually?
I am aware of bitwise operations,and I know this can be solved by converting a and b into it’s binary form and then bitwise operations and then again converting to hex,however what I am looking for is a solution that doesn’t involve too much of calculation without the interdemidiate binary conversion.
Is it possible ?
Those are bitwise
andand bitwiseor. To compute them manually, convert each number to binary, then compute the result. The result of anandwill be 1 if and only if the corresponding bits are set. The result of anorwill be 1 if the corresponding bits in either one or the other or both are set:After that, you normally want to convert the result back to some other base (e.g., hexadecimal).