Convert a base-10 number to a base-2 number

Assignment Help Computer Engineering
Reference no: EM132200533

Write a Java or C/C++ program to convert a base-10 number to a base-2 number. The following input should be tested:

Logic should split the number into integer and float then divide by 2 for the int concatenating into a string of 10000000 with the final remainder being 1 concatenated to the front.

The float would be multiplied by 2 then 1 would be subtracted until you get 0. The two strings would be concatenated at the end to form something like 10000.000001.

1) 12

2) 12.6875

3) .6875

Reference no: EM132200533

Questions Cloud

What you have learned about enterprise resource planning : Review what you have learned about enterprise resource planning (ERP) from the textbook and from the unit's study guide.
Define what kinds of cognitive errors contributed : Explain why Mattel's managers were able to slowly change decision making over time and what kinds of cognitive errors contributed.
Draft a preliminary description of the problem : Review the case study Maruti suzuki India: Defending Market leadership in the A-Segment and identify a problem that can be addressed by a research report.
Compare global workers and third-country nationals : Compare and contrast global workers, expatriates, local nationals, and third-country nationals. What impact, if any, do they have on international pay systems?
Convert a base-10 number to a base-2 number : Write a Java or C/C++ program to convert a base-10 number to a base-2 number.
Write a java method to take a positive integer value : Write a java method to take a positive integer value as its parameter and returns a string of 1s and 0s that represents its binary value.
What do you notice about the percentages : Write a java program that allows user to enter the number of numbers to generate random integers between 0 to 9 and displays the count of each numbers.
Write a java implementation for the following problem : Write a Java implementation for the following problem. You can make use of whichever of the ADTs Stack, Queue, and Deque that you need.
Comment your code and use procedural decomposition : Write a Java program that asks the user for a EAN13 and validates it as either correct or incorrect (display a message accordingly).

Reviews

Write a Review

 

Computer Engineering Questions & Answers

  What are some of the changes to technology

How has this technology impacted the development of new software? Even if the technology change is hardware related, software development can be impacted.

  Description of the steps performed for each the steps

The objective of this assignment to is make multiple backups of databases and then to restore the databases from the backups you've created.

  Generally the overall report identifies or investigates

generally the overall report identifies or investigates issues as well as problems of itc government in context of poor

  Write a partial disassembler for MIPS instructions in Java

Computer Architecture- MIPS Disassembler. Your project is to write a partial disassembler for MIPS instructions in Java

  Write a function that consumes a parameter

Your function should return the name of that day as a string. For example: dayName (8) should return Thursday'.

  Express limitations and current research trends in the area

Autonomous (intelligent) software agents are used in Artificial Intelligence to solve an increasing number of complex problems. explain their main applicability as well as their advantages, limitations and current research trends in the area.

  Write a function that can print out the all names found

Write a function that can Search for a Name to see if it in the LIST class.Write a Function that can print out the ALL names found on each list.

  Write a character to the printers output register

Does it make sense to run this printer using interrupt-driven I/O if each character printed requires an interrupt that takes 25 mu sec all-in to service?

  Plan logic for a company program to determine policy premium

Plan the logic for an insurance company program to determine policy premiums. The program continuously prompts the user for an insurance policy number.

  What are the four orbit levels for satellite systems

What are the four orbit levels for satellite systems? List a few common application areas for each orbit level satellite system.

  Calculate average time in a linear search

Calculate average time in a linear search

  You receive a complaint from the store that they cant print

you receive a complaint from the store that they cannot print on network color printer which is located on the third

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