Binary protocol generator