amitk3553 Posted December 6, 2013 Report Share Posted December 6, 2013 Hello, I have to perform xor operation between two following numbers Numbers unsigned int a; unsigned int b; Result a xor_reduce b; Is it possible as in above or some other way? Regards cam Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted December 6, 2013 Report Share Posted December 6, 2013 Cam, I have to perform xor operation between two following numbers Numbers unsigned int a; unsigned int b; Result a xor_reduce b; Why do you call the operation "xor reduce"? A bitwise "xor" operation has the same number of bits as its operands.Have you tried the (C++) operator "xor"? unsigned int a = 42; unsigned int b = 21; unsigned int c = (a xor ; // or in short notation (a ^ An "xor reduce" operation as provided by the SystemC datatypes would be defined on a single operand and return a single bit after applying the "xor" bit by bit. This is not defined for the built-in C++ datatypes.hth, Philipp amitk3553 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.