Top Topics in our Forum';
** Fraction Maker. Create Visual Models of fractions and save as images to desktop!

A+    A−    B  
Algebra
Games
Geometry
Interactive
Trigonometry
Forum




AddThis Social Bookmark Button

Hexadecimal, Binary Calculator Project

Objective : To create a calculator that performs the four main operations with numbers in binary octal, decimal or, hexadecimal.

Note: If you want to make sure that your calculator works, feel free to check your results using this hex, binary, decimal calculator


Source File: HexBinCalculator.java
Requirements of the project:

Project Requirements

  • Validate User Input
    • Do not allow the user to try to try to calculate with invalid digits.
      • If the input is binary only allow 0 or 1.
      • If theinput is octal only allow 0-7 as valid digits etc…

 

  • When converting among bases of 2 use your own custom implementation of the shortcut conversion rule. This should work both whenever the input && output are both not decimal.

 

Note: Java, like most languages, has some built in support that do all of the conversions for you.(Integer.toBinaryString(myInt) is just one) Using any built in method like toBinaryString is not a legal way of completing this project since one of the goals is to become more proficient at and gain a deeper undestanding of converting numbers from one base to another. You must come up with your own algorithm that converts numbers from decimal to binary.

Top