Add basic binary encoding/decoding code