- or download this
## Define a bit vector with positions 4 to 7 set to 1
my $bv1='';
...
$pos++;
}
}
- or download this
sub sumbv
{
return $_[0] | $_[1];
}
- or download this
sub cmpbv
{
return $_[0] & $_[1];
}
- or download this
use strict;
use warnings;
...
}
}
- or download this
00011110 bv1
00111000 bv2
--------
00111110 OR
00011000 AND