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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:12:37+00:00 2026-05-18T01:12:37+00:00

Is there a bit operation or a series of bit operations that would give

  • 0

Is there a bit operation or a series of bit operations that would give me the following result?

I’ll show what I want by using examples. Note that the length of each bit string is irrelevant:

1)

100000
100000
------
011111

2)

000000
000000
------
000000

3)

100000
000000
------
000000

4)

000100
000100
------
111011

5)

100100
100100
------
011011

6)

100100
000100
------
111011

7)

010101
101010
------
000000

8)

111111
111111
------
000000

So, the idea is that if anywhere in the first string, a 1 overlaps with a 1 in the second string, then in the result, 1s appear everywhere except the position where the 1s overlap.

  • 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-18T01:12:37+00:00Added an answer on May 18, 2026 at 1:12 am

    Pseudo code:

    if (a & b)
        return ~(a & b)
    else
        return 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there a possible bit of code (php, java, css, html) that will force
I'm looking at http://hseeberger.wordpress.com/2010/11/25/introduction-to-category-theory-in-scala/ and there's a bit of code that I can't understand
Is there a function in c# that takes two 32 bit integers (int) and
Is there any advantage of using int vs varbinary for storing bit masks in
I've been using PostgreSQL a little bit lately, and one of the things that
I'm writing a calculator in Python (as an exercise), and there's one bit that
I have a question about bit operation in c++, there is a set of
Is there a way to create a 128 bit object in java, that can
How can the XOR operation (on two 32 bit ints) be implemented using only
I am trying to solve a problem using bit operations in C++ but i

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.