0

I am trying to figure out the difference between a bit array and a bit vector.

When browsing the web I find conflicting information.

Some sources claim that a bit array is simply an array with 1s and 0s in each index.

E.g.

{0,1,0,0,0,1}

And some sources claim that a bit vector is some sort of array that can have for example one nibble in each cell.

{0001,0010,0000,0011}

Does this mean that the terms bit vector and bit array are the same and that they come in multiple forms or is it just that they are different data structures?

1 Answer 1

0

A bit vector only contains bit's, like (1,0,1).

A bit array may be able to contain a single bit...not sure, but I think I would use it only if each element contained more than one bit, like ([1,1],[0,1],[1,0]).

So the difference is, if there are elements in the collection that have 2 or more binary digits(01..) I would call it an array, otherwise bit vector.

so a bit array is an array filled with bit vectors. :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.