Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6783367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:51:19+00:00 2026-05-26T16:51:19+00:00

I have googled for it and most tutorials are cryptic. Can somebody teach me

  • 0

I have googled for it and most tutorials are cryptic. Can somebody teach me or even point me to a resource? I have a PHP background.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:51:20+00:00Added an answer on May 26, 2026 at 4:51 pm

    The context of what you’re using it for matters.

    Let’s suppose you have a set of 8 boolean options. Let’s call them opt1 through opt8. Now for some reason, we’re storing all of these options in a single 8-bit value. This is not something you typically want to do, but it certainly has its uses, especially for interfacing with existing systems and APIs.

    So, we have the following 8-bit (1-byte) number, represented in binary:

    10010011

    Each bit corresponds to a specific option, in this order:

    87654321

    With me so far? Now, let’s get into some basic logic operators. Think boolean. If true OR true, then we get true. If true AND true, we get true. If true AND false we get false. We can do the same thing with bitwise operators.

    Let’s try 10010011 OR 11111111. Basically, we’ll do that logic operator on each a bit, and get the result 11111111.

    Why is this useful? Suppose if we want to get the value of just one place… maybe opt 7. We could do 10010011 AND 01000000. We will end up with a number representing only that one option. (Of course, if you want a numeric 1 or 0, you will need to divide by the appropriate place value.

    There are many applications for this. How you use it depends on what you need.

    The Wikipedia article on this isn’t bad:
    http://en.wikipedia.org/wiki/Mask_(computing)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have googled in the last 3 hours but i can't seem to find
I have googled around and not seen any info. What format and icon color
I have googled the topic for a while but haven't found what I'm looking
i have googled and came to know that how to use the variable arguments.
I have Googled merge+cell+Javascript but did not find any suitable code to implement merge
I have googled this a little and didn't really find the answer I needed.
I have googled a bit for how I should handle security in a web
I'm at wits end now, I have googled this to death and found nothing.
I am new to Emacs. I have googled this but no good answer there.
I am sure I am just missing something. But I have googled this for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.