A program to run on ocelot which will flip a single bit

Assignment Help Other Subject
Reference no: EM132196732

Question :

Write a C program to run on ocelot which will flip a single bit in a number entered by the user using the binary representation of the number.

The user should input the original integer value between 1 and 1000 using a scanf. Output is to the screen.

For this assignment give the user directions asking them to enter the integer and then ask them which bit to flip. That can be a number between 0 and 31. After completing the operation ask the user if they want to do it again.

You do not need to use getopt for this program. If the user enters a 1 as the initial value and a 0 for the bit to switch the result would be 0.

If the user enters a 10 as the initial value and a 1 for the bit to switch then the result would be 8. . If the user enters a 10 as the initial value and a 2 for the bit to switch then the result would be 14.

The program should compile to create an executable called bitswitch.

Reference no: EM132196732

Questions Cloud

Balance appropriateness with stakeholder concerns : How does one balance appropriateness with stakeholder concerns? Discuss in not less than 200 words.
Write a c program that when you type in five numbers : Write a C program that when you type in five numbers, it will print the number from the smallest one to the largest one.
What will the yearly payment be : Go to the St. Louis Federal Reserve FRED database, and find data on the interest rate on a four-year auto loan (TERMCBAUTO48NS). Assume that you borrow $20,000.
Successful change management program : What do you think is the most important aspect of having a successful Change Management Program?
A program to run on ocelot which will flip a single bit : Write a C program to run on ocelot which will flip a single bit in a number entered by the user using the binary representation of the number.
What do you think this movie is arguing : Pick a movie you have seen. Briefly summarize the plot. What do you think this movie is arguing?
Testing the reliability of evidence online : How reliable is the information on the website? What are some practical strategies for testing the reliability of evidence online?
What does the downward sloping shape : What does the downward sloping shape of the CPC suggest and why is it a straight line? State what a rightward shift in the CPC implies.
Find the length of the longest consecutive sequence : Write a C program that reads an integer from stdin, and find the length of the longest consecutive sequence of one bits.

Reviews

Write a Review

Other Subject Questions & Answers

  Explain the core principles of that theory

Explain the core principles of that theory - Demonstrate how the principles of the theory support a certain position on that question.

  Describe the term social vulnerability

Describe the term social vulnerability and explain how emergency managers can use this information to their advantage during the mitigation.

  Hard economic and finance choices in us healthcare

With coinciding concerns about health care costs and the imperative to improve quality of care, health care providers and others face difficult decisions in the effort to achieve an appropriate balance. Such decisions often are addressed in the po..

  What are the characteristics of the supreme being

Select one myth from "The Supreme Being" section in Leeming's World of Myth (pp. 124-134). List the name and culture of the myth you selected in the box below, and answer the questions that follow for the myth using 2-5 complete sentences. What ar..

  Beginning to train for a half marathon

Margot is a 25-year-old, recreationally active female who is just beginning to train for a half marathon.  She weighs 128 lbs and is 5’4” tall. She comes to you for advice regarding her training diet.

  Discussing biological principles that underlie technology

Write a four to six (4 to 6) page paper on your chosen topic. Organize your paper into sections corresponding to the following requirements Biological basis.

  End of the 15th century

By the end of the 15th century, the idea that the world was round was

  How clinical psychologist might approach working with chris

Based on your study this week, address each of the following: Identify how a clinical psychologist, counseling psychologist, and counselor might approach working with Chris

  Normal development of female sex organs

Low levels of androgens in the female embryo allows the normal development of female sex organs.

  Talking with a university about social media tools

Our company is talking with a University about social mediatools and wanted to know what Cramster members thought of the site. How useful and reliable Cramster? How does it compare toemail and in-person study groups?

  Post an explanation of the types of descriptive statistics

Post an explanation of the types of descriptive and/or inferential statistics you might use to analyze the data gathered in the case study.

  What are some alternatives to the program as it is now

Public surveys indicate that ¾ of younger Americans think that Social Security is a "dead program." What would make them have such a dim view? Does the strength of the American Association of Retired persons (AARP) play into this perspective? Wha..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd