At the heart of the microprocessor-based computer system is the microprocessor integrated circuit. The microprocessor, sometimes referred to as the CPU (central processing unit), is the controlling element in a computer system. The microprocessor controls memory and I/O through a series of connections called buses. The buses select an I/O or memory device, transfer data between an I/O device or memory and the microprocessor, and control the I/O and memory system. Memory and I/O are controlled through instructions that are stored in the memory and executed by the microprocessor.
The microprocessor performs three main tasks for the computer system: (1) data transfer between itself and the memory or I/O systems, (2) simple arithmetic and logic operations, and (3) program flow via simple decisions. Although these are simple tasks, it is through them that the microprocessor performs virtually any series of operations or tasks.
The power of the microprocessor is in its capability to execute billions of millions of instructions per second from a program or software (group of instructions) stored in the mem-ory system. This stored program concept has made the microprocessor and computer system very powerful devices. (Recall that Babbage also wanted to use the stored program concept in his Analytical Engine.)
Table 1–4 shows the arithmetic and logic operations executed by the Intel family of micro-processors. These operations are very basic, but through them, very complex problems are solved.
Data are operated upon from the memory system or internal registers. Data widths are variable and include a byte (8 bits), word (16 bits), and doubleword (32 bits). Note that only the 80386 through the Core2 directly manipulate 8-, 16-, and 32-bit numbers. The earlier 8086–80286 directly manipulated 8- and 16-bit numbers, but not 32-bit numbers. Beginning with the 80486, the microprocessor contained a numeric coprocessor that allowed it to perform complex arith-metic using floating-point aritharith-metic. The numeric coprocessor, which is similar to a calculator chip, was an additional component in the 8086- through the 80386-based personal computer. The numeric coprocessor is also capable of performing integer operations on quadwords (64 bits).
The MMX and SIMD units inside the Pentium through Core2 function with integers and floating-point number in parallel. The SIMD unit requires numbers stored as octalwords (128 bits).
Another feature that makes the microprocessor powerful is its ability to make simple decisions based upon numerical facts. For example, a microprocessor can decide if a number is zero, if it is positive, and so forth. These simple decisions allow the microprocessor to modify the
Operation Comment
Addition Subtraction Multiplication Division
AND Logical multiplication
OR Logic addition
NOT Logical inversion
NEG Arithmetic inversion
Shift Rotate TABLE 1–4 Simple
arithmetic and logic operations.
Decision Comment Zero Test a number for zero or not-zero Sign Test a number for positive or negative Carry Test for a carry after addition or a borrow after
subtraction
Parity Test a number for an even or an odd number of ones
Overflow Test for an overflow that indicates an invalid result after a signed addition or a signed subtraction TABLE 1–5 Decisions
found in the 8086 through Core2 microprocessors.
Printer
MRDC MWTC
IORC IOWC
μp
Address bus
Data bus
Keyboard Read/write
memory RAM Read-only
memory ROM
FIGURE 1–12 The block diagram of a computer system showing the address, data, and control bus structure.
program flow, so that programs appear to think through these simple decisions. Table 1–5 lists the decision-making capabilities of the Intel family of microprocessors.
Buses. A bus is a common group of wires that interconnect components in a computer system.
The buses that interconnect the sections of a computer system transfer address, data, and control information between the microprocessor and its memory and I/O systems. In the microprocessor-based computer system, three buses exist for this transfer of information: address, data, and con-trol. Figure 1–12 shows how these buses interconnect various system components such as the microprocessor, read/write memory (RAM), read-only memory (ROM or flash), and a few I/O devices.
The address bus requests a memory location from the memory or an I/O location from the I/O devices. If I/O is addressed, the address bus contains a 16-bit I/O address from 0000H through FFFFH. The 16-bit I/O address, or port number, selects one of 64K different I/O devices.
If memory is addressed, the address bus contains a memory address, which varies in width with the different versions of the microprocessor. The 8086 and 8088 address 1M byte of memory, using a 20-bit address that selects locations 00000H–FFFFFH. The 80286 and 80386SX address 16M bytes of memory using a 24-bit address that selects locations 000000H–FFFFFFH. The 80386SL, 80386SLC, and 80386EX address 32M bytes of memory, using 25-bit address that selects locations 0000000H–1FFFFFFH. The 80386DX, 80486SX, and 80486DX address
TABLE 1–6 The Intel family of microprocessor bus and memory sizes.
Microprocessor Data Bus Width Address Bus Width Memory Size
8086 16 20 1M
8088 8 20 1M
80186 16 20 1M
80188 8 20 1M
80286 16 24 16M
80386SX 16 24 16M
80386DX 32 32 4G
80386EX 16 26 64M
80486 32 32 4G
Pentium 64 32 4G
Pentium Pro–Core2 64 32 4G
Pentium Pro–Core2
(if extended addressing is enabled)
64 36 64G
Pentium 4 and Core2
with 64-bit extensions enabled
64 40 1T
Itanium 128 40 1T
4G bytes of memory, using a 32-bit address that selects locations 00000000H–FFFFFFFFH. The Pentium also addresses 4G bytes of memory, but it uses a 64-bit data bus to access up to 8 bytes of memory at a time. The Pentium Pro through Core2 microprocessors have a 64-bit data bus and a 32-bit address bus that address 4G of memory from location 00000000H–FFFFFFFFH, or a 36-bit address bus that addresses 64G of memory at locations 000000000H–FFFFFFFFFH, depending on their configuration. Refer to Table 1–6 for complete listing of bus and memory sizes of the Intel family of microprocessors.
The 64-bit extensions to the Pentium family provide 40 address pins in its current version that allow up to 1T byte of memory to be accessed through its 10 digit hexadecimal address.
Note that 240is 1 terra. In future editions of the 64-bit microprocessors Intel plans to expand the number of address bits to 52, and ultimately to 64 bits. A 52-bit address bus allows 4P (Peta) bytes of memory to be accessed and a 64-bit address bus allows 16E (Exa) bytes of memory.
The data bus transfers information between the microprocessor and its memory and I/O address space. Data transfers vary in size, from 8 bits wide to 64 bits wide in various members of the Intel microprocessor family. For example, the 8088 has an 8-bit data bus that transfers 8 bits of data at a time. The 8086, 80286, 80386SL, 80386SX, and 80386EX transfer 16 bits of data through their data buses; the 80386DX, 80486SX, and 80486DX transfer 32 bits of data; and the Pentium through Core2 microprocessors transfer 64 bits of data. The advantage of a wider data bus is speed in applications that use wide data. For example, if a 32-bit number is stored in mem-ory, it takes the 8088 microprocessor four transfer operations to complete because its data bus is only 8 bits wide. The 80486 accomplishes the same task with one transfer because its data bus is 32 bits wide. Figure 1–13 shows the memory widths and sizes of the 8086–80486 and Pentium through Core2 microprocessors. Notice how the memory sizes and organizations differ between various members of the Intel microprocessor family. In all family members, the mem-ory is numbered by byte. Notice that the Pentium through Core2 microprocessors all contain a 64-bit-wide data bus.
The control bus contains lines that select the memory or I/O and cause them to perform a read or write operation. In most computer systems, there are four control bus connections:
(memory read control), (memory write control), (I/O read control), and (I/O write control). Note that the overbar indicates that the control signal is active-low; that is,
IOWC IORC
MWTC
MRDC
8 bits
8086 microprocessor (memory is only 1M bytes) 80286 microprocessor
80386SX microprocessor
80386SL microprocessor (memory is 32M bytes) 80386SLC microprocessor (memory is 32M bytes)
8 bits
FIGURE 1–13 The physical memory systems of the 8086 through the Core2 microprocessors.
it is active when a logic zero appears on the control line. For example, if , the microprocessor is writing data from the data bus to an I/O device whose address appears on the address bus. Note that these control signal names are slightly different in various versions of the microprocessor.
The microprocessor reads the contents of a memory location by sending the memory an address through the address bus. Next, it sends the memory read control signal ( ) to cause the memory to read data. Finally, the data read from the memory are passed to the microproces-sor through the data bus. Whenever a memory write, I/O write, or I/O read occurs, the same sequence ensues, except that different control signals are issued and the data flow out of the microprocessor through its data bus for a write operation.
MRDC IOWC = 0
Pentium–Core2 microprocessors
The use of the microprocessor requires a working knowledge of binary, decimal, and hexadeci-mal numbering systems. This section of the text provides a background for those who are unfa-miliar with these numbering systems. Conversions between decimal and binary, decimal and hexadecimal, and binary and hexadecimal are described.
Digits
Before numbers are converted from one number base to another, the digits of a number system must be understood. Early in our education, we learned that a decimal (base 10) number is constructed with 10 digits: 0 through 9. The first digit in any numbering system is always zero.
For example, a base 8 (octal) number contains 8 digits: 0 through 7; a base 2 (binary) number contains 2 digits: 0 and 1. If the base of a number exceeds 10, the additional digits use the FIGURE 1–13 (continued)
Power 22 21 20 2-1 2-2 2-3
Weight 4 2 1 .5 .25 .125
Number 1 1 0 . 1 0 1
Numeric Value 4 + 2 + 0 + .5 + 0 + .125 = 6.625
letters of the alphabet, beginning with an A. For example, a base 12 number contains 10 digits:
0 through 9, followed by A for 10 and B for 11. Note that a base 10 number does contain a 10 digit, just as a base 8 number does not contain an 8 digit. The most common numbering systems used with computers are decimal, binary, and hexadecimal (base 16). (Many years ago octal numbers were popular.) Each of these number systems are described and used in this section the chapter.