21 Bits and Bytes, Mathematics and Money
“There are only 10 types of people in the world. Those who understand binary code and those who don’t.”
This chapter takes a closer look at the representation of the numbers and explains how binary operators operate on these values. Once we’ve examined integers in more detail, a detailed presentation of floats will follow, in turn followed by basic mathematical functions such as max(...), sin(...), and abs(...), which are implemented in Java by the Math class.
21.1 Bits and Bytes
A bit is an information carrier for the statement “true or false” and thus has two states. By combining individual bits, larger sequences are created such as the byte , which consists of 8 bits, for example, 00010011 bin ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access