Encode caps as byte