PC Hardware A Beginner’s Guide

(ff) #1
 Anybble(pronounced “nibble”), shown in Figure 3-2, is a 4-bit binary word.
It holds the binary equivalent of the decimal values 0 to 15. An 8-bit binary
number is divided into two nybbles so it can hold two hexadecimal numbers
(see “The Hexadecimal System” later in the chapter).
 Amachine wordis the number of bits that are required to hold the largest binary
number a microprocessor can process. The machine word is commonly used to
refer to the bit size of the processor. For example, computers are often described
as having a 16-bit processor, a 32-bit processor, or a 64-bit processor.

Storing Data in a Byte


The byte is used on the computer to store many types of data. The eight bits of the byte
can hold the decimal values 0 to 255. If it seems odd to you that eight bits must be used to
store from one to three digits, remember that only binary 1s and 0s can be stored in the
byte’s bits. How these values are stored in a byte is by assigned each bit a different power
of two value. Table 3-1 shows the binary values assigned to each bit in the byte.
Understand that the first bit (bit 1 in Table 3-1) is the right-most bit in the byte. If you
add all of the decimal values for each bit in Table 3-1, the total is 255. The binary number
00000000 (the eight bits in a byte) represents 0 because none of the power of two values
is used in the number. To put it another way, none of the power of two values was turned
on. On the other hand, the binary value 11111111 represents 255 because all of the power
to two values are turned on and therefore included in the number represented. I’ll talk
about this more in Chapter 7 when I cover how alphabetic and special characters are
stored in memory.
If you wish to store a number larger than 255, you use more bits. This is where the
machine word comes in. You can store the number 32,767 in 16 bits; 32 bits can hold the
number 2,147,483,647; and 64 bits can represent the number 92,23,372,036,854,775,808
(my lucky number, by the way). If you aren’t convinced of the power of binary to represent
very large numbers, calculate the number that could be represented in 128 bits. Wow,
nowthat’sa large number!

(^42) PC Hardware: A Beginner’s Guide
Figure 3-2. A nybble holds a 4-bit hexadecimal value

Free download pdf