cpp implementation of Add Binary