There are several approaches to your problem which all have different degrees of generality and which are more or less complicated to implement.
(1) You could write an interpreter for expressions like
x1 And (Not x2) Or x3 And x4
which parses a string and performs the respective operations on your bit vector.
(2) You could write a similar interpreter which parses the string, but instead generates intermediate code that can perform the operations sequence on any arbitrary bitvector and which could be used multiple times without having to re-parse the input string.
(3) If you can live with specifying the expression as part of the code, you could write a simple set of macros called X1 .... X10, which extract the respective bit from the bit vector. Then you write code like
BOOL result = X1 && (!X2) || X3;
You should also think about how you want to represent the bit vector. In C++ you could use one of the pre-defined classes, but in C you are pretty much on your own. Will you have at most 32 bit variables? Then you could simply use an int or a long. For bit vectors of arbitrary length you need to implement a set of functions that work on arrays of ints or longs (or simply unsigned chars). You will certainly find some code for that in the internet, but it is also not very difficult to write that yourself.
So, decide on which way you want to pursue and if you have any more questions on the details, don't hesitate to ask.