Java Reference
In-Depth Information
B
Number Systems
This appendix contains a detailed introduction to number systems and their under-
lying characteristics. The particular focus is on the binary number system, its use
with computers, and its similarities to other number systems. This introduction
also covers conversions between bases.
In our everyday lives, we use the decimal number system to represent values,
to count, and to perform arithmetic. The decimal system is also referred to as the
base-10 number system . We use 10 digits (0 through 9) to represent values in the
decimal system.
Computers use the binary number system to store and manage information.
The binary system, also called the base-2 number system , has only two digits (0
and 1). Each 0 and 1 is called a bit , short for binary digit. A series of bits is called
a binary string .
There is nothing particularly special about either the binary or decimal systems.
Long ago, humans adopted the decimal number system probably because we have
10 fingers on our hands. If humans had 12 fingers, we would probably be using
a base-12 number system regularly and find it as easy to deal with as we do the
decimal system now. It all depends on what you get used to. As you explore the
binary system, it will become more familiar and natural.
Binary is used for computer processing because the devices used to manage and
store information are less expensive and more reliable if they have to represent
only two possible values. Computers have been made that use the decimal system,
but they are not as convenient.
There are an infinite number of number systems, and they all follow the same
basic rules. You already know how the binary number system works, but you just
might not be aware that you do. It all goes back to the basic rules of arithmetic.
Place Value
In decimal, we represent the values of 0 through 9 using only one digit. To rep-
resent any value higher than 9, we must use more than one digit. The position of
each digit has a place value that indicates the amount it contributes to the overall
value. In decimal, we refer to the one's column, the ten's column, the hundred's
column, and so on forever.
665
 
 
Search WWH ::




Custom Search