Absolute Beginners Guide to A+ Certification. Covers the Hardware and Operating Systems Exam
< Day Day Up > |
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 09, 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 07, and the other spider's legs would be labeled 8, 9, AF to reach a total of 16 places. Hexadecimal numbering is sometimes referred to as base 16. 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 2 24 ), which is the same as 16,777,216 colors.
tip
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 110 and Binary Equivalents
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
There are several ways to convert a decimal number into binary:
To use 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.
To use the subtraction method
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
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 09 and letters AF to represent the 16 places (015 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
Table 3.3. Decimal and Hexadecimal Equivalents
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
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
[*] D=Decimal B=Binary [1] Also known as binary kilobit [2] Also known as binary kilobyte [3] Also known as binary megabit [4] Also known as binary megabyte [5] Also known as binary gigabit [6] Also 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. 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.
tip
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 GBmore 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. |
< Day Day Up > |