Skip to content

anatoliyrazin/negative_base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Negative base

Conversion from decimal to other base numeral system and back.

Works for both bositive and negative base. The idea came after codility.com test issue from Toptal regarding simple conversion from decimal to base -2 and back.

Currently completed three solutions using C++ and PHP:

  1. C++ - solved with extention of integer class running division and modulo operators for negative values.

  2. C/C++ - similar solution to previous, but procedural, without integer extention class

  3. PHP solution - similar to C/C++

About

Support for conversion between decimal and negative radix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published