Java Reference
In-Depth Information
CPU is placed
under the fan
Memory
Motherboard
F IGURE 1.2
The motherboard connects all parts of a computer together.
and the clock speed of a computer is now usually stated in gigahertz (GHz). Intel's newest
processors run at about 3 GHz.
CPUs were originally developed with only one core. The core is the part of the processor
that performs the reading and executing of instructions. In order to increase CPU processing
power, chip manufacturers are now producing CPUs that contain multiple cores. A multicore
CPU is a single component with two or more independent processors. Today's consumer
computers typically have two, three, and even four separate cores. Soon, CPUs with dozens or
even hundreds of cores will be affordable.
gigahertz
core
1.2.2 Bits and Bytes
Before we discuss memory, let's look at how information (data and programs) are stored in
a computer.
A computer is really nothing more than a series of switches. Each switch exists in two
states: on or off. Storing information in a computer is simply a matter of setting a sequence
of switches on or off. If the switch is on, its value is 1. If the switch is off, its value is 0.
These 0s and 1s are interpreted as digits in the binary number system and are called bits
(binary digits).
The minimum storage unit in a computer is a byte. A byte is composed of eight bits. A
small number such as 3 can be stored as a single byte. To store a number that cannot fit into a
single byte, the computer uses several bytes.
Data of various kinds, such as numbers and characters, are encoded as a series of bytes. As
a programmer, you don't need to worry about the encoding and decoding of data, which the
computer system performs automatically, based on the encoding scheme. An encoding
scheme is a set of rules that govern how a computer translates characters, numbers, and sym-
bols into data the computer can actually work with. Most schemes translate each character
into a predetermined string of numbers. In the popular ASCII encoding scheme, for example,
the character C is represented as 01000011 in one byte.
bits
byte
encoding scheme
 
Search WWH ::




Custom Search