datatypes and Binary instances for wire format