85 : ((floor(v / pow(2, b)) % 2) == t);
110 : ((v == 0) && (bv >= pow(2, w))) ?
empty_lst
111 : ((v % 2) > 0) ? concat(
binary_i2v(floor(v/2), w, bv*2), 1)
201 : ((v1 + v2) == 0) ? 0
202 : (((v1 % 2) > 0) && ((v2 % 2) > 0)) ?
203 binary_and(floor(v1/2), floor(v2/2), bv*2) + bv
222 : ((v1 + v2) == 0) ? 0
223 : (((v1 % 2) > 0) || ((v2 % 2) > 0)) ?
224 binary_or(floor(v1/2), floor(v2/2), bv*2) + bv
225 :
binary_or(floor(v1/2), floor(v2/2), bv*2);
243 : ((v1 + v2) == 0) ? 0
244 : (((v1 % 2) > 0) != ((v2 % 2) > 0)) ?
245 binary_xor(floor(v1/2), floor(v2/2), bv*2) + bv
264 : ((v == 0) && (bv >= pow(2, w))) ? 0
294 : ((v % 2) > 0) ?
binary_ishl(floor(v/2), s, bm, bv*2) + bv
empty_lst
<list> A list with no values (the empty list).
function binary_and(v1, v2, bv=1)
Base-2 binary AND operation for integers.
function binary_iw2i(v, s, w)
Decode the binary bits of a bit window to an integer value.
function binary_xor(v1, v2, bv=1)
Base-2 binary XOR operation for integers.
function binary_i2s(v, w=1)
Encode an integer value as a binary string of bits.
function binary_bit_is(v, b, t=1)
Test if a binary bit position of an integer value equals a test bit.
function binary_ishl(v, s=1, bm=1, bv=1)
Base-2 binary left-shift operation for an integer.
function binary_i2v(v, w=1, bv=1)
Encode an integer value as a binary list of bits.
function binary_v2i(v)
Decode a binary list of bits to an integer value.
function binary_ishr(v, s=1)
Base-2 binary right-shift operation for an integer.
function binary_not(v, w=1, bv=1)
Base-2 binary NOT operation for an integer.
function binary_or(v1, v2, bv=1)
Base-2 binary OR operation for integers.
function binary_s2i(v)
Decode a binary string of bits to an integer value.
function first(v)
Return the first element of an iterable value.
function tailn(v, n=1)
Return a list containing all but the first n elements of an iterable value.
function is_empty(v)
Test if an iterable value is empty.
function all_oneof(v, cv)
Test if all elements of an iterable value equal one of the comparison values.
function strl(v)
Convert a list of values to a concatenated string.
function is_integer(v)
Test if a value is an integer.