public int get(int from, int to) {
    	if(bits == null)
    		throw new IllegalStateException();
    	int dec = 0;
    	int pow = 1;
    	for(int i = from; i <= to; i++) {
    		dec += bits[i] * pow;
    		pow *= 2;
    	}
    	return dec;
    }