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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:33:24+00:00 2026-05-11T01:33:24+00:00

I have 4 binary bits Bit 3 Bit 2 Bit 1 Bit 0 Normally

  • 0

I have 4 binary bits

Bit 3  Bit 2  Bit 1  Bit 0 

Normally the answer is simple: 2^4, or 16 different combinations; and it would looks something like the following:

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

However, The LSB (Bit 0) changes state every iteration.

I need an algorithm where the state of a bit only changes once through all the iterations; i.e, I need all my bits to act like the MSB (Bit 3).

How can I do this?

Edit

It seems that most people are converging to there being only 5 possible solutions. However this assumes there is a starting point for the value and an ending point. This doesn’t matter so I’m going to give a real world scenario to better explain.

Suppose I have an digital alarm clock that gives me 4 outputs. Each output can be programmed to go on at a certain time and off at a certain time and are programmed independent of each other, eg. I can program output 1 to go on at 1 am and off at 3 am, while I can program output 2 to go on at 7 pm and off at 2 am. There are no restrictions to how long each output can stay on.

Now I want to hook this alarm clock to a computer and get as close as possible to the current correct time. i.e If the clock says the time is 2:15 pm, my computer knows that the alarm is within the 12 pm to 6 pm range for example. I want to be able to get the smallest possible range. Whats the smallest possible range I can get?

  • 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. 2026-05-11T01:33:24+00:00Added an answer on May 11, 2026 at 1:33 am
    1. There are 4 bits.
    2. Each bit may change state only once.
    3. For each new value, at least one of the bits must have changed state from the previous value.

    Therefore, you can have at most 4 state changes, and at most 5 different values.

    Example:

    0000 -> 0001 -> 0011 -> 0111 -> 1111 

    Edit:

    Very well, let’s restate from what you mean rather than from what you say.

    1. There are 4 bits.
    2. Each bit may change state only twice. (once from 0 to 1, and once from 1 to 0)
    3. For each new value, at least one of the bits must have changed state from the previous value.

    Therefore, you can have at most 8 state changes, and at most 8 different values (since the last state change necessarily brings all bits back to their initial state)

    Example:

    0000 -> 0001 -> 0011 -> 0111 -> 1111 -> 1110 -> 1100 -> 1000 -> 0000 

    So, by setting the outputs for: 3 AM – 3 PM, 6 AM – 6 PM, 9 AM – 9 PM and noon – midnight, you can determine which 3-hour period it is from the outputs. I’d suggest plugging wires into the visual output instead.

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

Sidebar

Ask A Question

Stats

  • Questions 115k
  • Answers 115k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Iterate through all property items in Image.PropertyItems and add them… May 11, 2026 at 10:25 pm
  • Editorial Team
    Editorial Team added an answer First, you can do 64 bit division by using the… May 11, 2026 at 10:25 pm
  • Editorial Team
    Editorial Team added an answer I've found the answer. Search for the problem guid in… May 11, 2026 at 10:25 pm

Related Questions

I have to do some work work with integers, but I am interested in
I don't know a better title, but I'll describe the problem. A piece of
My friend was given this free google website optimizer tshirt and came to me
How would I get my variables out of a vector? I can't use the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.