Converter between binary and factorial representation