Completed toBinary