Update binary conversion logic