% and function and or function
function [out] = show_terms_abcx(terms)

terms1 = terms+1;
last_term = terms1(size(terms1,2));

nnew = 0;
fx = zeros(1,8);

a = logical([0 1]);
b = logical([0 1]);
c = logical([0 1]);

ln = 0;
tn = 1;
for ia = 1:2
    for ib = 1:2
        for ic = 1:2
            ln = ln + 1;
            if ln <= last_term
                if terms1(tn) == ln
                    fx(ln) = 1;
                    tn = tn + 1;
                end
            end
            a_in(ln) = a(ia);
            b_in(ln) = b(ib);
            c_in(ln) = c(ic);
        end
    end
end

% - rearrange into columns
a_in = a_in';
b_in = b_in';
c_in = c_in';
fx = fx';

% - display input and output
out = [a_in b_in c_in fx];

