Check this [new file.] !!(https://github.com/rvraghav93/BinPy/blob/77f2d99caa8842a31371e4707167bcfea6707212/BinPy/exmples/Counters/NBitRippleCounter.py)