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 9088341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:53:24+00:00 2026-06-16T21:53:24+00:00

I just learning C. Could someone explain that what are they using for ?

  • 0

I just learning C. Could someone explain that what are they using for ? these operators. in a real industrial case..thanks.

like:

when I need these? :

~X 
n = n & 0177
x = x | 1211

Please tell me.

  • 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-06-16T21:53:25+00:00Added an answer on June 16, 2026 at 9:53 pm

    This is fundamental and so there are many potential applications, but here’s a specific industrial example:

    Suppose you’re sending a bunch of command and/or status info between devices. To avoid wasting bandwidth (particularly if you’re using a slower type of connection such an old 9-pin serial connection, which are still used on industrial devices), you very well may “pack” and “unpack” the data. In the case of two-state signals, this means that each byte can hold up to eight independent statuses. To get the status of bit 6, you could do something like this:

    status = (dataByte & 0x40) >> 6;
    

    In the above line, 0x40 is a bitmask that results in all bits being zero except for bit 6. The shift right by 6 converts the resulting value–0x40 or 0x00–to 1 or 0.

    Take a look at this brief section for standard, related examples: Bit Manipulation in C

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

Sidebar

Related Questions

I'm just learning Erlang with Chicago Boss and would like to know how could
So I'm just learning Forth and was curious if anyone could help me understand
Hi sorry still learning here and slow to learning code arguments. Just wondering could
Just learning the world of jquery, and all my googling gives examples like this:
I've just started learning a dialect of lisp ( Racket ) and I'd like
I'm learning how to use the ASP.net membership, when a user registers they just
I just started learning ruby on rails. I'm using 'Agile Web Development with Rails,
I would be grateful if someone could help me out here. I'm just starting
I am just starting climbing the Objective C learning curve (using Nerd Ranch iOS
Just learning Silverlight 4/RIA and i 'm stuck in a weird problem: setup an

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.