class BIT_STRING
Summary
Class invariant
Overview
creation features
  • make (n: INTEGER_32)
    Make bit sequence of n bits.
  • from_string (model: STRING)
    Create or set Current using model which is supposed to be a sequence of mixed 0 or 1 characters.
exported features
Rotating and shifting:
Bitwise Logical Operators:
  • infix "and" (other: BIT_STRING): BIT_STRING
    Bitwise and of Current with other
  • infix "implies" (other: BIT_STRING): BIT_STRING
    Bitwise implication of Current with other
  • prefix "not": BIT_STRING
    Bitwise not of Current.
  • infix "or" (other: BIT_STRING): BIT_STRING
    Bitwise or of Current with other.
  • infix "xor" (other: BIT_STRING): BIT_STRING
    Bitwise xor of Current with other
  • and_mask (other: BIT_STRING)
    Apply bitwise and mask of other onto Current.
  • implies_mask (other: BIT_STRING)
    Aply bitwise implies mask of other.
  • or_mask (other: BIT_STRING)
    Apply bitwise or mask of other onto Current.
  • xor_mask (other: BIT_STRING)
    Apply bitwise xor mask of other onto Current
  • invert
    Invert Current bit-per-bit.
Conversions:
Others:
Other features:
count: INTEGER_32
writable attribute
Number of bits in the sequence.
lower: INTEGER_32
constant attribute
Minimum index.
upper: INTEGER_32
effective function
Maximum index.
is_empty: BOOLEAN
effective function
Is collection empty ?
See also count.
make (n: INTEGER_32)
effective procedure
Make bit sequence of n bits.
from_string (model: STRING)
effective procedure
Create or set Current using model which is supposed to be a sequence of mixed 0 or 1 characters.
valid_index (idx: INTEGER_32): BOOLEAN
effective function
True when index is valid (ie. inside actual bounds of the bit sequence).
item (idx: INTEGER_32): BOOLEAN
effective function
True if idx-th bit is 1, False otherwise.
first: BOOLEAN
effective function
The very first item.
last: BOOLEAN
effective function
The last item.
put (value: BOOLEAN, idx: INTEGER_32)
effective procedure
Set bit idx to 1 if value is True, 0 otherwise.
put_1 (idx: INTEGER_32)
effective procedure
Set bit idx to 1.
put_0 (idx: INTEGER_32)
effective procedure
Set bit idx to 0.
shift_by (n: INTEGER_32)
effective procedure
Shift n-bits.
shift_left_by (n: INTEGER_32)
effective procedure
Shift left by n bits.
shift_right_by (n: INTEGER_32)
effective procedure
Shift right by n bits.
rotate_by (n: INTEGER_32)
effective procedure
Rotate by n bits.
rotate_left_by (n: INTEGER_32)
effective procedure
Rotate left by n bits.
rotate_right_by (n: INTEGER_32)
effective procedure
Rotate right by n bits.
infix "^" (s: INTEGER_32): BIT_STRING
effective function
Sequence shifted by s positions (positive s shifts right, negative left; bits falling off the sequence's bounds are lost).
infix "|>>" (s: INTEGER_32): BIT_STRING
effective function
Sequence shifted right by s positions.
infix "|<<" (s: INTEGER_32): BIT_STRING
effective function
Sequence shifted left by s positions.
infix "#" (s: INTEGER_32): BIT_STRING
effective function
Sequence rotated by s positions (positive right, negative left).
infix "#>>" (s: INTEGER_32): BIT_STRING
effective function
Sequence rotated by s positions right.
infix "#<<" (s: INTEGER_32): BIT_STRING
effective function
Sequence rotated by s positions left.
infix "and" (other: BIT_STRING): BIT_STRING
effective function
Bitwise and of Current with other
infix "implies" (other: BIT_STRING): BIT_STRING
effective function
Bitwise implication of Current with other
prefix "not": BIT_STRING
effective function
Bitwise not of Current.
infix "or" (other: BIT_STRING): BIT_STRING
effective function
Bitwise or of Current with other.
infix "xor" (other: BIT_STRING): BIT_STRING
effective function
Bitwise xor of Current with other
and_mask (other: BIT_STRING)
effective procedure
Apply bitwise and mask of other onto Current.
implies_mask (other: BIT_STRING)
effective procedure
Aply bitwise implies mask of other.
or_mask (other: BIT_STRING)
effective procedure
Apply bitwise or mask of other onto Current.
xor_mask (other: BIT_STRING)
effective procedure
Apply bitwise xor mask of other onto Current
invert
effective procedure
Invert Current bit-per-bit.
to_string: STRING
effective function
String representation of bit sequence.
to_integer: INTEGER_32
effective function
The corresponding INTEGER value when count <= Integer_bits. No sign-extension when count < Integer_bits.
all_cleared: BOOLEAN
effective function
Are all bits set to 0?
all_default: BOOLEAN
effective function
Are all bits set to 0?
clear_all
effective procedure
Set all bits to 0
all_set: BOOLEAN
effective function
Are all bits set to 1?
set_all
effective procedure
Set all bits to 1
is_equal (other: BIT_STRING): BOOLEAN
effective function
Is other attached to an object considered equal to current object?
copy (other: BIT_STRING)
effective procedure
Update current object using fields of object attached to other, so as to yield equal objects.
out_in_tagged_out_memory
effective procedure
Append terse printable represention of current object in tagged_out_memory
append_in (str: STRING)
effective procedure
Append in str a viewable representation of Current.
set_from_string (model: STRING, offset: INTEGER_32)
effective procedure
Use the whole contents of model to reset range offset ..
get_new_iterator: ITERATOR[BOOLEAN]
effective function