Rewrite binary operations implementation

 Previously binary data was stored as `new String(byteArray)` but it is not correct - as stated in String javadoc, it can replace unmappable characters