Hardware Reference
In-Depth Information
Input devices. A computer is designed to execute programs that manipulate
certain data. Input devices are needed to enter the program to be executed and the
data to be processed into the computer. There are a wide variety of input devices:
keyboards, keypads, scanners, bar code readers, sensors, and so on.
Output devices. Whether the user uses the computer to perform computations
or to find information from the Internet or a database, the end results must be
displayed or printed on certain media so that the user can see them. There are
many media and devices that can be used to display information: cathode ray tube
(CRT) displays, flat-panel liquid crystal displays (LCDs), seven-segment displays,
printers, light-emitting diodes (LEDs), and so on.
Memory devices . Users write programs to tell the computer what to do with the
data at hand. Programs to be executed and data to be processed must be stored in
memory devices so that the processor can readily access them.
1.3.1 The Processor
A processor is also referred to as the central processing unit (CPU). A processor consists of
three major components: arithmetic logic unit , control unit , and registers .
T HE A RITHMETIC L OGIC U NIT
The Arithmetic Logic Unit (ALU) performs arithmetic and logic operations requested
by the user's program. The complexity of the ALU varies from one computer to another.
If the processor designer wants to implement more operations directly in the hardware,
then the ALU will get more complicated. An ALU that implements addition, subtraction,
AND, and OR operations is illustrated in Figure 1.1. In Figure 1.1, all four operations are
A
B
n
n
Opcode
CIN
1
Opcode
00 = ADD
01 = SUB
10 = AND
11 = OR
2
Inverters
0
1
Comparator
(=?)
MUX2
01
01
ci
Y
X
Sum
n
MUX1
00
Carry
Cout
01
n
Result
n
AND
10
n
OR
11
Figure 1.1 An ALU that implements ADD, SUB, AND, and OR operations
 
Search WWH ::




Custom Search