implement binary encode and decode