经典原版书库
点击查看第二章
点击查看第三章
计算机文化(英文版第20版)
New Perspectives on Computer Concepts 2018: Comprehensive, 20th Edition, China Student Edition
[美]琼·詹姆里奇·帕森斯(June Jamrich Parsons)著
1 DIGITAL CONTENT
Digital Basics
TExT, NumBERS, muSIC, VIdEOS, images, and speech; all of this “stuff” is digital content. The amazing aspect of digital technol- ogy is that it distills such diverse content into 0s and 1s and stores them as pulses of electricity.
Objectives
◗ list three technologies that digital devices use
to physically store or transmit 1s and 0s.
◗ write the numbers 1 through 10 in binary.
◗ Decipher ASCII text.
◗ Demonstrate how to use the terms bit, byte, megabyte, megabit, and gigabyte in the context of data storage and digital devices.
Terminology
data data representation digital data analog data binary digitization bit
File file name extension file format
numeric data binary number system
character data ASCII Extended ASCII unicode uTF-8 ASCII text delimiter OCr byte kilobit kilobyte megabit
megabyte gigabit gigabyte
data compression lossless compression lossy compression
◗ Distinguish between data that would be
represented by binary numbers and data that
would be represented by ASCII or unicode.
◗ Explain how OCr relates to ASCII and unicode.
◗ Describe the difference between lossy and
lossless compression.
◗ Demonstrate how to compress a file.
DATA represenTATiOn BAsiCs
Digital content, such as ebooks, documents, images, music, and video, is a compilation of data. Data refers to the symbols that represent people, events, things, and ideas. Data can be a name, a number, the colors in a photograph, or the notes in a musical composition.
◗ Is there a difference between data and information? In everyday conversation, people use the terms data and information interchangeably. However, some technology professionals make a distinction between the two terms. They define data as the symbols that represent people, events, things, and ideas. Data becomes information when it is presented in a format that people can understand and use. As a general rule, remember that (technically speaking) data is used by machines, such as computers; information is used by humans.
◗ What is data representation? Data representation refers to the form in which data is stored, processed, and transmitted. Devices such as smartphones, iPods, and computers store data in digital formats that can be handled by electronic circuitry. Today, digital data representation has replaced the analog methods previously used for storing and transmitting photos, videos, and text.
◗ What’s the difference between analog and digital? Digital data is text, numbers, graphics, sound, and video that have been con- verted into discrete digits such as 0s and 1s. In contrast, analog data is represented using an infinite scale of values. For a simple illustration of the difference between analog and digital, consider the way you can control the lights in a room using a traditional light switch or a dimmer switch.
A dimmer switch has a rotating dial that controls a continuous range of brightness. It is, therefore, analog. A traditional light switch, on the other hand, has two discrete states: on and off. There are no in-between states, so this type of light switch is digital.
A traditional light switch is also binary because there are only two possible states. Technically, a digital device could represent data using more than two states. Some of the earliest computers represented numbers using the decimal system. Today, however, most digital devices represent numbers and other data using the binary system.
Terminology
The word data can be correctly treated either as a plural noun
or as an abstract mass noun,
so the phrases “The data are
being processed” and “The data is being processed” are both
correct usage. In this textbook, the word data is paired with
singular verbs and modifiers.
Which of the devices on the
left illustrate analog data
representation?
- The speedometer and
- The television and the vinyl
- All but the speedometer
- All but YouTube and the clock
◗How does digital data work? The process of converting informa- tion, such as text, numbers, photos, or music, into digital data that can be manipulated by electronic devices is called digitization.
Imagine that you want to send a message by flashing a light. Your light switch offers two states: on and off. You can use sequences of ons and offs to represent various letters of the alphabet. To write down the representa- tion for each letter, you can use 0s and 1s. The 0s represent the off state of your light switch; the 1s indicate the on state. For example, the sequence on on off off would be written as 1100, and you might decide that sequence represents the letter A.
The 0s and 1s used to represent digital data are referred to as binary digits. It is from this term that we get the word bit—binary digit. A bit is a 0 or 1 used in the digital representation of data.
Digital devices are electronic and so you can envision bits flowing within these devices as pulses of light. But digital signals can take many forms, as shown in Figure 1-1.
◗ How is digital data stored? Digital data is typically stored in files. A digital file, usually referred to simply as a file, is a named collection of data that exists on a storage medium, such as a hard disk, CD, DVD, or flash drive. A file can contain data for a term paper, Web page, email message, or video, for example.
Every file has a unique name, such as Thriller.mp3. A file name extension, such as .mp3, can be appended to the end of the file name after a period. This extension indicates the file format; the type of data in the file and the way it is encoded. Let’s take a look at how numbers, text, images, sound, and video are encoded into digital formats that become computer files.
QuiCkCheCk
Digital devices work with bits in
all of the following ways except: a. voltage variations
- light and dark spots
- analog values
- orientation of magnetized
particles
represenTing nuMBers
Numeric data consists of numbers that can be used in arithmetic opera- tions. For example, your annual income is numeric data, as is your age. That concept seems obvious, but some data that looks numeric is represented differently. Social Security numbers, telephone numbers, street numbers, and similar data are not represented by numeric data. These “numerals” are not considered numeric data because they are never used in mathemati- cal calculations. This numeric quirk is a key concept in the digital world and turns up when you work with spreadsheets, databases, and computer pro- gramming.
◗How do digital devices represent numbers? Digital devices rep- resent numeric data using the binary number system, also called base 2. The binary number system has only two digits: 0 and 1. No numeral like 2 exists in this system, so the number “two” is represented in binary as 10 (pronounced “one zero”). You’ll understand why if you think about what happens when you’re counting from 1 to 10 in the familiar decimal system. After reaching 9, you run out of digits. For ten, you have to use the digits 10—zero is a placeholder and the 1 indicates one group of tens.
In binary, you just run out of digits sooner—right after you count to 1. To get to the next number, you use 0 as a placeholder and 1 indicates one group of twos. In binary, then, you count 0 (zero), 1 (one), 10 (one zero), instead of counting 0, 1, 2 in decimal. If you need to brush up on binary numbers, refer to Figure 1-2.
The important point to understand is that the binary number system allows digital devices to represent virtually any number simply by using 0s and 1s. Digital devices can then perform calculations using these numbers. The ability to perform rapid and accurate calculations was the key feature of the first computers, and it now provides the foundation for online banking, ecommerce, and many other number-crunching applications.
QuiCkCheCk
Which one of the following is
considered numeric data?
- Passport number
- Telephone number
906-222-3450 - The $28,995.00 cost of a car
- The address 22 E. Main Street
QuiCkCheCk
Figure 1-2 shows the binary
equivalent for numbers 0 through 11 and 1000. What is the binary equivalent for the number 12?
- 10111
- 1100
- 10000
- 1111
represenTing TexT
Character data is composed of letters, symbols, and numerals that are not used in calculations. Examples of character data include your name, address, and hair color. Character data is commonly referred to as “text.”
◗ How do digital devices represent text Digital devices employ several types of codes to represent character data, including ASCII, Unicode, and their variants. ASCII (American Standard Code for Information Interchange, pronounced “ASK ee”) requires seven bits for each charac- ter. For example, the ASCII code for an uppercase A is 1000001. ASCII provides codes for 128 characters, including uppercase letters, lowercase letters, punctuation symbols, and numerals.
Extended ASCII is a superset of ASCII that uses eight bits for each char- acter. For example, Extended ASCII represents the uppercase letter A as 01000001. Using eight bits instead of seven bits allows Extended ASCII to provide codes for 256 characters. The additional Extended ASCII charac- ters include boxes and other graphical symbols.
Unicode (pronounced “YOU ni code”) uses sixteen bits and provides codes for 65,000 characters—a real bonus for representing the alphabets of mul- tiple languages.
UTF-8 is a variable-length coding scheme that uses seven bits for common ASCII characters, but uses 16-bit Unicode as necessary.
Take a look at the ASCII codes in Figure 1-3. Notice there is a code for the space character in addition to codes for symbols, numerals, uppercase let- ters, and lowercase letters.
QuiCkCheCk
Write out Hi! in Extended ASCII
- (Hint: Use an uppercase H, but a lowercase i.)
◗Why are there ASCll codes for numbers? While glancing at the table ofASCll codes in Figure 1-3, you might have wondered why the table contains codes for 0, 1, 2, 3, and so on. Aren't these numbers represented by the binary number system? Yes, the binary number system is used for representing numeric data, but these ASCll codes are used for numerals, such as Social Security numbers and phone numbers that are not used for [f your address is 10 8 Street, what calculations. For example, 475-6677 is a phone number; it is not a formula are the first three bytes in ASCH? that means subtract 6677 from 475. I ◗Where is digital text used? Digital text is everywhere. it is the foun- dation for all kinds of digital documents, Web sites, social media sites, games, and email. it is also the basis for ebooks designed for Kindles and C- 00110001 00110111 00100000 other ebook readers. a. 00110001 00110000 01000010 b. 00110001 00110000 00100000
Documents produced on a digital device are stored as a string of 13 and Os encoded as ASCll, Unicode, or UTF-8. Some kinds of documents simply contain this plain text, whereas other documents contain formatting codes to produce bold fonts, columns, and other effects.
◗What is plain text? Plain, unformatted text is sometimes called ASCll text and is stored in a so-called "text file" with a name ending in .txt. On Apple devices, these files are labeled "Plain Text." ln Windows, these files are labeled "Text Document," like this:
ASCll text files can be created with text editors, such as TextEdit and Notepad. They are typically used for writing computer programs because executable program code cannot include formatting such as underlining and special fonts, They can also be used for creating Web pages.
Text files can usually be opened by any word processing software regard- less of the type of device. in that sense, they are universal. Figure 1-4 illustrates an ASCll text file and the actual binary code that is stored for it.
QUICKCHECK
if your address is 10 B Street, what are the first three bytes in ASCH?
- 00110001 00110000 01000010
- 00110001 00110000 00100000
C- 00110001 00110111 00100000
QUICKCHECK
What is the seventh bvte in the
Roller Coasters file?
- Uppercase c (01000011)
- Lowercase c (01100011)
- Space(00100000)
- Carriage return (00001101)
◗How does formatting get added to documents? ASCll text files contain no formatting. They have no bold, italics, underlining, or font colors. There are no margins, columns, bullets, headers, or page numbers.
Suppose you want the title of the Roller Coasters document to be centered and shown in a large, bold font, like this:
To create documents with styles and formats, formatting codes have to be embedded in the text. There are many techniques for doing so, and each one produces a unique file format. These formats can be opened by the software that produced them. Opening those files with other kinds of soft- ware requires conversion.
Microsoft Word produces formatted text and creates documents in DOCX format, whereas Apple Pages produces documents in PAGES format. Adobe Acrobat produces documents in PDF format. The HTML markup lan- guage used for Web pages produces documents in HTML format. Ebooks Terminology
are created usmg the EPUB format. A delimiter is a special character Formatting codes can be added to documents directly within the text used to separate commands or stream, using some sort of delimiter to signal the beginning and end of formatting characters from the the formatting command. When the document is displayed, the formatting rest of the text in a file. Slashes codes are hidden.
◗What do those hidden codes look like? Figure 1-5 gives // and angle brackets < > are you a behind-the-scenes look at the Roller Coasters document with all the commonly used delimiters. embedded formatting codes revealed.
Terminology
A delimiter is a special character
used to separate commands or
formatting characters from the
rest of the text in a file. Slashes
// and angle brackets < > are
commonly used delimiters.
What happens when I scan a document? When using a scanner to digitize a document, you may have a choice between graphics formats and OCR. Graphics formats, presented later in the module, essentially capture a photo of the document. Individual letters and punctuation marks are not encoded as ASCII. A document scanned into a graphics format cannot be edited using a word processor.
OCR (optical character recognition) is a process that interprets individual characters during or after a scan. It assigns the appropriate ASCII code to each letter and outputs the document in a format that can be edited using word processing software. OCR software is available for most scanners and is handy when you have a printed copy of a document that you want to modify, but would prefer not to retype.
BiTs AnD ByTes
All of the data stored and transmitted by digital devices is encoded as bits. Terminology related to bits and bytes is extensively used to describe storage capacity and network access speed. As a digital-goods consumer, you’ll want to have this terminology handy.
◗ What is the difference between bits and bytes? Even though the word bit is an abbreviation for binary digit, it can be further abbreviated, usually as a lowercase b. A group of eight bits is called a byte and is usually abbreviated as an uppercase B. Transmission speeds are expressed in bits, whereas storage space is expressed in bytes. For example, a cable Internet connection might transfer data from the Internet to your computer at 50 megabits per second. In an iPad ad, you might notice that it can store up to 60 gigabytes of music and video.
◗What do the prefixes kilo-, mega-, giga-, and tera- mean? When reading about digital devices, you’ll frequently encounter references such as 90 kilobits per second, 1.44 megabytes, 2.4 gigahertz, and 2 terabytes. Kilo, mega, giga, tera, and similar terms are used to quantify digital data as shown in Figure 1-6.
◗ Why such odd numbers? In common usage, kilo, abbreviated as K, means a thousand. For example, $50K means $50,000. In the context of computers, however, 50K means 51,200. Why the difference? In the decimal number system we use on a daily basis, the number 1,000 is 10 to the third power, or 103. For digital devices where base 2 is the norm, a kilo is precisely 1,024, or 210. Mega is derived from 220 and giga from 230.
QuiCkCheCk Which one of the following would most likely require OCR? a. A two-page bibliography of award-winning books from 1945 that you would like to annotate b. An excerpt from a magazine article that you want to include in a term paper c. A football poster containing the home game schedule d. A page from a handwritten diary that you want to include in a historical biography
Try iT! Scan a one-page document using a scanner or a multifunction printer. The default format for the scan is probably a JPEG or PNG graphic. Try using your scanner’s OCR feature or a free online OCR service to convert the scan into a document that can be edited using word processing software.
Terminology What’s a kibibyte? Some computer scientists have proposed alternative terminology to dispel the ambiguity in terms such as kilo that can mean 1,000 or 1,024. They suggest the following prefixes: Kibi = 1,024 Mebi = 1,048,576 Gibi = 1,073,741,824
I When do ! use bits and when do ! use bytes? As a general rule, use bits for data rates, such as lnternet connection speeds and movie download speeds. Use bytes for file sizes and storage capacities. Figure 1-7 provides some examples.
COMPRESSlON
All those 13 and Os can quickly expand the size of digital files. Whereas an "A" is simply one character in a printed document, it requires seven bits when represented as ASCll and sixteen bits when represented as Unicode. That "1" in '1st place" seems like it could be represented by a simple 1 bit, but it requires multiple bits when encoded. Numeric data also requires lots of bits. The number 10 is 1010 in binary and requires four bits.
To reduce file size and transmission times, digital data can be compressed. Data compression refers to any technique that recodes the data in a file so that it contains fewer bits. Compression is commonly referred to as "zip- ping." Many compression techniques exist. They can be divided into two categories: lossless and lossy.
◗What is the difference between lossless and lossy compression?
Lossless compression provides a way to compress data and reconsti- tute it into its original state. Character data and numeric data in documents and spreadsheets are compressed using lossless techniques so that the uncompressed data is exactly the same as the original data.
Lossy compression throws away some of the original data during the compression process. After the data is uncompressed, it is not exactly the same as the original. This type of compression is typically used for music, images, and videos because the human ear or eye cannot discern minor changes. Later in the module, you'll learn more about the compression techniques used to shrink the size of music, image, and video files.
QUlCKCHECK
My iPhone has 8 of storage space; I uploaded a high-resolution 8- graphic; and ! am going to download a small 8 file.
- GB, MB, Mbps
- MB, GB, KB
- 68, MB, KB
- Mbps, MB, GB
QUlCKCHECK
Which one of the following requires lossless compression?
- A very large document that you intend to send as an email attachment
- A photo of your class reunion that you intend to post on your Facebook page
- An iTunes track saved to your iPod that you want to back up on your computer
◗How do I compress data? The software for compressing data is sometimes referred to as a compression utility or a zip tool. Most computers include software for compressing data, but tablets and smartphones may require a third-party app for working with compressed data. On laptops and desktop computers, the compression utility is accessed from the same screen used to manage files. You can compress the date in a single file or you can combine multiple files to create a single zipped file that is reconstituted to the original files when unzipped (Figure 1-8).
TRY lT!
Experiment with compressing
files to see how much they
- Try compressing a
document, then try a graphic.
QUICKCHECK
Compression utilities can be USEd to accompllsh all Of the following except:
- bundle two or more files into a single small file.
- enlarge a fiIe to increase its resolution
- up a sung e l e to ecrease lts size
- extract a flle to its original size and content
◗How do I return files to their uncompressed state? The process of reconstituting files is called extracting or unzipping. As with compression, most laptops and desktop computers include extraction and unzipping soft- ware; tablets and smartphones may require a third-party app.
Compressed files usually have .zip at the end of the file name and are rep- resented with specialty icons. Compressed files may also end with .gz, .pkg, or .tar.gz. These files have to be extracted or unzipped before you can view the data they contain. The process is easy. To extract a file on a Mac, simply double-click the zipped folder. With Windows (Figure 1-9), use the Compressed Folder Tools or Extract All option.