<s>
A	O
bit	B-Data_Structure
array	I-Data_Structure
(	O
also	O
known	O
as	O
bitmask	O
,	O
bit	O
map	O
,	O
bit	O
set	O
,	O
bit	B-Data_Structure
string	I-Data_Structure
,	O
or	O
bit	B-Data_Structure
vector	I-Data_Structure
)	O
is	O
an	O
array	B-Data_Structure
data	I-Data_Structure
structure	I-Data_Structure
that	O
compactly	O
stores	O
bits	O
.	O
</s>
<s>
A	O
bit	B-Data_Structure
array	I-Data_Structure
is	O
effective	O
at	O
exploiting	O
bit-level	B-Operating_System
parallelism	I-Operating_System
in	O
hardware	O
to	O
perform	O
operations	O
quickly	O
.	O
</s>
<s>
A	O
typical	O
bit	B-Data_Structure
array	I-Data_Structure
stores	O
kw	O
bits	O
,	O
where	O
w	O
is	O
the	O
number	O
of	O
bits	O
in	O
the	O
unit	O
of	O
storage	O
,	O
such	O
as	O
a	O
byte	B-Application
or	O
word	O
,	O
and	O
k	O
is	O
some	O
nonnegative	O
integer	O
.	O
</s>
<s>
If	O
w	O
does	O
not	O
divide	O
the	O
number	O
of	O
bits	O
to	O
be	O
stored	O
,	O
some	O
space	O
is	O
wasted	O
due	O
to	O
internal	B-Architecture
fragmentation	I-Architecture
.	O
</s>
<s>
A	O
bit	B-Data_Structure
array	I-Data_Structure
is	O
a	O
mapping	O
from	O
some	O
domain	O
(	O
almost	O
always	O
a	O
range	O
of	O
integers	O
)	O
to	O
values	O
in	O
the	O
set	O
{	O
0	O
,	O
1}	O
.	O
</s>
<s>
Assuming	O
its	O
size	O
(	O
or	O
length	O
)	O
to	O
be	O
n	O
bits	O
,	O
the	O
array	O
can	O
be	O
used	O
to	O
specify	O
a	O
subset	O
of	O
the	O
domain	O
(	O
e.g.	O
</s>
<s>
A	O
finite	O
binary	O
relation	O
may	O
be	O
represented	O
by	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
called	O
a	O
logical	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
Given	O
two	O
bit	B-Data_Structure
arrays	I-Data_Structure
of	O
the	O
same	O
size	O
representing	O
sets	O
,	O
we	O
can	O
compute	O
their	O
union	O
,	O
intersection	O
,	O
and	O
set-theoretic	O
difference	O
using	O
n/w	O
simple	O
bit	O
operations	O
each	O
(	O
2n/w	O
for	O
difference	O
)	O
,	O
as	O
well	O
as	O
the	O
complement	O
of	O
either	O
:	O
</s>
<s>
If	O
we	O
wish	O
to	O
iterate	O
through	O
the	O
bits	O
of	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
,	O
we	O
can	O
do	O
this	O
efficiently	O
using	O
a	O
doubly	O
nested	O
loop	O
that	O
loops	O
through	O
each	O
word	O
,	O
one	O
at	O
a	O
time	O
.	O
</s>
<s>
Both	O
of	O
these	O
code	O
samples	O
exhibit	O
ideal	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
,	O
which	O
will	O
subsequently	O
receive	O
large	O
performance	O
boost	B-Language
from	O
a	O
data	B-General_Concept
cache	I-General_Concept
.	O
</s>
<s>
If	O
we	O
wish	O
to	O
find	O
the	O
number	O
of	O
1	O
bits	O
in	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
,	O
sometimes	O
called	O
the	O
population	O
count	O
or	O
Hamming	O
weight	O
,	O
there	O
are	O
efficient	O
branch-free	O
algorithms	O
that	O
can	O
compute	O
the	O
number	O
of	O
bits	O
in	O
a	O
word	O
using	O
a	O
series	O
of	O
simple	O
bit	O
operations	O
.	O
</s>
<s>
The	O
find	B-Algorithm
first	I-Algorithm
set	I-Algorithm
or	O
find	B-Algorithm
first	I-Algorithm
one	I-Algorithm
operation	O
identifies	O
the	O
index	O
or	O
position	O
of	O
the	O
1-bit	O
with	O
the	O
smallest	O
index	O
in	O
an	O
array	O
,	O
and	O
has	O
widespread	O
hardware	O
support	O
(	O
for	O
arrays	O
not	O
larger	O
than	O
a	O
word	O
)	O
and	O
efficient	O
algorithms	O
for	O
its	O
computation	O
.	O
</s>
<s>
When	O
a	O
priority	B-Application
queue	I-Application
is	O
stored	O
in	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
,	O
find	B-Algorithm
first	I-Algorithm
one	I-Algorithm
can	O
be	O
used	O
to	O
identify	O
the	O
highest	O
priority	O
element	O
in	O
the	O
queue	O
.	O
</s>
<s>
To	O
expand	O
a	O
word-size	O
find	B-Algorithm
first	I-Algorithm
one	I-Algorithm
to	O
longer	O
arrays	O
,	O
one	O
can	O
find	O
the	O
first	O
nonzero	O
word	O
and	O
then	O
run	O
find	B-Algorithm
first	I-Algorithm
one	I-Algorithm
on	O
that	O
word	O
.	O
</s>
<s>
The	O
related	O
operations	O
find	B-Algorithm
first	I-Algorithm
zero	I-Algorithm
,	O
count	O
leading	O
zeros	O
,	O
count	O
leading	O
ones	O
,	O
count	O
trailing	O
zeros	O
,	O
count	O
trailing	O
ones	O
,	O
and	O
log	O
base	O
2	O
(	O
see	O
find	B-Algorithm
first	I-Algorithm
set	I-Algorithm
)	O
can	O
also	O
be	O
extended	O
to	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
in	O
a	O
straightforward	O
manner	O
.	O
</s>
<s>
A	O
bit	B-Data_Structure
array	I-Data_Structure
is	O
the	O
most	O
dense	O
storage	O
for	O
"	O
random	O
"	O
bits	O
,	O
that	O
is	O
,	O
where	O
each	O
bit	O
is	O
equally	O
likely	O
to	O
be	O
0	O
or	O
1	O
,	O
and	O
each	O
one	O
is	O
independent	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
data	O
of	O
a	O
typical	O
fax	O
image	O
is	O
not	O
random	O
and	O
can	O
be	O
compressed	B-General_Concept
.	O
</s>
<s>
Run-length	B-Algorithm
encoding	I-Algorithm
is	O
commonly	O
used	O
to	O
compress	O
these	O
long	O
streams	O
.	O
</s>
<s>
However	O
,	O
most	O
compressed	B-General_Concept
data	I-General_Concept
formats	O
are	O
not	O
so	O
easy	O
to	O
access	O
randomly	O
;	O
also	O
by	O
compressing	O
bit	B-Data_Structure
arrays	I-Data_Structure
too	O
aggressively	O
we	O
run	O
the	O
risk	O
of	O
losing	O
the	O
benefits	O
due	O
to	O
bit-level	B-Operating_System
parallelism	I-Operating_System
(	O
vectorization	B-Application
)	O
.	O
</s>
<s>
Thus	O
,	O
instead	O
of	O
compressing	O
bit	B-Data_Structure
arrays	I-Data_Structure
as	O
streams	O
of	O
bits	O
,	O
we	O
might	O
compress	O
them	O
as	O
streams	O
of	O
bytes	B-Application
or	O
words	O
(	O
see	O
Bitmap	B-Data_Structure
index	I-Data_Structure
(	O
compression	O
)	O
)	O
.	O
</s>
<s>
Bit	B-Data_Structure
arrays	I-Data_Structure
,	O
despite	O
their	O
simplicity	O
,	O
have	O
a	O
number	O
of	O
marked	O
advantages	O
over	O
other	O
data	O
structures	O
for	O
the	O
same	O
problems	O
:	O
</s>
<s>
Because	O
of	O
their	O
ability	O
to	O
exploit	O
bit-level	B-Operating_System
parallelism	I-Operating_System
,	O
limit	O
memory	O
access	O
,	O
and	O
maximally	O
use	O
the	O
data	B-General_Concept
cache	I-General_Concept
,	O
they	O
often	O
outperform	O
many	O
other	O
data	O
structures	O
on	O
practical	O
data	O
sets	O
,	O
even	O
those	O
that	O
are	O
more	O
asymptotically	O
efficient	O
.	O
</s>
<s>
However	O
,	O
bit	B-Data_Structure
arrays	I-Data_Structure
are	O
n't	O
the	O
solution	O
to	O
everything	O
.	O
</s>
<s>
For	O
such	O
applications	O
,	O
compressed	B-General_Concept
bit	B-Data_Structure
arrays	I-Data_Structure
,	O
Judy	B-Data_Structure
arrays	I-Data_Structure
,	O
tries	B-General_Concept
,	O
or	O
even	O
Bloom	B-Algorithm
filters	I-Algorithm
should	O
be	O
considered	O
instead	O
.	O
</s>
<s>
If	O
random	O
access	O
is	O
more	O
common	O
than	O
sequential	O
and	O
the	O
array	O
is	O
relatively	O
small	O
,	O
a	O
byte	B-Application
array	O
may	O
be	O
preferable	O
on	O
a	O
machine	O
with	O
byte	B-Application
addressing	O
.	O
</s>
<s>
Because	O
of	O
their	O
compactness	O
,	O
bit	B-Data_Structure
arrays	I-Data_Structure
have	O
a	O
number	O
of	O
applications	O
in	O
areas	O
where	O
space	O
or	O
efficiency	O
is	O
at	O
a	O
premium	O
.	O
</s>
<s>
Bit	B-Data_Structure
arrays	I-Data_Structure
are	O
used	O
for	O
priority	B-Application
queues	I-Application
,	O
where	O
the	O
bit	O
at	O
index	O
k	O
is	O
set	O
if	O
and	O
only	O
if	O
k	O
is	O
in	O
the	O
queue	O
;	O
this	O
data	O
structure	O
is	O
used	O
,	O
for	O
example	O
,	O
by	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
and	O
benefits	O
strongly	O
from	O
a	O
find-first-zero	O
operation	O
in	O
hardware	O
.	O
</s>
<s>
Bit	B-Data_Structure
arrays	I-Data_Structure
can	O
be	O
used	O
for	O
the	O
allocation	O
of	O
memory	B-General_Concept
pages	I-General_Concept
,	O
inodes	B-Application
,	O
disk	O
sectors	O
,	O
etc	O
.	O
</s>
<s>
However	O
,	O
this	O
term	O
is	O
frequently	O
used	O
to	O
refer	O
to	O
raster	B-Algorithm
images	I-Algorithm
,	O
which	O
may	O
use	O
multiple	O
bits	O
per	O
pixel	O
.	O
</s>
<s>
Another	O
application	O
of	O
bit	B-Data_Structure
arrays	I-Data_Structure
is	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
a	O
probabilistic	O
set	O
data	O
structure	O
that	O
can	O
store	O
large	O
sets	O
in	O
a	O
small	O
space	O
in	O
exchange	O
for	O
a	O
small	O
probability	O
of	O
error	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
build	O
probabilistic	O
hash	B-Algorithm
tables	I-Algorithm
based	O
on	O
bit	B-Data_Structure
arrays	I-Data_Structure
that	O
accept	O
either	O
false	O
positives	O
or	O
false	O
negatives	O
.	O
</s>
<s>
Bit	B-Data_Structure
arrays	I-Data_Structure
and	O
the	O
operations	O
on	O
them	O
are	O
also	O
important	O
for	O
constructing	O
succinct	B-Data_Structure
data	I-Data_Structure
structures	I-Data_Structure
,	O
which	O
use	O
close	O
to	O
the	O
minimum	O
possible	O
space	O
.	O
</s>
<s>
Bit	B-Data_Structure
arrays	I-Data_Structure
are	O
also	O
a	O
useful	O
abstraction	O
for	O
examining	O
streams	O
of	O
compressed	B-General_Concept
data	I-General_Concept
,	O
which	O
often	O
contain	O
elements	O
that	O
occupy	O
portions	O
of	O
bytes	B-Application
or	O
are	O
not	O
byte-aligned	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
compressed	B-General_Concept
Huffman	B-General_Concept
coding	I-General_Concept
representation	O
of	O
a	O
single	O
8-bit	O
character	O
can	O
be	O
anywhere	O
from	O
1	O
to	O
255	O
bits	O
long	O
.	O
</s>
<s>
In	O
information	B-Library
retrieval	I-Library
,	O
bit	B-Data_Structure
arrays	I-Data_Structure
are	O
a	O
good	O
representation	O
for	O
the	O
posting	O
lists	O
of	O
very	O
frequent	O
terms	O
.	O
</s>
<s>
If	O
we	O
compute	O
the	O
gaps	O
between	O
adjacent	O
values	O
in	O
a	O
list	O
of	O
strictly	O
increasing	O
integers	O
and	O
encode	O
them	O
using	O
unary	B-Algorithm
coding	I-Algorithm
,	O
the	O
result	O
is	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
with	O
a	O
1	O
bit	O
in	O
the	O
nth	O
position	O
if	O
and	O
only	O
if	O
n	O
is	O
in	O
the	O
list	O
.	O
</s>
<s>
This	O
is	O
also	O
the	O
special	O
case	O
of	O
Golomb	B-Algorithm
coding	I-Algorithm
where	O
the	O
parameter	O
M	O
is	O
1	O
;	O
this	O
parameter	O
is	O
only	O
normally	O
selected	O
when	O
,	O
or	O
roughly	O
the	O
term	O
occurs	O
in	O
at	O
least	O
38%	O
of	O
documents	O
.	O
</s>
<s>
The	O
APL	B-Language
programming	I-Language
language	I-Language
fully	O
supports	O
bit	B-Data_Structure
arrays	I-Data_Structure
of	O
arbitrary	O
shape	O
and	O
size	O
as	O
a	O
Boolean	O
datatype	O
distinct	O
from	O
integers	O
.	O
</s>
<s>
All	O
major	O
implementations	O
(	O
Dyalog	O
APL	B-Language
,	O
APL2	O
,	O
APL	B-Language
Next	O
,	O
NARS2000	O
,	O
Gnu	O
APL	B-Language
,	O
etc	O
.	O
)	O
</s>
<s>
Bits	O
may	O
be	O
accessed	O
individually	O
via	O
the	O
usual	O
indexing	O
notation	O
(	O
A[3]	O
)	O
as	O
well	O
as	O
through	O
all	O
of	O
the	O
usual	O
primitive	O
functions	O
and	O
operators	O
where	O
they	O
are	O
often	O
operated	O
on	O
using	O
a	O
special	O
case	O
algorithm	O
such	O
as	O
summing	O
the	O
bits	O
via	O
a	O
table	O
lookup	O
of	O
bytes	B-Application
.	O
</s>
<s>
The	O
C	B-Language
programming	I-Language
language	I-Language
's	O
bit	O
fields	O
,	O
pseudo-objects	O
found	O
in	O
structs	O
with	O
size	O
equal	O
to	O
some	O
number	O
of	O
bits	O
,	O
are	O
in	O
fact	O
small	O
bit	B-Data_Structure
arrays	I-Data_Structure
;	O
they	O
are	O
limited	O
in	O
that	O
they	O
cannot	O
span	O
words	O
.	O
</s>
<s>
Although	O
they	O
give	O
a	O
convenient	O
syntax	O
,	O
the	O
bits	O
are	O
still	O
accessed	O
using	O
bytewise	O
operators	O
on	O
most	O
machines	O
,	O
and	O
they	O
can	O
only	O
be	O
defined	O
statically	O
(	O
like	O
C	B-Language
's	O
static	O
arrays	O
,	O
their	O
sizes	O
are	O
fixed	O
at	O
compile-time	O
)	O
.	O
</s>
<s>
It	O
is	O
also	O
a	O
common	O
idiom	O
for	O
C	B-Language
programmers	O
to	O
use	O
words	O
as	O
small	O
bit	B-Data_Structure
arrays	I-Data_Structure
and	O
access	O
bits	O
of	O
them	O
using	O
bit	O
operators	O
.	O
</s>
<s>
A	O
widely	O
available	O
header	O
file	O
included	O
in	O
the	O
X11	B-Operating_System
system	O
,	O
xtrapbits.h	O
,	O
is	O
“	O
a	O
portable	O
way	O
for	O
systems	O
to	O
define	O
bit	O
field	O
manipulation	O
of	O
arrays	O
of	O
bits.	O
”	O
A	O
more	O
explanatory	O
description	O
of	O
aforementioned	O
approach	O
can	O
be	O
found	O
in	O
the	O
.	O
</s>
<s>
In	O
C++	B-Language
,	O
although	O
individual	O
bools	O
typically	O
occupy	O
the	O
same	O
space	O
as	O
a	O
byte	B-Application
or	O
an	O
integer	O
,	O
the	O
STL	B-Application
type	O
vectorxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1	O
is	O
a	O
partial	B-Language
template	I-Language
specialization	I-Language
in	O
which	O
bits	O
are	O
packed	O
as	O
a	O
space	O
efficiency	O
optimization	O
.	O
</s>
<s>
Since	O
bytes	B-Application
(	O
and	O
not	O
bits	O
)	O
are	O
the	O
smallest	O
addressable	O
unit	O
in	O
C++	B-Language
,	O
the	O
 [  ] 	O
operator	O
does	O
not	O
return	O
a	O
reference	O
to	O
an	O
element	O
,	O
but	O
instead	O
returns	O
a	O
proxy	O
reference	O
.	O
</s>
<s>
This	O
might	O
seem	O
a	O
minor	O
point	O
,	O
but	O
it	O
means	O
that	O
vectorxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1	O
is	O
generally	O
discouraged	O
.	O
</s>
<s>
Another	O
unique	O
STL	B-Application
class	O
,	O
bitset	B-Data_Structure
,	O
creates	O
a	O
vector	O
of	O
bits	O
fixed	O
at	O
a	O
particular	O
size	O
at	O
compile-time	O
,	O
and	O
in	O
its	O
interface	O
and	O
syntax	O
more	O
resembles	O
the	O
idiomatic	O
use	O
of	O
words	O
as	O
bit	O
sets	O
by	O
C	B-Language
programmers	O
.	O
</s>
<s>
The	O
Boost	B-Language
C++	I-Language
Libraries	I-Language
provide	O
a	O
dynamic_bitset	O
class	O
whose	O
size	O
is	O
specified	O
at	O
run-time	O
.	O
</s>
<s>
The	O
D	B-Application
programming	I-Application
language	I-Application
provides	O
bit	B-Data_Structure
arrays	I-Data_Structure
in	O
its	O
standard	O
library	O
,	O
Phobos	O
,	O
in	O
std.bitmanip	O
.	O
</s>
<s>
As	O
in	O
C++	B-Language
,	O
the	O
 [  ] 	O
operator	O
does	O
not	O
return	O
a	O
reference	O
,	O
since	O
individual	O
bits	O
are	O
not	O
directly	O
addressable	O
on	O
most	O
hardware	O
,	O
but	O
instead	O
returns	O
a	O
bool	O
.	O
</s>
<s>
In	O
Java	B-Language
,	O
the	O
class	O
creates	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
that	O
is	O
then	O
manipulated	O
with	O
functions	O
named	O
after	O
bitwise	O
operators	O
familiar	O
to	O
C	B-Language
programmers	O
.	O
</s>
<s>
Unlike	O
the	O
bitset	B-Data_Structure
in	O
C++	B-Language
,	O
the	O
Java	B-Language
BitSet	B-Data_Structure
does	O
not	O
have	O
a	O
"	O
size	O
"	O
state	O
(	O
it	O
has	O
an	O
effectively	O
infinite	O
size	O
,	O
initialized	O
with	O
0	O
bits	O
)	O
;	O
a	O
bit	O
can	O
be	O
set	O
or	O
tested	O
at	O
any	O
index	O
.	O
</s>
<s>
In	O
addition	O
,	O
there	O
is	O
a	O
class	O
,	O
which	O
represents	O
a	O
Set	O
of	O
values	O
of	O
an	O
enumerated	B-Language
type	I-Language
internally	O
as	O
a	O
bit	B-Data_Structure
vector	I-Data_Structure
,	O
as	O
a	O
safer	O
alternative	O
to	O
bit	O
fields	O
.	O
</s>
<s>
The	O
.NET	B-Application
Framework	I-Application
supplies	O
a	O
BitArray	O
collection	O
class	O
.	O
</s>
<s>
Although	O
Standard	B-Language
ML	I-Language
has	O
no	O
support	O
for	O
bit	B-Data_Structure
arrays	I-Data_Structure
,	O
Standard	B-Language
ML	I-Language
of	O
New	O
Jersey	O
has	O
an	O
extension	O
,	O
the	O
BitArray	O
structure	O
,	O
in	O
its	O
SML/NJ	O
Library	O
.	O
</s>
<s>
Haskell	B-Language
likewise	O
currently	O
lacks	O
standard	O
support	O
for	O
bitwise	O
operations	O
,	O
but	O
both	O
GHC	B-Application
and	O
Hugs	O
provide	O
a	O
Data.Bits	O
module	O
with	O
assorted	O
bitwise	O
functions	O
and	O
operators	O
,	O
including	O
shift	O
and	O
rotate	O
operations	O
and	O
an	O
"	O
unboxed	O
"	O
array	O
over	O
boolean	O
values	O
may	O
be	O
used	O
to	O
model	O
a	O
Bit	B-Data_Structure
array	I-Data_Structure
,	O
although	O
this	O
lacks	O
support	O
from	O
the	O
former	O
module	O
.	O
</s>
<s>
In	O
Perl	B-Language
,	O
strings	O
can	O
be	O
used	O
as	O
expandable	O
bit	B-Data_Structure
arrays	I-Data_Structure
.	O
</s>
<s>
In	O
Ruby	B-Language
,	O
you	O
can	O
access	O
(	O
but	O
not	O
set	O
)	O
a	O
bit	O
of	O
an	O
integer	O
(	O
Fixnum	O
or	O
Bignum	O
)	O
using	O
the	O
bracket	O
operator	O
( []	O
)	O
,	O
as	O
if	O
it	O
were	O
an	O
array	O
of	O
bits	O
.	O
</s>
<s>
Apple	O
's	O
Core	B-Operating_System
Foundation	I-Operating_System
library	O
contains	O
and	O
structures	O
.	O
</s>
<s>
PL/I	B-Language
supports	O
arrays	O
of	O
bit	B-Data_Structure
strings	I-Data_Structure
of	O
arbitrary	O
length	O
,	O
which	O
may	O
be	O
either	O
fixed-length	O
or	O
varying	O
.	O
</s>
<s>
The	O
array	B-Data_Structure
elements	I-Data_Structure
may	O
be	O
aligned	O
each	O
element	O
begins	O
on	O
a	O
byte	B-Application
or	O
word	O
boundary	O
or	O
unaligned	O
elements	O
immediately	O
follow	O
each	O
other	O
with	O
no	O
padding	O
.	O
</s>
<s>
PL/pgSQL	B-Language
and	O
PostgreSQL	O
's	O
SQL	O
support	O
bit	B-Data_Structure
strings	I-Data_Structure
as	O
native	O
type	O
.	O
</s>
<s>
Hardware	O
description	O
languages	O
such	O
as	O
VHDL	B-Language
,	O
Verilog	B-Language
,	O
and	O
SystemVerilog	B-Language
natively	O
support	O
bit	B-Data_Structure
vectors	I-Data_Structure
as	O
these	O
are	O
used	O
to	O
model	O
storage	O
elements	O
like	O
flip-flops	B-General_Concept
,	O
hardware	O
busses	O
and	O
hardware	O
signals	O
in	O
general	O
.	O
</s>
<s>
In	O
hardware	O
verification	O
languages	O
such	O
as	O
OpenVera	B-Language
,	O
e	B-Language
and	O
SystemVerilog	B-Language
,	O
bit	B-Data_Structure
vectors	I-Data_Structure
are	O
used	O
to	O
sample	O
values	O
from	O
the	O
hardware	O
models	O
,	O
and	O
to	O
represent	O
data	O
that	O
is	O
transferred	O
to	O
hardware	O
during	O
simulations	O
.	O
</s>
<s>
Common	B-Language
Lisp	I-Language
provides	O
a	O
one-dimensional	O
bit-vector	O
implementation	O
as	O
a	O
special	O
case	O
of	O
the	O
built-in	O
array	O
,	O
acting	O
in	O
a	O
dual	O
capacity	O
as	O
a	O
class	O
and	O
a	O
type	O
specifier	O
.	O
</s>
<s>
Being	O
a	O
derivative	O
of	O
the	O
array	O
,	O
it	O
relies	O
on	O
the	O
general	O
make-array	O
function	O
to	O
be	O
configured	O
with	O
an	O
element	O
type	O
of	O
bit	O
,	O
which	O
optionally	O
permits	O
the	O
bit	B-Data_Structure
vector	I-Data_Structure
to	O
be	O
designated	O
as	O
dynamically	O
resizable	O
.	O
</s>
<s>
Bit	B-Data_Structure
vectors	I-Data_Structure
are	O
represented	O
as	O
,	O
and	O
can	O
be	O
constructed	O
in	O
a	O
more	O
concise	O
fashion	O
by	O
,	O
the	O
reader	O
macro	O
#*bits	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
general	O
functions	O
applicable	O
to	O
all	O
arrays	O
,	O
dedicated	O
operations	O
exist	O
for	O
bit	B-Data_Structure
vectors	I-Data_Structure
.	O
</s>
