Questions tagged [bit-strings]

Use this tag for questions related to array data structures that compactly store bits.

A bit string (also known as a bit array, bit map, bit set, or bit vector) is an array data structure that compactly stores bits. It can be used to implement a simple set data structure. A bit string is effective at exploiting bit-level parallelism in hardware to perform operations quickly.

A typical bit string stores kw bits, where w is the number of bits in the unit of storage, such as a byte or word, and k is some nonnegative integer. If w does not divide the number of bits to be stored, some space is wasted due to internal fragmentation.

196 questions
2
votes
1 answer

Any discernible pattern between two strings that are each XOR'd against a common string?

Given: three random strings that are of the same length - A, B, C RB = A xor B RC = A xor C Are there any discernible bit-string patterns to be found between the RB and RC strings? In other words .... If I hide A before showing you RB and RC - can…
CBruce
  • 135
  • 3
0
votes
0 answers

How many n-bit strings are unbalanced?

I am stuck on this question that i came across in my assignment. What does it mean by unbalanced string? I don't know the proper approach of solving this question How many n-bit strings are unbalanced?
Ruma
  • 11
0
votes
1 answer

In classical computing, what is meant by a bit string function?

What is exactly meant by this function? I haven't found any clarification how exactly this function works: $$f: \{0,1\}^n \rightarrow \{0,1\}^m$$ So it takes a n-bit string and turns it into an m-bit string but what is meant by a bit string and what…
mikanim
  • 109
0
votes
0 answers

What am I missing here? Basic Bit Operation

Consider the bit strings $A=001100$ and $B=010101$ then $A\vee B`= ? $ ($B`=$bitwise NOT) First I wrote $B`$ and get, $$B`= 101010$$ then I took first "$0$" of $A$ and "$1$" of $B`$ then get (1), $$A\vee B`=…
wave
  • 11
0
votes
3 answers

Enumeration of Binary Strings

Suppose we want to encode the natural numbers as bit strings as follows: 0 = λ // the empty string 1 = 0 2 = 1 3 = 00 4 = 01 5 = 10 6 = 11 7 = 000 8 = 001 9 = 010 10 = 011 11 = 100 12 = 101 13 = 110 14 = 111 15 = 0000 ... How can we calculate the…
kjmj
  • 101
-1
votes
2 answers

How many bit strings exist of length ten or less, not counting the empty string?

My understanding is that for bit string of length $n$ there are $2^n$ bit strings. So the sum of all bit strings of lengths $1$ to $10$ would be $2^1$+$2^2$+ ... +$2^{10}$ = $2^{55}$. The empty string is length $0$. The professor said the answer…