Skip to content

The-Country-Coder/Number-Conversion-Program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Number-Conversion-Program

Overview

This program converts user input as follows:

  • Hex to Binary
  • Binary to Hex
  • Decimal to Binary
  • Binary to Decimal I built the program manually so the program does not use conversion methods like bin() and hex(). In doing so, it provides a view showing how the program actually works.

Key features

  • Menu-driven interface
  • Full user input validation
  • Fully manual calculations without using conversion methods

Technical Approach

Binary to Hex

The binary to hex converter was one of the harder ones to build. Since binary is read as 4 bits, the program first makes sure the input is divisible by 4. Doing so confirms that there are complete nibbles in the input. If it is not divisible by 4, there is not a complete nibbles. The program adds the correct amount of 0's needed to finish the last nibble. Then it takes groups of 4 and splits them to properly calculate the nibbles hex value.

What it taught me

It taught me a good deal of patience. Many beginners errors were in there which took time to fix.
User Input validation is not as hard as my brain makes it out to be. It's simple once you slowly process everything in your brain.

How to run

Open terminal and run python project.py after changing directory

About

This is a program that converts hex to binary, binary to hex, decimal to binary, and binary to decimal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages