bit-vector-and

Returns the bitwise AND of two bit vectors.  The two vectors need not be the same size; the shorter vector is brought up to the length of the longer vector by virtually padding the shorter vector with bits set to pad1 or pad2.

let bv1 = as(<bit-vector>, #(1, 1));
let bv2 = as(<bit-vector>, #(1, 1, 1, 0));
bit-vector-and(bv1, bv2, pad1: 1);
⇒ #(1, 1, 1, 0)

Exported from

Arguments

vector1An instance of <bit-vector>.
vector2An instance of <bit-vector>.
pad1:An instance of <bit>, used if needed to expand the effective size of vector1.  The default is 0.
pad2:An instance of <bit>, used if needed to expand the effective size of vector2.  The default is 0.

Values

resultAn instance of <bit-vector>.
padAn instance of <bit>.  Any bits past the size of result would have this value.
The bit-vector module.
A vector that contains <bit>s.
An integer with a value of 0 or 1.