Catrobat

Implement a number-converter in Pocket Code

Implement a number converter in Pocket Code which allows you to convert decimal numbers to binary or hexadecimal and vice versa. The first step you will have to do is to do some reserach about number representation! A good tip before you start is to do some conversions with pen & paper first to make sure you fully understand the concept.

Example conversion: 8 (DEC) = 1 0 0 0 (BIN)

Implement the following functionalitys: DEC -> BIN (decimal to binary) BIN -> DEC (binary to decimal) DEC -> HEX (decimal to hexadecimal) HEX -> DEC (hexadecimal to decimal)

Make an introduction screen, where you explain how you make these conversions in a mathematical way.

Restrictions: DO NOT REMIX AN EXISTING PROJECT

Advanced/Optional Implement. BIN -> HEX HEX -> BIN DEC -> OCT OCT -> DEC

Task tags

  • binary
  • math
  • algorithm

Students who completed this task

Jayanth, Jed Lim, MiteshG007, Martina Hanusova, Sree, JustinA, AAA2003

Task type

  • code Code
close

2018