Hi,
I wish to compare partial bits of two one dimensional vectors. I know how to compare the two vectors completely.
int main () {
std::vector<int> vector1;
std::vector<int> vector2;
int out;
vector1.push_back(100);
vector2.push_back(101);
vector1 == vector2 ? out = 0 : out = 1;
printf("out = %d \n", out);
return 0;
}
But i do not know how to compare partial bits.
For example:
Vector 1 = 0100
vector2 = 100
i wish to find whether vector 1 and vector 2 are equal or not such that the first bit of vector1 is ignored for comparison.
How can i modify my above code to do so?
Thanks