CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [120]
Back in the old Intel 8088 days, the CPU used an extra wire, called the input/output or memory (IO/MEM) wire, to notify devices that it was using the address bus either to specify an address in memory or to communicate with a particular device (Figure 8-14). You won’t find an IO/MEM wire on a modern CPU, as the process has changed and has become more complex—but the concept hasn’t changed one bit. The CPU sends commands to devices by placing patterns of ones and zeroes—I/O addresses—on the address bus.
No two devices share the same I/O address because that would defeat the entire concept. To make sure no two devices share I/O addresses, all I/O addresses either are preset by standard (for example, all hard drive controllers use the same I/O addresses on every PC) or are set at boot by the operating system. You can see the I/O addresses for all of the devices on your computer by going into the Device Manager. Go to the View menu option and select Resources by type. Click on the plus sign directly to the left of the Input/output (IO) option to see a list of I/O addresses, as shown in Figure 8-15.
Figure 8-14 Sending out an I/O address
Figure 8-15 Viewing resources by type, with I/O addresses expanded
Whoa! What’s with all the letters and numbers? The address bus is always 32 bits (even if you have a 64-bit processor, the Northbridge only allows the first 32 bits to pass to the expansion slots), so instead of showing you the raw ones and zeroes, the Device Manager shows you the I/O address ranges in hexadecimal. Don’t know hex? No worries—hexadecimal is just quick shorthand for representing the strings of ones and zeroes—binary—that you do know. One hex character is used to represent four binary characters. Here’s the key:
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A
1011 = B
1100 = C
1101 = D
1110 = E
1111 = F
Let’s pick an arbitrary string of ones and zeroes:
00000000000000000000000111110000
To convert to hex, just chop them into chunks of four:
0000 0000 0000 0000 0000 0001 1111 0000
Then use the key above to convert:
0 0 0 0 0 1 F 0
Then push the hex values together:
000001F0
You now understand what those values mean in the Device Manager. Scroll down until you find the “[000001F0 – 000001F7] Primary IDE Channel” setting. Notice that two I/O addresses are listed. These show the entire range of I/O addresses for this device; the more complex the device, the more I/O addresses it uses. Address ranges are generally referred to by the first value in the range, commonly known as the I/O base address.
* * *
NOTE All I/O addresses only use the last 16 bits (they all start with 0000). Sixteen bits makes 216 = 65,536 I/O address ranges—plenty for even the most modern PCs. Should PCs begin to need more I/O addresses in the future, the current I/O addressing system is ready.
Here are the most important items to remember about I/O addresses. First, every device on your PC has an I/O address. Without it, the CPU wouldn’t have a way to send a device command. Second, I/O addresses are configured automatically: you just plug in a device and it works. Third, no two devices should share I/O addresses. The system handles configuration, so this happens automatically.
Interrupt Requests
Between the standardized expansion bus connections and BIOS using I/O addressing, the CPU can now communicate with all of the devices inside the computer, but a third and final hurdle remains. I/O addressing enables the CPU to talk to devices, but how does a device tell the CPU it needs attention? How does the mouse tell the CPU that it has moved, for example, or how does the keyboard tell the CPU that