Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: What A Wonderful World: Bitmasks!

by demerphq (Chancellor)
on Dec 08, 2002 at 15:53 UTC ( [id://218373]=note: print w/replies, xml ) Need Help??


in reply to Re: What A Wonderful World: Bitmasks!
in thread What A Wonderful World: Bitmasks!

A bitmaks and binary tests are just the idea of compressing a bunch of small width data (usually booleans, ie 1 bit values) into a byte. So for instance we might use a bit field to represent which external walls of a rectangle in a spreadsheet get colored in and which internal lines get colored in:
Bit 7 : reserved 6 : reserved 5 : inside horiz 4 : inside vert 3 : bottom 2 : top 1 : right 0 : left
So a value of 255 corresponds to all sides being colored in. A value of 3 means just the left and right, a value of 5 is the top and left etc...

--- demerphq
my friends call me, usually because I'm late....

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://218373]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-20 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found