Sums each row of a table as bit values.
ROWBITS(a)
a |
- |
A multi-column series of ones and zeros. |
A single column series of the same length as the input. Each value of the series is the bit sum of the input rows.
W1: {{0, 0, 0, 0},
{0, 0, 0, 1},
{0, 0, 1, 0},
{0, 0, 1, 1},
{1, 1, 0, 0}}
W2: rowbits(w1)
W1 contains a 5x4 table of values where each value is a 1 or a 0. Each row is considered a 4 bit binary value where the MSB is the first column.
W2 contains the series {0, 1, 2, 3, 12}, the bit values of each row of W1.
W1: int(rand(3, 10) * 100) > 50
W2: rowbits(w1)
W1 contains a random 3x10 table of values where each value is a 1 or a 0. Each row is considered a 10 bit binary value where the MSB is the first column.
W2 contains the series of bit values of each row of W1.
ROWBITS assumes each row contains bit value of 1 or 0 where the first column is the MSB.
Any number of columns can be processed, each row of an N column series represents an N bit value.