Java Reference
In-Depth Information
Bus
Storage
Devices
Communication
Devices
Input
Devices
Output
Devices
Memory
CPU
e.g., Disk, CD,
and Tape
e.g., Modem
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
F
IGURE
1.1
A computer consists of a CPU, memory, storage devices, input devices, output
devices, and communication devices.
the bus is built into the computer's
motherboard
, which is a circuit case that connects all of
the parts of a computer together.
motherboard
1.2.1 Central Processing Unit
The
central processing unit (CPU)
is the computer's brain. It retrieves instructions from
memory and executes them. The CPU usually has two components: a
control unit
and an
arithmetic/logic unit.
The control unit controls and coordinates the actions of the other
components. The arithmetic/logic unit performs numeric operations (addition, subtraction,
multiplication, division) and logical operations (comparisons).
Today's CPUs are built on small silicon semiconductor chips that contain millions of tiny
electric switches, called
transistors
, for processing information.
Every computer has an internal clock, which emits electronic pulses at a constant rate.
These pulses are used to control and synchronize the pace of operations. A higher clock
speed
enables more instructions to be executed in a given period of time. The unit of measurement of
clock speed is the
hertz
(
Hz
), with 1 hertz equaling 1 pulse per second. In the 1990s, computers
measured clocked speed in
megahertz
(
MHz
), but CPU speed has been improving continuously;
the clock speed of a computer is now usually stated in
gigahertz (GHz)
. Intel's newest proces-
sors 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 cores. Today's consumer comput-
ers typically have two, three, and even four separate cores. Soon, CPUs with dozens or even
hundreds of cores will be affordable.
CPU
speed
hertz
megahertz
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
bits
byte
encoding scheme
Search WWH ::
Custom Search