Q:

How to determine if a sequence of bits is positive or negative

I have 2 sets of values. Each is in the range of -15 to + 15 including 0.
I managed to represent two numbers in 8 bits. 4 of those bits may belong to a negative set the other 4 positive.
Whenever I read that sequence of bits I want to be able to determine if the initial 4 bits are + or -.
Is there a way to accomplish this using bitwise operations for both packing and unpacking? or another clever way?
thanks in advance.
Update: Here's at some extend a sample of what I'm trying to achieve:
out of those 31 values I need to represent only two, using 8 bits, say for example I have the numbers 14+ and 15+. They can be both positive or have one of each but they cannot be both negative. So 14 = 1110 and 15 = 1111 (Take all 0s out); bitsequence = 11101111
So when unpacking I know byte 239 = 11101111, actually represents numbers 14+ and 15+ respectively by parsing the bit sequence. However I'm having a hard time when either one of the numbers is negative. 

A:

You can do this really easily with a bitfield:
struct two_numbers
{
     signed char first : 4;
     signed char second : 4;
};

Then you can just compare to zero like normal:
two_numbers t = { 7, -5 };
if (t.first < 0 || t.second < 0) { ... }

Note, however, that a 4 bit field only allows values from -8 through 7, not -15 or 15.

