What is ....

Roger Oberholtzer roger
Thu Feb 9 02:51:25 PST 2006


A bitmap is simply a bunch of bits. These bits can be an image (a common
intended meaning) or describe the registers in a hardware device.

Bitmaps can also be a way to use all the bits in a single storage
location (8-bits on a PC), letting various bits be different variables.
There is C syntax where you can specify the bits in some location in
such a way that you can easily access them with a named variable without
having to use C's bitwise operators. Most commonly (for me, at least)
one uses the bitwise operators to turn on/off and detect the status of
individual bits in a variable. With memory getting cheap, I see more and
more programmers not using bitmaps.

If you have the 2nd edition of the K&R C book (and who does not?), look
at sections 2.9 and 6.9. They tell all.

On Wed, 2006-02-08 at 19:14 -0600, Ben Duncan wrote:
> In programming C, I have run across the term "bit map". What is it
> and how does one use it ?
> 
> Thanks ...
> 
> 
-- 
Roger Oberholtzer

OPQ Systems AB
Ramb?ll Sverige AB
Kapellgr?nd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23



More information about the Linux-users mailing list