Blog of Frank Delporte

Deep dive into bits, bytes, shorts, ints, longs, signed, and unsigned with Java

On the Pi4J discussion list, someone recently asked what the best and easiest way is in Java to convert a byte value. In Java, there is no distinction between signed and unsigned bytes, which can be confusing. My book “Getting Started with Java on the Raspberry Pi” contains an explanation about this, and I am happy to share it in this post with some more info and code examples…

Page 1 of 19