working c++ bits

Working c++ example
Standardized amounts with python version