CIS 304
LAN Hardware/Wiring & Installation
PCIe, like other serial interfaces and protocols, can support full-duplex mode, meaning that data can be sent and received concurrently. PCIe Bit Rate, Encoding, Giga Transfers, and Bandwidth Let’s clarify something about data transfer or movement both internal and external to a server. The TS7700 Server facilitates data transfer between the host and data storage, as well as to and from physical tape drives when the TS7700 connects to a physical tape library. TS7700 Server The TS7700 Server facilitates data transfer between the host and data storage, as well as to and from physical tape drives when the TS7700 connects to a physical tape library. Network or to connect server clusters in data centers. High scalability provides investment protection with two expansion slots, each of which can support two-port 10 GbE expansion modules. High availability, simplified management, and comprehensive security control policies are among the key features that distinguish this series.
Lesson 9 - Exploring Parallel/Serial Port Data Transfers
Instructor: Michael P. Harris
Computer data/information can be sent from one device to another, carried by a wire cable without the use of a network interface card (NIC). This data is generally sent in one of two basic ways. Using the parallel port many bits (usually 4 or 8) are sent at a time over many wires in the cable. This is known as parallel transfer. Sending one bit at a time over one wire through the serial port is known as serial transfer. Each type of transfer has its own advantages and disadvantages. The serial or parallel connections to the computer are called PORTS. Collectively, they are called Input/Output, or I/O ports.
For hands-on experience, diagnostics, and information we will be using PORTTEST.EXE is a public domain comprehensive diagnostic program by:
MICROSYSTEMS DEVELOPMENT |
---|
4100 Moorpark Ave. #104 |
San Jose, CA 95117 USA |
Phone: (408)296-4000 |
FAX: (408)296-5877 |
PORTTEST will test I/O ports installed in IBM PC and AT compatible computers running MS-DOS. It is useful to identify ports, manipulate system tables, test the ports, and to identify and correct problems.
Parallel Port Basics
Eight bits of data are transferred at a time over PC parallel ports. Data is sent using +5 volts and 0 volts to represent a 1 or a 0 data bit. As you might expect, data can be transferred relatively fast in this manner. The disadvantages of this method is that more wires are needed and that most common parallel ports can only work reliably at distances of under 20 feet.
There are three different types of parallel ports found in PCs.
- Unidirectional - The unidirectional port is the original port found on PCs and all three ports can run in unidirectional mode.
- Bidirectional - The bi-directional port offers data transfer in both directions on the same lines.
- FastParallel - The fast parallel port not only offers Bidirectional data transfer but also runs at a much faster data rate.
The bidirectional port offers data transfer in both directions on the same lines, and both the fast parallel and the bidirectional port can run in any of the three data transfer rates. Your software should attempt to run in the most advantageous mode, depending on the port type it is connected to. If errors are encountered in data transfers you may need to change the port usage to a different setting. You will generally need to select a lower speed if errors occur during data transfers. Speed variations are: 250Kb, 500Kb, and 1Mb.
The three types of parallel ports in decreasing order of data throughput are:
- Fast parallel port
- Bidirectional parallel port
- Unidirectional parallel port
There can be a maximum of three of any type parallel port in your PC, LPT1, LPT2, and LPT3.
Unlike serial ports which rely on a chip to do the data transmission, parallel data is handled entirely with software. Parallel ports have three registers:
- one for data out
- one for output control lines
- and one for input control lines
The way in which data is transmitted over parallel ports varies, but a general description follows. To send a byte of data, the software outputs the byte to the data lines, then pulses the STROBE output. The device on the other end (normally a printer) then asserts its BUSY line. The PC waits for BUSY to go away before sending the next byte. In other implementations, the ACKNOWLEDGE line is used for the printer to signal to the PC that it has received the data.
The other control lines are used for various purposes. On the printer side, PAPER-END is a signal to the PC that the printer is out of paper. The printer also sends a SELECTED signal to the PC indicating that it is 'on line' and ready to receive data. The ERROR signal from the printer can be used for any type of error that would cause the printer to be unable to receive data. In general, if any of these signals are asserted, BUSY is also asserted.
The PC has three additional output control lines. Usage of these lines varies with the particular software and printer in use. In the original PC implementation, they are used as follows:
- AUTOFEED - tells the printer to automatically insert a line feed after each carriage return.
- INIT initializes the printer upon power up.
- SELECT - deselects the printer and takes it 'off line'.
SELECT was most often used as a method to signal the operator that some attention was required. For example, when the software needed to change to a different font, it would deselect the printer. This would cause the printer to turn off its SELECTED line and its front panel light. The user would then change the print wheel in the printer and press the SELECT button on the printer. The printer would then turn on its SELECTED line signalling the software to proceed. Many printers will stay in the 'off line' condition for as long as SELECT or INIT are asserted even if the SELECT button is pressed.
As stated earlier, not all of these controls lines are used in the same manner. Some of the latest laser printers on the market ignore all the control lines to it except for the STROBE line.
Serial Port Basics
The PC serial port uses voltages and connectors established by the Electronic Industries Association (EIA) standard specification known as RS-232C. In addition to one bit of data, other control signals are also sent and received. Sending data one bit at a time is relatively slow, but serial ports have the advantage of using fewer wires to connect two devices and being able to communicate over relatively long cable distances. Most serial ports can easily communicate over 100 ft. of cable. Data is sent using +12 volts and -12 volts to represent a 0 or a 1 data bit. In addition, there are a wide variety of serial peripherals available which make use of the standard RS-232C specification. Furthermore, recent advances have made serial data transmission reliable at higher data rates. These data rates are referred to as 'bps' (bits per second) or 'baud' rates.
The heart of all serial ports is an Universal Asynchronous Receiver Transmitter, referred to as a UART. The CPU reads and writes a byte (8 bits) of data to this chip, and the UART handles the serial transmissions and other functions related to the RS-232C specification. The UART used in most PC & XT type (8088 and 8086) systems is the INS8250B or equivalent. Most AT class machines (80286 & above) use the NS16450 device. The 16450 chip is designed to handle the higher data bus rates of the faster computers. The serial data communications however is identical to the 8250. A newer 16550 UART is now available that is 16450 compatible but with two 8-bit output buffers so data transfers can occur at higher transfer rates especially suitable for CCITT V.32bis. It is beyond the scope of this lesson to describe the detailed workings of these chips.
Port Addressing
Any I/O device in a PC must be located at a particular address. Actually, a serial port consists of eight addresses and a parallel port has three. The address used to refer to a particular port is the first or BASE address. For both serial and parallel ports, this first address is where the data to be transferred is read and written.
These addresses are the PHYSICAL addresses of the ports. It is where the Central Processing Unit (CPU) of the PC must read or write data to send or receive data over a port. There are no set rules for what addresses must be used for ports except for copying what IBM did with the PC in 1981, but some commonly used addresses are supported by most manufacturers. Generally, the first two serial ports are at physical addresses 3F8 and 2F8. These are referred to as COM1 and COM2, the logical names. Generally, parallel ports are located at addresses 3BC, 378 and 278, which are named LPT1, LPT2, and LPT3. Many older monitor cards have a parallel port built in. In these cases, the port is usually at 3BC.
BIOS and DOS
Most PC POST/BIOS routines do a quick check upon power up to determine how many serial and parallel ports are installed. They examine specific addresses by writing to them, then reading them back to determine if a device is present at that address. The POST/BIOS then places the address of each responding device in a table in RAM located at 40:0 for serial ports and at 40:8 for parallel ports.
After a PC has booted and the POST/BIOS is no longer in control, DOS uses the addresses in these tables as COM1, COM2, etc. for serial ports, and LPT1, LPT2, etc. for parallel ports. For example, DOS includes a program called MODE to set various parameters such as the baud rate, of a port. In order to use the MODE command, the user must refer to the desired port by its COM or LPT assignment. The address used is the one stored in the table. It is very possible that COM1 in one system is not at the same physical address as COM1 in another system.
A PC's POST/BIOS normally detects installed serial ports and stores the address of the transmit/receive register in its tables. This is called the 'base' address and it is this address that appears on PORTTEST's main menu. The IRQ (Interrupt Request) numbers are not stored. PORTTEST assumes IRQ4 for the port at 03F8 hex and IRQ3 for the port at 02F8 hex because they are the most commonly used.
Base addresses are as follows:
LPT1 | 03BC hex | LPT2 | 0378 hex | LPT3 | 0278 hex |
COM1 | 03F8 hex | COM3 | 03E8 hex | ||
COM2 | 02F8 hex | COM4 | 02E8 hex |
Note: Only DOS 3.3 and greater supports COM3 & COM4. Often however, the BIOS does not detect more than 2 ports. In this case, use PORTTEST to install these ports in the system tables so that DOS will recognize them.
In order for DOS to recognize a COM or LPT number, there must be a valid address listed in the table, and there can be no gaps. If there is a zero entry in the table, DOS considers that the end of the list. Therefore, as far as DOS is concerned, it is impossible to have a COM1 & a COM4 without having a COM2 & COM3 also! Other software may report differently as explained below.
Logical vs. Physical Addresses
Many BIOS routines only check for two serial ports and three parallel ports. As PCs became more popular, the need for more ports grew. This problem was 'fixed' by DOS 3.3 and higher, which will recognize up to four COM and three LPT ports. However, DOS will only recognize a logical port whose physical address has been placed in the RAM table. If the BIOS doesn't put the physical address there upon power up, DOS won't recognize a logical port even when the hardware is properly configured and installed!
If you need to use DOS to support more ports than your BIOS will detect and install, PORTTEST can be used to place the correct address in the system tables.
NOTE: Many application programs do not use DOS to interface to ports, so that it may not be necessary to include a port's address in the system tables. However, you must place the address in the table in order to test a port with PORTTEST.
Considerable confusion exists regarding proper logical and physical port address. Strictly speaking, there is no proper physical address for any of the logical ports. The logical port structure permits any physical address to be placed into its tables.
Many application programs access ports directly, and do not use the built in routines in the hardware's BIOS. This is usually done because the application needs a more sophisticated device driver than is provided by the BIOS. When this is the case, the logical port addresses are not always used properly. Some applications access ports directly, but properly determine the physical address from the logical address by using the table at 40:0. Other programs do not use logical addresses at all, and just refer to physical addresses. Still others convert logical to physical addresses using their own table. In this case, the program could report that there is a COM1 and a COM4 installed with no COM2 or COM3!
Interrupt Usage
In addition to a serial port's registers, the UART also has the ability to interrupt the processor, either after it has transmitted a byte of data, or after it has received one. Ideally, the interrupt request line that each port uses should be unique, but there are not always enough interrupts to go around. Therefore, interrupts are sometimes used by more than one device. This is ok, but risky, as long as only one of the devices is active at a time.
A standard AT has sixteen hardware interrupt request lines. Most often, IRQ4 is used for serial ports COM1 and COM3 and IRQ3 is used for serial ports COM2 and COM4. Parallel port LPT1 can use IRQ7 and LPT2 can use IRQ5 although no interrupt is required for most printer port operations. Most I/O cards have jumpers to select which interrupt and I/O addresses will be used. If there are conflicts, the user should examine these jumpers to determine the cause of conflict.
Parallel Port Information
Parallel Cable Wiring Diagram
Standard Centronics Parallel Cable - to connect parallel port to a standard printer
APPLICATION #1: Constructing a Parallel-to-Parallel cable
Parallel-to-Parallel Data Transfer Cable - this cable can be used to create a client /server LAN using INTERSVR and INTERLNK described later in this lesson which comes with MS-DOS version 6.0 or greater. This same cable is also used for LapLink and LANtastic-Z.
What Slots Features Serial Data Transfers
Serial Port Information
APPLICATION #2: RS-232-C null modem Cable
APPLICATION #3: 9 pin to 25 pin serial port adapter cable
Application Test
To test your cables use Interlnk & Intersvr, the client/server software that comes included with MS-DOS 6.0 and above. This software will allow you to create a two node LAN and works with both the Parallel transfer cable (Application #1) or the Serial null-modem cable (Application #2). Try both and determine for yourself the speed differences.
INTERSVR.EXE Starts the Interlnk server. All the parameters are optional. Once started the INTERSVR sets up a dedicated server on the machine it is running. All access will be through the client machine connected using the complement INTERLNK software. INTERSVR will automatically search for a connection (parallel or serial) and automatically connect and remap all available drives. The INTERSVR / INTERLNK software combination recognizes either a parallel transfer cable or serial null modem cable.
Syntax:- INTERSVR [drive:[...]] [/X=drive:[...]] [/LPT:[n|address]] [/COM:[n|address]] [/BAUD:rate] [/B] [/V]
To copy Interlnk files from one computer to another, use the following syntax:
- INTERSVR /RCOPY
Parameters:
- drive:
- Specifies the letter(s) of the drive(s) that will be redirected. By default, all drives are redirected.
- /X=drive:
- Specifies the letter(s) of drive(s) that will not be redirected. By default, all drives are redirected.
- /LPT:[n|address]
- Specifies a parallel port to use. The n parameter specifies the number of the parallel port. The address parameter specifies the address of the parallel port. If you omit n or address, the Interlnk server uses the first parallel port that it finds connected to the client. If you specify the /LPT switch and omit the /COM switch, the server searches only for parallel ports. By default, all parallel and serial ports are scanned.
- /COM:[n|address]
- Specifies a serial port to use. The n parameter specifies the number of the serial port. The address parameter specifies the address of the serial port. If you omit n or address, the Interlnk server searches all serial ports and uses the first port that it finds connected to the client. If you specify the /COM switch and omit the /LPT switch, the server searches only for serial ports. By default, all parallel and serial ports are scanned.
- /BAUD:rate
- Sets a maximum serial baud rate. Valid values for rate are 9600, 19200, 38400, 57600, and 115200. The default value is 115200.
- /B
- Displays the Interlnk server screen in black and white. Use this switch if you have problems reading your monochrome monitor.
- /V
- Prevents conflicts with a computer's timer. Use this switch if you have a serial connection between computers and one of them stops running when you use Interlnk to access a drive or printer port.
- /RCOPY
- Copies Interlnk files from one computer to another, provided that the computers are connected with a 7-wire, null-modem serial cable and that the &;ltMODE> command is available on the computer where you are installing Interlnk.
INTERLNK.EXE Connects two computers via parallel or serial ports and enables the computers to share disks and printer ports. For example, you could connect a laptop computer to a desktop computer and share files. You must install the INTERLNK.EXE device driver in your CONFIG.SYS file. Connection to the client machine running INTERSVR will be automatic when you reboot your computer. You can also use INTERLNK as a command from the DOS prompt once installed.
Syntax (from CONFIG.SYS)- device=c:dosINTERLNK.EXE
To control INTERLNK connections from the DOS prompt use this command.
- INTERLNK [client[:]=[server][:]]
Parameters:
- client
- Specifies the letter of the client drive that is redirected to a drive on the Interlnk server. The drive must be one that was redirected when you started Interlnk.
- server
- Specifies the letter of the drive on the server that will be redirected. The drive must be one listed in the This Computer (Server) column of the Interlnk server screen. If no drive letter is specified, the client drive will no longer be redirected.
Prior Lesson | Index | Syllabus |
viking.delmar.edu Last modified Aug 15 | mpharris@surf.delmar.edu Copyright © 1998 |
Home > Articles > Certification > CompTIA
␡- Numbering Systems Used in Computers
This chapter is from the book
This chapter is from the book
In this chapter
Measurement: Bits, Bytes, and Beyond
Numbering Systems Used in Computers
Serial Versus Parallel Information Transfer
How do computers measure information? By the byte. It's the basic unit of measurement for all parts of the computer that involve the storage or management of information (RAM, storage, ROM). Here are a few examples:
Software stored on a floppy or hard disk occupies a finite number of bytes.
RAM is measured in megabytes (1MB = 1,000,000 bytes).
Drive capacity is measured in gigabytes (1GB = 1,000,000,000 bytes).
Understanding bytes and the other measurements derived from bytes is essential to choosing the correct sizes for RAM configurations, storage media, and much more. Some of the A+ Certification test questions typically deal with RAM and hard disk size measurements, as will your day-to-day work.
NOTE
The CD included with this book contains important Study Lab material for this chapter, as well as Chapters 2–22 in this book. The Study Lab for each chapter contains terms to study, exercises, and practice tests—all in printable PDF format (Adobe Acrobat Reader is included on the CD, too). These Study Lab materials will help you gear up for the A+ Exam. Also, the CD includes an industry-leading test engine from PrepLogic, which simulates the actual A+ test so that you can be sure that you're ready when test day arrives. Don't let the A+ test intimidate you. If you've read the chapters, worked through the Study Lab, and passed the practice tests from PrepLogic, you should be well prepared to ace the test!
Also, you'll notice that some words throughout each chapter are in bold format. These are study terms that are defined in the Study Lab. Be sure to consult the Study Lab when you are finished with this chapter to test what you've learned.
So, what's a byte? If you are storing text-only information in the computer, each character of that text (including spaces and punctuation marks) equals a byte. Thus, to calculate the number of bytes in the following sentence, count the letters, numbers, spaces, and punctuation marks:
From this scale, you can see that the sentence uses 44 bytes. You can prove this to yourself by starting up Windows Notepad (or using MS-DOS's EDIT) and entering the text just as you see it printed here. Save the text as EXAMPLE.TXT and view the directory information (MS-DOS) or the File properties. You'll see that the text is exactly 44 bytes.
Do most computer programs store just the text when you write something? To find out, start up a word-processing program, such as Windows WordPad or Microsoft Word. Enter the same sentence again, and save it as EXAMPLE.If you use WordPad, save the file as a Rich Text Format (.RTF) file and as a Microsoft Word (.DOC) file. Depending upon the exact version of WordPad or Microsoft Word you use, the file takes up much more space. For example, WordPad for Windows XP saves text as an RTF file, using 243 bytes to store the file. The same sentence takes 19,968 bytes when saved as a .DOC file by Microsoft Word XP!
What happened? The next section explains this apparent oddity.
File Overhead and Other Features
When data you create is stored in a computer, it must be stored in a particular arrangement suitable for the program that created the information. This arrangement of information is called the file format.
A few programs, such as MS-DOS Edit and Windows Notepad, store only the text you create. What if you want to boldface a certain word in the text? A text-only editor can't do it. All that Edit and Notepad can store is text. As you have seen, in text-only storage, a character equals a byte.
In computer storage, however, pure text is seldom stored alone. WordPad and other word-processing programs such as Microsoft Word and Corel WordPerfect enable you to boldface, underline, italicize, and make text larger or smaller. You can also use different fonts in the same document (see Chapter 10, 'Printers,' for more about that).
Most modern programs also enable you to insert tables, create columns of text, and insert pictures into the text. Some, such as Microsoft Word, have provisions for tracking changes made by different users. In other words, there's a whole lot more than text in a document.
To keep all this non-text information arranged correctly with the text, WordPad and other programs must store references to these additional features along with the text, making even a sentence or two into a relatively large file, even if none of the extra features is actually used in that particular file. Thus, for most programs, the bytes used by the data they create is the total of the bytes used by the text or other information created by the program and the additional bytes needed to store the file in a particular file format.
Because different programs store data in different ways, it's possible to have an apparent software failure take place because a user tries to open a file made with program A with program B. Unless program B contains a converter that can understand and translate how program A stores data, program B can't read the file, and might even crash. To help avoid problems, Windows associates particular types of data files with matching programs, enabling you to open the file with the correct program by double-clicking the file in Explorer or File Manager. You'll learn more about file associations in Chapter 18, 'Using and Optimizing Windows.'
Numbering Systems Used in Computers
Three numbering systems are used in computers: decimal, binary, and hexadecimal. Decimal is also known as base 10. Binary is also known as base 2, and hexadecimal is also known as base 16. Here's an illustration to help you remember the basic differences between them.
You already are familiar with the decimal system: Look at your hands. Now, imagine your fingers are numbered from 0–9, for a total of 10 places. Decimal numbering is sometimes referred to as base 10.
The binary system doesn't use your fingers; instead, you count your hands: One hand represents 0, and the other 1, for a total of two places. Thus, binary numbering is sometimes referred to as base 2.
The hexadecimal system could be used by a pair of spiders who want to count: One spider's legs would be numbered 0–7, and the other spider's legs would be labeled 8, 9, A–F to reach a total of 16 places. Hexadecimal numbering is sometimes referred to as base 16.
TIP
Although all data in the computer is stored as a stream of binary values (0s and 1s), most of the time you will use decimal ('512MB of RAM') or hexadecimal ('memory conflict at C800 in upper memory') measurements. The typical rule of thumb is to use the system that produces the smallest meaningful number. If you need to convert between these systems, you can use any scientific calculator, including the Windows Calculator program (select View, Scientific from the menu).
Decimal Numbering System
We use the decimal or base 10 system for everyday math. A variation on straight decimal numbering is to use 'powers of 2' as a shortcut for large values. For example, drive storage sizes often are defined in terms of decimal bytes, but the number of colors that a video card can display can be referred to as '24-bit' (or 224), which is the same as 16,777,216 colors.
Binary Numbering System
All data is stored in computers in a stream of 1s (on) and 0s (off). Because only two characters (0 and 1) are used to represent data, this is called a 'binary' numbering system. Text is converted into its numerical equivalents before it is stored, so binary coding can be used to store all computer data and programs.
Table 3.1 shows how you would count from 1 to 10 (decimal) in binary.
Table 3.1 Decimal Numbers 1–10 and Binary Equivalents
Decimal | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Binary | 1 | 10 | 11 | 100 | 101 | 110 | 111 | 1000 | 1001 | 1010 |
Because even a small decimal number occupies many places if expressed in binary, binary numbers are usually converted into hexadecimal or decimal numbers for calculations or measurements.
TIP
Table 3.2 provides a listing of powers of 2, but you can use the Windows Calculator in scientific view mode to calculate any power of two you want. Just enter 2, click the x^y button, and enter the value for the power of 2 you want to calculate (such as 24). The results are displayed instantly (you add the commas). Use the Edit menu to copy the answer to the Windows Clipboard, and use your program's Paste command to bring it into your document. Sure beats counting on your fingers!
There are several ways to convert a decimal number into binary:
Use a scientific calculator with conversion.
Use the division method.
Use the subtraction method.
To use the division method
Divide the number you want to convert by 2.
Record the remainder: If there's no remainder, enter 0. If there's any remainder, enter 1.
Divide the resulting answer by 2 again.
Repeat the process, recording the remainder each time.
Repeat the process until you divide 0 by 2. This is the last answer.
When the last answer is divided, the binary is recorded from Least Significant Bit (LSB) to Most Significant Bit (MSB). Reverse the order of bit numbers so that MSB is recorded first and the conversion is complete. For example, to convert the decimal number 115 to binary using the division method, follow the procedure listed in Figure 3.1.
Figure 3.1 Converting decimal 115 to binary with the division method.
If you use a scientific calculator (such as the scientific mode of the Windows Calculator) to perform the conversion, keep in mind that any leading zeros will be suppressed. For example, the calculation in Figure 3.1 indicates the binary equivalent of 115 decimal is 01110011. However, a scientific calculator will drop the leading zero and display the value as 1110011.
NOTE
Once you understand how binary numbering works, you can appreciate a joke going the rounds on the Internet and showing up on T-shirts near you:
'There are 10 kinds of people in the world—those who understand binary and those who don't.' T-shirts are available from Think Geek (http://www.thinkgeek.com).
To use the subtraction method
Look at the number you want to convert and determine the smallest power of 2 that is greater than or equal to the number you want to subtract. Table 3.2 lists powers of 2 from 20 through 217. For example, 115 decimal is less than 27 (128) but greater than 26 (64).
Subtract the highest power of 2 from the value you want to convert. Record the value and write down binary 1.
Move to the next lower power of 2. If you can subtract it, record the result and also write down binary 1. If you cannot subtract it, write down binary 0.
Repeat step 3 until you attempt to subtract 20 (1). Again, write down binary 1 if you can subtract it, or binary 0 if you cannot. The binary values (0 and 1) you have recorded are the binary conversion for the decimal number. Unlike the division method, this method puts them in the correct order; there's no need to write them down in reverse order.
For example, to convert 115 decimal to binary using the subtraction method, see Figure 3.2.
Figure 3.2 Converting 115 decimal to binary with the subtraction method.
Table 3.2 Powers of 2
Power of 2 | Decimal Value | Power of 2 | Decimal Value |
20 | 1 | 29 | 512 |
21 | 2 | 210 | 1024 |
22 | 4 | 211 | 2048 |
23 | 8 | 212 | 4096 |
24 | 16 | 213 | 8192 |
25 | 32 | 214 | 16384 |
26 | 64 | 215 | 32768 |
27 | 128 | 216 | 65536 |
28 | 256 | 217 | 131072 |
Hexadecimal Numbering System
A third numbering system used in computers is hexadecimal. Hexadecimal numbering is also referred to as base 16, a convenient way to work with data because 16 is also the number of bits in 2 bytes or 4 nibbles. Hexadecimal numbers use the digits 0–9 and letters A–F to represent the 16 places (0–15 decimal). Hexadecimal numbers are used to represent locations in data storage, data access, and RAM. Table 3.3 shows how decimal numbers are represented in hex.
CAUTION
You might need to convert decimal to binary numbers for the A+ Certification exam, so try both pencil and paper methods (division and subtraction) and get comfortable with one of them.
Table 3.3 -Decimal and Hexadecimal Equivalents
Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
To convert decimal to hexadecimal, use the same division method listed previously, but use 16 rather than 2 as the divisor.
Figure 3.3 demonstrates how to use this conversion process to convert the decimal number of 65,536 (the start of upper memory) to its hexadecimal equivalent (A0000).
Figure 3.3 Converting 65,536 decimal to hexadecimal.
Note that if you use the Windows Calculator in scientific mode to perform this conversion that you will get an answer of 100000. The initial value 10 is the numeric equivalent of hex A (refer to Table 3.3).
The most typical uses for hexadecimal numbering are
Upper memory addresses for add-on cards and for memory-management use
I/O port addresses for use with an add-on card
Binary Versus Decimal MB/GB
Although a byte represents the basic 'building block' of storage and RAM calculation, most measurements are better performed with multiples of a byte. All calculations of the capacity of RAM and storage are done in bits and bytes. Eight bits is equal to one byte.
Table 3.4 provides the most typical values and their relationship to the byte.
Table 3.4 Decimal and Binary Measurements
Measurement | Number of Type* | Bytes/Bits | Calculations | Notes |
Bit | 1/8 of a byte | Byte/8 | ||
Nibble | 1/2 of a byte | Byte/4 (4 bits) | ||
Byte | 8 bits | bit*8 | ||
Kilobit (Kb) | D | 1,000 bits | ||
Kibibit (Kib) | B | 1,024 bits | 1 | |
(128 bytes) | ||||
Kilobyte (KB) | D | 1,000 bytes | ||
Kibibyte (KiB) | B | 1,024 bytes | 2 | |
Megabit (Mb) | D | 1,000,000 bits | 1 kilobit2 | |
Mebibit (Mib) | B | 1,048,576 bits (131,072 bytes) | 1 kibibit2 | 3 |
Megabyte (MB) | D | 1,000,000 bytes | 1,000KB | |
Mebibyte (MiB) | B | 1,048,576 bytes (1,024KiB) | 1 kilobyte2 | 4 |
Gigabit (Gb) | D | 1,000,000,000 bits | 1 kilobit3 | |
Gibibit (Gib) | B | 1,073,741,824 bits | 1 kibibit3 | 5 |
Gigabyte (GB) | D | 1,000,000,000 bytes | 1 kilobyte3 | |
Gibibyte (GiB) | B | 1,073,741,824 bytes | 1 kibibyte3 | 6 |
D=Decimal B=Binary
1Also known as binary kilobit
2Also known as binary kilobyte
3Also known as binary megabit
4Also known as binary megabyte
5Also known as binary gigabit
6Also known as binary gigabyte
Until December 1998, the terms kilobit, kilobyte, megabit, megabyte, gigabit, and gigabyte were officially used to refer both to decimal and binary values. A great deal of confusion in the industry has been caused by the indiscriminate use of both types of measurements for hard disk storage. Although the binary multiples shown in Table 3.4 are an IEC standard, many vendors in the computer business don't yet use the term kibibits or other binary multiples yet.
TIP
Because the industry has not yet widely adopted the terms kibi, mebi, and gibi, the A+ Certification Exam might use KB, MB, and GB to refer to either type of numbering system.
Floppy and hard disk manufacturers almost always rate their drives in decimal megabytes (multiples of 1 million bytes) or decimal gigabytes (multiples of 1 billion bytes), which is also the standard used by disk utilities, such as CHKDSK, ScanDisk, and FORMAT. However, most BIOSs and the MS-DOS/Windows FDISK and Windows NT/2000/XP Disk Management utilities list drive sizes in mebibytes (binary megabytes) or gibibytes (binary gigabytes). Mebibytes are also used to specify the size of rewritable and recordable CD and DVD media. Although the actual number of bytes is identical, the differences in numbering are confusing.
Take a hard disk rated by its maker as 8.4GB. This is 8,400,000,000 bytes (decimal). However, when the drive is detected and configured by the BIOS and partitioned with FDISK, its size is listed as only 7.82GB (binary GB—more accurately referred to as GiB). At first glance, you might believe you've lost some capacity (see Figure 3.4).
Figure 3.4 The capacity of an 8.4GB hard disk size is 8.4 billion bytes (top bar), but most BIOSs and Windows FDISK/Disk Management measure drives in binary gigabytes (bottom bar).
However, as you've already seen, there is a substantial difference between the number of bytes in a binary gigabyte and one billion bytes. This different numbering system, not any loss of bytes, accounts for the seeming discrepancy. Use this information to help explain to a customer that the 'missing' capacity of the hard disk isn't really missing (see Figure 3.5).
Figure 3.5 A gibibyte (or binary gigabyte) has over 73 million more bytes than a decimal gigabyte (1 billion bytes).
Use the values in Table 3.4 to convert between decimal and binary values for drive sizes or other measurements. For the exam, keep in mind that values that can be divided by 1,000 are decimal, while values that can be divided by 1,024 are binary.
Related Resources
- Premium Edition eBook $47.99
- Book $47.99
- Book $23.99