Improved test + added loop tests for bin and hex