Chapter 1 Introduction Flashcards
What is hardware? What is software?
The hardware of a computer system consists of its physical components such as a circuit board, monitor, or keyboard. Computer software consists of the programs that are executed by the hardware and the data that those programs use. Hardware is tangible, whereas software is intangible. In order to be useful, hardware requires software and software requires hardware
What are the two primary functions of an operating system?
The operating system provides a user interface and efficiently coordinates the use of resources such as main memory and the CPU.
The music on a CD is created using a sampling rate of 44,000 measurements per second. Each measurement is stored as a number that
represents a specific voltage level. How many such numbers are used
to store a three-minute long song? How many such numbers does it
take to represent one hour of music?
It takes 7,200,000 numbers for a three-minute song (40,000 * 60 * 3) and 144,000,000 numbers for one hour of music (40,000 * 60 * 60)
What happens to information when it is stored digitally?
The information is broken into pieces, and those pieces are represented
as numbers.
How many unique items can be represented with the following?
a. 2 bits
b. 4 bits
c. 5 bits
d. 7 bits
In general, N bits can represent 2^N unique items. Therefore:
a. 2 bits can represent 4 items because 2^2 = 4.
b. 4 bits can represent 16 items because 2^4 = 16.
c. 5 bits can represent 32 items because 2^5 = 32.
d. 7 bits can represent 128 items because 2^7 = 128
Suppose you want to represent each of the 50 states of the United
States using a unique permutation of bits. How many bits would be
needed to store each state representation? Why?
It would take 6 bits to represent each of the 50 states. Five bits is not
enough because 2^5 = 32 but six bits would be enough because 2^6 = 64.
How many bytes are in each of the following?
a. 3 KB
b. 2 MB
c. 4 GB
A kilobyte (KB) is 2^10 = 1,024 bytes, a megabyte (MB) is 2^20 = 1,048,576 bytes, and a gigabyte (GB) is 2^30 = 1,073,741,824 bytes. Therefore:
a. 3 KB = 3 * 1,024 bytes = 3,072 bytes = approximately
3 thousand bytes
b. 2 MB = 2 * 1,048,576 bytes = 2,097,152 bytes =
approximately 2.1 million bytes
c. 4 GB = 4 * 1,073,741,824 bytes = 4,294,967,296 bytes = approximately 4.3 billion bytes
How many bits are there in each of the following?
a. 8 bytes
b. 2 KB
c. 4 MB
There are eight bits in a byte. Therefore:
a. 8 bytes = 8 * 8 bits = 64 bits
b. 2 KB = 2 * 1,024 bytes = 2,048 bytes = 2,048 * 8 bits = 16,384 bits
c. 4 MB = 4 * 1,048,576 bytes = 4,194,304 bytes = 4,194,304 * 8 bits = 33,554,432 bits
The music on a CD is created using a sampling rate of 44,000 measurements per second. Each measurement is stored as a number that
represents a specific voltage level. Suppose each of these numbers
requires two bytes of storage space. How many MB does it take to
represent one hour of music?
Under the stated conditions, one hour of music would require 288,000,000 bytes (40,000 * 60 * 60 * 2). Dividing this number by the number of bytes in a megabyte (1,048,576 bytes) gives approximately 275 MB. Note that a typical audio CD has a capacity of about 650 MB and can store about 70 minutes of music. This coincides with an actual sampling rate of 41,000 measurements per second, two bytes
of storage space per measurement, and the need to store two streams of music to produce a stereo effect.
What are the two primary hardware components in a computer? How
do they interact?
The two primary hardware components are main memory and the CPU. Main memory holds the currently active programs and data. The CPU
retrieves individual program instructions from main memory, one at a time, and executes them
What is a memory address?
A memory address is a number that uniquely identifies a particular memory location in which a value is stored.
What does volatile mean? Which memory devices are volatile and
which are nonvolatile?
Main memory is volatile, which means the information that is stored in it will be lost if the power supply to the computer is turned off. Secondary memory devices are nonvolatile; therefore, the information
that is stored on them is retained even if the power goes off.
Select the word from the following list that best matches each of the
following phrases:
controller, CPU, main, network card, peripheral, RAM, register,
ROM, secondary
a. Almost all devices in a computer system, other than the CPU and
the main memory, are categorized as this.
b. A device that coordinates the activities of a peripheral device.
c. Allows information to be sent and received.
d. This type of memory is usually volatile.
e. This type of memory is usually nonvolatile.
f. This term basically is interchangeable with the term “main memory.”
g. Where the fundamental processing of a computer takes place.
The word that best matches is
a. peripheral
b. controller
c. modem
d. main or RAM
e. secondary or ROM
f. RAM
g. CPU
What is a file server?
A file server is a network computer that is dedicated to storing and providing programs and data that are needed by many network users.
What is the total number of communication lines needed for a fully
connected point-to-point network of five computers? Six computers?
Counting the number of unique connections in Figure 1.16, there are 10 communication lines needed to fully connect a point-to-point network of five computers. Adding a sixth computer to the network will require
that it be connected to the original five, bringing the total to 15 communication lines.
Describe a benefit of having computers on a network share a communication line. Describe a cost/drawback of sharing a communication line.
Having computers on a network share a communication line is cost effective because it cuts down on the number of connections needed and
it also makes it easier to add a new computer to the network. Sharing lines, however, can mean delays in communication if the network is busy
What is the etymology of the word Internet?
The word Internet comes from the word internetworking, a concept related to wide-area networks (WANs). An internetwork connects one
network to another. The Internet is a WAN.
The TCP/IP set of protocols describes communication rules for software that uses the Internet. What does TCP stand for? What does IP
stand for?
TCP stands for Transmission Control Protocol. IP stands for Internet Protocol. A protocol is a set of rules that govern how two things communicate.
Explain the parts of the following URLs:
a. duke.csc.villanova.edu/jss/examples.html
b. java.sun.com/products/index.html
Breaking down the parts of each URL:
a. duke is the name of a computer within the csc
subdomain
(the Department of Computing Sciences) of the
villanova.edu
domain, which represents Villanova University. The
edu top-level
domain indicates that it is an educational
organization. This URL
is requesting a file called examples.html from
within a subdirectory called jss.
b. java is the name of a computer (Web server) at the
sun.com domain, which represents Sun
Microsystems, Inc. The com toplevel domain
indicates that it is a commercial business. This
URL is requesting a file called index.html from
within a subdirectory called products.
When was the Java programming language developed? By whom?
When was it introduced to the public?
The Java programming language was developed in the early 1990s by James Gosling at Sun Microsystems. It was introduced to the public in 1995
Where does processing begin in a Java application?
The processing of a Java application begins with the main method.
What do you predict would be the result of the following line in a
Java program?
System.out.println(“Hello”); // prints hello
The characters “Hello” will be printed on the computer screen.
Which of the following are not valid Java identifiers? Why?
a. RESULT
b. result
c. 12345
d. x12345y
e. black&white
f. answer_7
All of the identifiers shown are valid except 12345 (since an identifier cannot begin with a digit) and black&white (since an identifier cannot contain the character &). The identifiers RESULT and result are both valid, but should not be used together in a program because they differ only by case. The underscore character (as in answer_7) is a valid part of an identifier.
Suppose a program requires an identifier to represent the sum of the
test scores of a class of students. For each of the following names,
state whether or not each is a good name to use for the identifier.
Explain your answers.
a. x
b. scoreSum
c. sumOfTheTestScoresOfTheStudents
d. smTstScr
Although any of the listed names could be used as the required identifier, the only “good” choice is scoreSum. The identifier x is not descriptive and is meaningless, the identifier sumOfTheTestScoresOfTheStudents is
unnecessarily long, and the identifier smTstScr is unclear.