Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 52 results for
bitarray
- Page 1
Understanding byte.Max/MinValue
Programming
Software Development
8 Years Ago
by Suzie999
… byt = byte.MaxValue;
BitArray
bitArray
= new
BitArray
(byt); Debug.WriteLine("
bitarray
" +
bitArray
.Get(0).ToString()); Debug.WriteLine("
bitarray
" +
bitArray
.Get(5).ToString()); What… the opposite of what I got, which was the following.
bitarray
False
bitarray
False I thought `byte byt = byte.MaxValue` would set…
Re: Understanding byte.Max/MinValue
Programming
Software Development
8 Years Ago
by nullptr
As ddanbe pointed out, the byte value is being converted to an integer -
BitArray
(int32). Effectively what you have written is:
BitArray
bitArray
= new
BitArray
(255); 255 bits all set to 0 (false).
Re: Understanding byte.Max/MinValue
Programming
Software Development
8 Years Ago
by Suzie999
Thanks guys, I think I have it. If I want a
BitArray
containing 8 bits I use `
BitArray
bitArray
= new
BitArray
(8);`
Re: Understanding byte.Max/MinValue
Programming
Software Development
8 Years Ago
by ddanbe
A
BitArray
looks a bit(haha) confusing at first. Internally real bits are stored, externally you get booleans back. It is some sort of wrapper class to make working with bitwise operators "simpler". It will all clear out after reading [this](http://www.dotnetperls.com/
bitarray
) I hope.
Re: Understanding byte.Max/MinValue
Programming
Software Development
8 Years Ago
by Suzie999
Thank's ddanbe but your link leads to a
BitArray
(int32), I'm passing a byte. To me it does not make sense that MaxValue should have all its bits set to false.
Re: Understanding byte.Max/MinValue
Programming
Software Development
8 Years Ago
by Suzie999
After reading somewhere that the
BitArray
class actually contains an int array, I decided it might …
How to convert image to binary and get result in text box
Programming
Software Development
7 Years Ago
by _1_14
….Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
BitArray
bitarray
= new
BitArray
(ms.ToArray()); foreach (bool item in
bitarray
) { arr[i] = item; i++; } return arr…
Troubles with Threading
Programming
Software Development
15 Years Ago
by jrscribner
… String = RemoteIpEndPoint.Address.ToString Dim BitDet As
BitArray
'Dim Command As String BitDet = New
BitArray
(receiveBytes) Dim strReturnData As String = System.Text…
Finding large (2,000,000th) prime.
Programming
Software Development
13 Years Ago
by nwhitesel
… i = 2; i < limit; i++) { primeNumbers[i] = true; } //
BitArray
primeNumbers = new
BitArray
(limit, true); primeNumbers[0] = false; primeNumbers[1] = false; for…
character to unicode
Programming
Software Development
13 Years Ago
by whitelion_pc
…()); byte[] bytes = new Byte[byteCount]; bytes= unicode.GetBytes(character);
BitArray
bits = new
BitArray
( bytes ); System.Collections.IEnumerator bit_enumerator = bits.GetEnumerator(); int bit_array_length…
Issues with function
Programming
Software Development
11 Years Ago
by dreday92
…") { for (int index = 0; index < PatternSize; index++) { OperandArray
bitArray
[index] = '0'; } } else { for (int index = 0; index < PatternSize…
Re: Issues with function
Programming
Software Development
11 Years Ago
by dreday92
… == '0') { for (int index = 0; index < PatternSize; index++) { OperandArray
bitArray
[index] = '0'; } } else { for (int index = 0; index < PatternSize…
Re: Issues with function
Programming
Software Development
11 Years Ago
by NathanOliver
… == '0') { for (int index = 0; index < PatternSize; index++) { OperandArray
bitArray
[index] = '0'; } } else { for (int index = 0; index < PatternSize…
Writing Bits with c#
Programming
Software Development
14 Years Ago
by alaamido
… a simple problem which is writing bits I used the
bitarray
class but there is a problem is that when I…
First C# attempt is failing
Programming
Software Development
13 Years Ago
by shindu
… class which generates a Board type struct, that was a
BitArray
but due to this on going issue has sence been…
Write unsigned char array to a file
Programming
Software Development
12 Years Ago
by cableguy31
…(int k = 0; k < bits; k++) { myfile <<
bitArray
[k]; } myfile << "\n"; // Adds new line…
Simple Solution, much confusion
Programming
Software Development
11 Years Ago
by dreday92
… BitPattern Operation_ADD (const BitPattern&, bool&) const; private: OperandArray
bitArray
; // the array of 1s and 0s representing bits int BinaryExp…
Re: Read registers from PLC and check bits
Programming
Software Development
12 Years Ago
by nick.crane
… 32bit integer to bit array var bits = new System.Collections.
BitArray
(new[] { read[i] }); Console.Write(string.Format("Register… could also put all the registers in to a single
BitArray
. But remember that the LSB is index 0. [CODE]… // put all bits in
BitArray
(remember LSB is index 0) var allbits = new System.…
Re: Boolean Combinations
Programming
Software Development
14 Years Ago
by ChrisPadgham
…. this is achieved in .NET with a
BitArray
. In the example below I have set values…"" Dim Int1 As Int32 Dim test As New
BitArray
(9, False) test.Item(1) = True test.Item…End Sub Public Function BinToInt(ByVal BAin As
BitArray
, ByVal BAdigits As Int16) As Int16 Dim …
Re: Read from comma separated file and put into MySQL
Programming
Software Development
13 Years Ago
by N1GHTS
… this: [code] unsigned int N = 23604408; // the binary number int
BitArray
[32]; int t = 0; for (;t<32;t…++)
BitArray
[t] = ((N & (1 << t)) > 0) ? 1 : … bit individually by testing for 1 or 0 in [b]
BitArray
[n][/b]. If you need to be more memory efficient…
Re: Bits manipulation - Modified Huffman
Programming
Software Development
13 Years Ago
by suncica2222
… like it suits my needs,so I've put
bitarray
.h and
bitarray
.cpp into project I've passed bitmap data field… when i comment some if's in PutBits() implementation in
bitarray
.cpp (debug PutBits() and see for yourself) in bit_array_c class…
Re: Algorithmic challenge
Programming
Software Development
9 Years Ago
by Gribouillis
… pip install bistring UMAX = 2 ** 16 a =
BitArray
(length=UMAX) z =
BitArray
(length=1) s = "Hel\0lo world" for c…
Re: Sieve of Erastothenes simply with nested loops
Programming
Software Development
8 Years Ago
by Gribouillis
… could be achieved by using a
bitarray
structure from module [
bitarray
](https://pypi.python.org/pypi/
bitarray
/) (1 bit per boolean value), but…
Re: Create byte array
Programming
Software Development
12 Years Ago
by Gribouillis
There is also a
bitarray
type in pypi [url]http://pypi.python.org/pypi/
bitarray
[/url]
Re: Creating binary matrix in openCV
Programming
Software Development
11 Years Ago
by Ancient Dragon
… b2:2; // bit 1 // etc for 8 bits } struct bits
bitArray
[8]; With the above structure you can set/clear bits… by using the bit name instead of shifting. Example: `
bitArray
[0].b1 = 1; // set bit 0`
Re: convert string[] to byte[]
Programming
Software Development
14 Years Ago
by checho
… doesnt seem to work for me [CODE] string[] result = MergeElements(
bitArray
); foreach (string str in result) Console.Write(str + " "…
Re: Prime number generator, and button arrays help!
Programming
Software Development
13 Years Ago
by Jimingle10
…; var maxSqRt = Math.Sqrt(max); var eliminated = new System.Collections.
BitArray
(max + 1); // Two is a given prime so we label…
Re: Boolean problem.
Programming
Software Development
13 Years Ago
by nick.crane
If you have several flags that need to be reset you might considered using a
BitArray
. This has as SetAll method that will set all to flags to true or false. The only problem with this is having to keep track of which index corresponds to which flag.
Re: Signed and Unsigned int in python
Programming
Software Development
13 Years Ago
by woooee
….1]bitbuffer[/URL] and [URL=http://michael.dipperstein.com/bitlibs/]
bitarray
[/URL], Also, check [URL=http://pypi.python.org/pypi]PyPi…
Re: bit operations and testing for exponent of two
Programming
Software Development
10 Years Ago
by TrustyTony
Python has sets use those or there is module https://pypi.python.org/pypi/
bitarray
/ I will look your code later in home, if somebody does not review it before that.
1
2
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC