BVEC
Binary Vector Representation of Signed Integers
BVEC
is a Python library which
demonstrates how signed integers can be stored as
binary vectors, and arithmetic can be performed on them.
Licensing:
The computer code and data files made available on this
web page are distributed under
the GNU LGPL license.
Languages:
BVEC is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
Source Code:
-
bvec_add.py,
adds two binary vectors.
-
bvec_complement2.py,
returns the complement of a binary vector.
-
bvec_mul.py,
multiplies two binary vectors.
-
bvec_next.py,
returns the next binary vector.
-
bvec_next_grlex.py,
returns the next binary vector in GRLEX order.
-
bvec_print.py,
prints a binary vector.
-
bvec_sub.py,
subtracts two binary vectors.
-
bvec_to_i4.py,
converts a (signed) binary vector to an integer.
-
bvec_uniform.py,
returns a random BVEC.
-
i4_to_bvec.py,
converts an I4 to a (signed) binary vector.
-
i4_uniform_ab.py,
returns a random I4 in a given range.
-
timestamp.py,
returns the current YMDHMS date as a timestamp.
Not converted yet:
Examples and Tests:
You can go up one level to
the Python source codes.
Last revised on 01 January 2015.