473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Information on Bit Arrays in C

Dear all,
I would like to learn regarding Bit arrays from basics up to
implementation level.Typically I am looking for understanding their
utility,their implications and how they are different from bit fields?
I searched in this group for some info but I am not finding the basic
stuff I am looking for.It would be helpful if some one can explain me
this or point me to some good links or books where I can learn
regarding Bit Arrays in C language.
In our project we extensively use it,since the code was written by some
one else whos not in touch with our co,I am jus trying to learn myself.
Looking farward for all your replys and advanced thanks for the same,
Regards,
s.subbarayan

Nov 15 '05 #1
2 1851

ssubbarayan wrote:
Dear all,
I would like to learn regarding Bit arrays from basics up to
implementation level.Typically I am looking for understanding their
utility,their implications and how they are different from bit fields?
I searched in this group for some info but I am not finding the basic
stuff I am looking for.It would be helpful if some one can explain me
this or point me to some good links or books where I can learn
regarding Bit Arrays in C language.
In our project we extensively use it,since the code was written by some
one else whos not in touch with our co,I am jus trying to learn myself.
Looking farward for all your replys and advanced thanks for the same,
Regards,
s.subbarayan

Read the book--C Unleashed,whose authors are often here.And enjoy it!

Nov 15 '05 #2
ssubbarayan wrote:
Dear all,
I would like to learn regarding Bit arrays from basics up to
implementation level.Typically I am looking for understanding their
utility,their implications and how they are different from bit fields?
Their utility really depends on the problem, but in general you can use
a bit array to represent a sequence of binary states.
The difference between bit arrays and bit fields depends on how the bit
array is implemented, but most bit arrays I have seen are implemented
using a dynamic array unsigned chars or integers. Given that a bit
array is resizable at runtime, while a struct with bit fields is not.
If you can enumerate the binary states at compile time than bit fields
may be useful (or just some boolean variables), if not then a bit array
is probably better. (Also bit fields are used for messing with the
binary representation of floats and other stuff - usually not
portable.)
I searched in this group for some info but I am not finding the basic
stuff I am looking for.It would be helpful if some one can explain me
this or point me to some good links or books where I can learn
regarding Bit Arrays in C language.
Maybe start here:
http://en.wikipedia.org/wiki/Bit_array
I think you will find many bit array implementations by googling a bit.
In our project we extensively use it,since the code was written by some
one else whos not in touch with our co,I am jus trying to learn myself.
Looking farward for all your replys and advanced thanks for the same,
Regards,
s.subbarayan


Good luck.

-Charlie

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
by: Dan | last post by:
Hello, I have trouble with class calling. I am calling getvolume() with succes in the function CreateCircle but it do not want to call it in ShowCircle() function. I am staying in the same...
5
by: JezB | last post by:
What's the easiest way to concatenate arrays ? For example, I want a list of files that match one of 3 search patterns, so I need something like DirectoryInfo ld = new DirectoryInfo(searchDir);...
0
by: John Salerno | last post by:
Ok, here's a diagram of the puzzle situation I was talking about before: http://www.johnjsal.com/program1/switches.jpg Now, one "switch" is two of those small columns of 10 boxes each (so there...
0
by: Markus Bertheau | last post by:
В Пнд, 02.08.2004, в 14:49, Federico Di Gregorio пишет: > On lun, 2004-08-02 at 14:30 +0200, Markus Bertheau wrote: > > Hi, > > > > I wonder if there is some kind of support for...
1
by: Rob Griffiths | last post by:
Can anyone explain to me the difference between an element type and a component type? In the java literature, arrays are said to have component types, whereas collections from the Collections...
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
22
by: Sandman | last post by:
So, I have this content management system I've developed myself. The system has a solid community part where members can register and then participate in forums, write weblogs and a ton of other...
2
by: kimi | last post by:
Hi ppl, I am new to PHP. I would need some information on the following: 1. a) I wanted to know from where the data is extracted and stroed in the global assocoative arrays ( specifically...
10
by: deciacco | last post by:
I'm writing a command line utility to move some files. I'm dealing with thousands of files and I was wondering if anyone had any suggestions. This is what I have currently: $arrayVirtualFile =...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.