Update 3 bit algorithm.cpp