You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
app-ideas/Projects/1-Beginner/DecToHex.md

1.8 KiB

DecToHex

Tier: Beginner

Decimal (Base 10) is the standard counting numbers system. Hexadecimal (Base 16) is used for various purposes such as

  • assembly programming languages and in machine code.
  • It is often used to refer to memory addresses.
  • It can be used during the debugging stage of writing a computer program and to represent numbers stored in a CPU's registers or in main memory.

DecToHex lets the user enter any integer and displays its hexadeicmal (base 16) conversions. Its main purpose is to allow users to understand the mathmathics behind decimal to hexadecimal conversions.

This challenge requires that the developer implementing it follow these constraints:

  • Since, the main purpose of the program is to allow users to understand the math behind decimal to hex conversions, the 'hex' function may not be used

User Stories

  • User should enter only a decimal (base 10) integer. Can be positive or negative.

  • User can see the decimal number in base 16.

  • If input is not a base 10 integer, the user is asked to enter a valid value until they do.

Bonus Features

  • User should be able to convert a hexadecimal number to decimal as well as decimal to hex.

  • User should be able to see the math behind the conversion of decimial to hex or vice versa.

Example project