encode numeric values using bytewise closes #12