IT233 Test Bank
IT233 Test Bank
Moussa Academy
00201007153601
WWW.MOUSSAACADEMY.COM
1|Page www.MoussaAcademy.com
00201007153601
Chapter 1 Computers and Systems
1) The architecture of the computer system rests on a solid foundation that has changed only slightly and
gradually since the __________ .
a) late 1930s
b) late 1940s
c) late 1950s
d) late 1960s
2) The work performed by an individual computer system within the IT system can be characterized by
a) hardware and software
b) input, storage and output
c) storage processing and output
d) input, processing, and output.
3) As a matter of necessity, network interfaces must conform to standard agreements, known as ___________ ,
for messages to be understood by both computers during a message exchange between a pair of computers.
a) protocols
b) I/O services
c) device controllers
d) Ethernet standards
4) The components of an individual computer system consist of processing hardware, input devices, output
devices, storage devices,
a) and application programs.
b) and operating system software.
c) application software and operating system software.
d) application software, file storage, and data processing.
5) The _____________ provides the physical mechanisms to input and output data, to manipulate and process
data, and to electronically control the various input, output, and storage components.
a) data
b) network
c) computer hardware
d) computer software
6) What is the only requirement for data to be manipulated and processed by a computer?
a) The data type must be numeric.
b) The data must be represented in binary form.
c) The data type must be alphanumeric, graphic, sound or color.
d) The size of the data must be smaller than the capacity of the hard drive.
7) Which of the following is not part of the conceptual view of a CPU?
a) ALU
b) Control Unit
c) Interface Unit
d) Main memory
8) The main memory, often known as primary storage, working storage, or RAM (for random access memory),
holds
a) data.
b) program instructions.
c) program instructions and data.
d) program instructions, data, and instructions for booting the computer.
9) The idea that the program instructions and data are both stored in memory while being processed is known as
the
a) processing concept.
b) stored program concept.
c) data-instruction concept.
d) memory-data-instruction concept.
10) Many of the internal OS services are provided by the ___________ module, which contains the most
important operating system processing functions.
a) CPU
b) root
c) kernel
d) central
11) The operating system's ________________________ acts as an interface for application programs and
utilities to access the internal services provided by the operating system.
a) monitoring system
b) supervising system
c) application subsystem
d) application program interface
12) When the computer is started, a bootstrap or IPL (Initial Program Load) begins testing the system. Where is
this bootstrap program stored?
a) RAM
b) ROM
c) hard drive
d) virtual memory
13) The fact that different types of computers can work together, share files, and communicate successfully is
known as
a) supercomputing
b) open computing
c) distributed computing
d) coupled systems computing
14) The word, "virtual," as used in the text, is most synonymous with which word?
a) logical
b) notional
c) tangible
d) theoretical
15) ___________ are agreements among interested parties, often manufacturers, to assure that various system
components will work together interchangeably.
a) Manuals
b) Standards
c) References
d) Operating procedures
16) Unicode is a(n)
a) character encoding standard
b) video encoding standard
c) audio encoding standard
d) graphic encoding standard
17) MPEG-4 is a(n)
a) text standard
b) video standard
c) audio standard
d) graphic standard
18) MP3 is a(n)
a) text standard
b) video standard
c) audio standard
d) graphic standard
19) Which of the following is not a feature defined in a protocol specification for communication?
a) message format
b) data representation
c) Operating System vendor
d) identification and authentication
20) Storage devices communicate with a computer using protocols. One such protocol is:
a) SATA
b) PATA
c) serial encoded messages (SEM)
d) hard-disk parallel communications protocol (HDPC)
1) What do the following computing devices have in common: workplace computers, tablets, smartphones, and
computers embedded in other equipment?
Sol: from the text; “All contain at least one central processing unit (some contain more) and memory. All
provide a facility for interacting with long-term storage and other devices and with users. What may be
less obvious to you is that the programs that they run are also essentially similar, differing mostly in the
details required by the different components of the particular system and by the nature of the
applications.”
2) List five specific skills or abilities required of an information technology (IT) systems architect or system
analyst?
Here is an example:
1) Design and implement systems that meet an organization's information technology (IT) needs.
Sol: There are a lot of responsibilities listed in the text. Here are some:
2) Use cost and capabilities of the components that you select.
3) Justify the set of computer system components and the system architecture that are appropriate for a
particular job.
4) Determine the tradeoffs between other possible system architectures.
5) Assist management in making intelligent decisions about system strategy.
6) Analyze the best way to provide appropriate facilities to meet the needs of your users.
7) Differentiate between simple technological obsolescence and major advances that suggest a real need to
replace older equipment.
8) Understand the tradeoffs inherent in the use of cloud and other remote services.
9) Read and understand the technical specifications.
10) Know the differences between various CPU technologies and the advantages and disadvantages of
each.
11) Know what is required to build an intranet, and what the speed, and size, and performance
limitations of a particular system.
12) Compare the features of OS/X, Windows, and Linux knowledgeably and decide which ones are
important.
13) Apply your basic understanding of computers to new technologies and concepts such as mobile IT,
new network protocols, virtual machines and cloud services as they appear.
14) Learn to understand the jargon used by computer salespeople and judge the validity of their sales
claims.
3) The work performed by an individual computer system within the IT system can be characterized by the
Input-Process-Output (IPO) model. Use the IPO model to analyze the process of purchasing a soft drink from a
vending machine. Keep it simple!
4) On your home or school computer, find the CPU speed (in GHz), main memory size (in GB), and the size of
the hard drive (in GB). Also find the operating system and its version.
Sol: Answer will vary. May be more suitable for an exercise or take home test.
5) Pick one of the protocols listed below and report on its origin, purpose and supporting organization.
Recommend between 250 and 300 words. When using the Internet for research purposes, be sure to give the
Author (if available), date of article (if available), name or title of the webpage, URL and the date accessed.
Sol: Answer will vary. May be more suitable for an exercise or take home test.
Problem Answer Section in text / comments
1 b Section 1.0 Introduction
2 d Section 1.1 The Starting Point
3 a Section 1.1 The Starting Point
4 c Section 1.1 The Starting Point
5 c Section 1.2 Components of the Computer System
6 b Section 1.2 Components of the Computer System
7 d Section 1.2 Components of the Computer System
8 c Section 1.2 Components of the Computer System
9 b Section 1.2 Components of the Computer System
10 c Section 1.2 Components of the Computer System
11 d Section 1.2 Components of the Computer System
12 b Section 1.2 Components of the Computer System
13 b Section 1.2 Components of the Computer System
14 a Section 1.3 The Concept of Virtualization
15 b Section 1.4 Protocols and Standards
16 a Section 1.4 Protocols and Standards
17 b Section 1.4 Protocols and Standards
18 c Section 1.4 Protocols and Standards
19 c Section 1.4 Protocols and Standards
20 a Section 1.4 Protocols and Standards
Chapter 2 An Introduction to System Concepts
1) From a systems perspective, how would you classify a computer operating system?
a) A tangible system
b) A physical system
c) A conceptual system
d) A perceptible system
2) Anything outside the system boundary represents the _____________ that the system operates.
a) interface
b) subsystem
c) environment
d) super system
3) A large organization’s IT system might have specific programs such as marketing, manufacturing,
purchasing, inventory, finance, and accounting. These are considered ____________ to the larger IT system.
a) interfaces
b) subsystems
c) the environment
d) super systems
4) The division of a system or subsystem into its components and linkages is called
a) itemization
b) reconstruction
c) decomposition
d) categorization
5) What is not part of an abstract description of system architecture?
a) system constraints
b) system interconnections
c) linkages among the components
d) physical location of the servers
6) Which of the following are not input devices?
a) stylus
b) headphones
c) touch screen
d) mouse and keyboard
7) The system architecture representation of the flow and processing of data within an organization is called
a) three-tier architecture
b) application architecture
c) flow control architecture
d) customer oriented architecture
8) Scalability is the ability of a system to
a) handle a growing amount of work.
b) allow access to information when it is needed.
c) protect data against unauthorized access or modification.
d) allow configuration, monitoring, and maintaining operation.
9) Information availability is the ability of a system to
a) handle a growing amount of work.
b) allow access to information when it is needed.
c) protect data against unauthorized access or modification.
d) allow configuration, monitoring, and maintaining operation.
10) Data security is the ability of a system to
a) handle a growing amount of work.
b) allow access to information when it is needed.
c) protect data against unauthorized access or modification.
d) allow configuration, monitoring, and maintaining operation.
11) System administration is the ability of a system to
a) handle a growing amount of work.
b) allow access to information when it is needed.
c) protect data against unauthorized access or modification.
d) allow configuration, monitoring, and maintaining operation.
12) In a client-server architecture, the only limitations to running multiple applications on a single server are the
potential slowdowns that may result from the load on the server computer and
a) traffic on the Internet.
b) load on client computer.
c) users who open many web browsers.
d) the traffic on the network to that server.
13) A two-tier architecture simply means that there are ________ computers involved in the service.
a) one
b) two
c) two to five
d) two or more
14) A web-browser connected to a web-server is an example of
a) multiprocessing
b) cluster computing
c) n-tier architecture
d) client-server technology
15) Because response time is considered an important measure by most Web users, it is often more practical to
separate the database and page processing into a third computer system. This is an example of
a) multiprocessing
b) cluster computing
c) n-tier architecture
d) three-tier architecture
16) The protocol that makes communication between a Web server and a database application possible is called
a) SQL
b) HTTP
c) Database Control Language
d) Common Gateway Interface
17) ______________ is software designed to handle potential incompatibilities between the application
software that resides on different equipment.
a) Middleware
b) Versioning software
c) Compatibility software
d) Application interface software
18) The organization's internal network, isbcommonly called a(n)
a) intranet
b) employee network
c) corporation network
d) organizational network
19) Internet standards such as _______ allow the easy identification of relevant data within data streams
between interconnected systems, making these applications possible and practical.
a) XML
b) FTP
c) SSH
d) HTTPS
20) What is not a benefit of cloud services?
a) Backup and offsite storage
b) Additional computing capability when and where it is needed
c) Lower hardware and software investments
d) Added security
Sol: Short description: Start with the system as a whole and then continuously decompose each function
into a set of dependent subsystems of increasing detail.
Sol: from the text: “The analysis, design, and implementation of IT systems must take place at different
levels of detail and frequently require collaboration among many analysts and designers. This
corresponds well with the ability to decompose systems into components, hierarchically, which allows us
to concentrate at the appropriate levels of detail during each step along the way. This approach is known
as a top-down approach.”
2) What are the benefits of the top-down approach to system architecture?
Sol: from the text: “The top-down approach allows us to focus on the specific areas of interest without the
distraction of details that are irrelevant for the level that we're studying. In this way, a system architect
can analyze and study the IT system as a whole, encapsulating the computer systems, software systems,
network architecture, and Web architecture that represent components, and focusing instead on the
large picture: the purpose of each component and the requirements for the interfaces and linkages that
connect and integrate them. With the IT system architecture firmly established, we can consider the
individual business functions, computer systems, and networks that will link them together. For IT
system analysis, this is often sufficient, at least superficially, assuming that the system architects actually
understand the conditions and constraints imposed by details at the lower levels.”
3) Give a short description of peer-to-peer architecture.
Sol: from the text: “An alternative to client-server architecture is peer-to-peer architecture. Peer-to-peer
architecture treats the computers in a network as equals, with the ability to share files and other
resources and to move them between computers.”
4) Reread "Google: A System Architecture Example" from the text. What are Google’s three specific
processing tasks that the system must fulfill?
Sol:
1) The system must accept search requests from users, identify and rank matches, create a Web page,
and serve it to the user.
2) The system must collect data—lots of data! This task “crawls the Web,” identifies the search terms
(every significant word) on every Web page it encounters, and maintains an index database connecting
each term to the corresponding page. It likewise stores every Web page in a Web page database and
assigns a ranking value to each entry.
3) The system must manage advertisements, identify appropriate advertisements in response to user
search requests, and make the advertisements available to the Web page creation application mentioned
in 1.
May be more suitable for an exercise or take-home test.
) Why does Google use inexpensive commodity PCs, similar to standard, medium power, non-state-of-the-art,
off-the-shelf PCs in its datacenter?
Sol: From the text: “Overall, this design allows a large number of searches to progress in parallel. The
use of inexpensive PC hardware makes the solution cost-effective. The system can be scaled easily by
adding more computers. Finally, the failure of a PC does not result in failure and, in fact, has minimal
effect on the performance of the system overall. Thus, this solution meets the original requirements
admirably.”
1) How many binary digits does it take to represent the decimal number 2013?
a) 16
b) 8
c) 11
d) 2013
2) How many bytes does it take to store the binary equivalent of the decimal number 1945?
a) 1
b) 2
c) 4
d) 10
3) The largest number that can be represented 8 bits without considering a sign is
a) 15
b) 255
c) 65,535
d) 10,000,000
4) The largest single digit in octal is
a) 1
b) 7
c) 8
d) 10
5) The largest single digit in hexadecimal is
a) 1
b) 8
c) F
d) 9
6) The binary number 101100112 is equivalent to the decimal number
a) 113
b) 179
c) 133
d) 10,110,011
7) Eight raised to the power zero is
a) 0
b) 1
c) 8
d) -8
8) Eight raised to the power one is
a) 0
b) 1
c) 8
d) -8
9) The number of different items that can be represented by a given number of digits, n, in a particular base,
b, is given by the formula: 𝑏 𝑛 equals _____________.
a) field
b) radix
c) range
d) parameter
10) The digit with the greatest weight (value) in a number is called the
a) radix
b) heaviest bit
c) least significant digit
d) most significant digit
11) The octal number 128 is equivalent to the decimal number
a) 9
b) 10
c) 24
d) 12
12) The hexadecimal number 1A16 is equivalent to the decimal number
a) 9
b) 17
c) 26
d) 110
13) How many bits are there in one byte?
a) 1
b) 4
c) 8
d) 10
14) A single digit that can have only one of two values, 0 or 1, is a
a) bit
b) blip
c) signal
d) character
15) In order to divide a number by its base we can perform
a) a bit op
b) a left shift
c) a right shift
d) a complex equation
16) In order to multiply a number by its base we can perform
a) a bit op
b) a left shift
c) a right shift
d) a complex equation
17) The base 8 number system is called
a) octal
b) fractal
c) ochodecimal
d) hexadecimal
18) The base 2 number system is called
a) binary
b) fractal
c) bitly
d) radix
19) Which of the following is true?
a) 12 <18
b) 102 < 18
c) 1012 < 108
d) 1012 < 58
20) Which of the following is true?
a) 0.12 > 0.18
b) 0.12 = 0.18
c) 0.12 < 0.18
d) None of these
21) Which of the following is true?
a) 1018 <1016
b) 108 < 116
c) 118 < 1016
d) 128 < A16
22) The “Exclusive OR” function (used for the result bit when adding single digits in binary) will equal 1 if
the input bits are
a) 0+0
b) 0+1
c) 1+1
d) None of these
23) The “AND” function (used for the carry bit when adding single digits in binary) will equal 1 if the input
bits are
a) 0+0
b) 0+1
c) 1+1
d) None of these
24) The decimal number 9 is equivalent to the hexadecimal
a) A
b) 9
c) 10
d) 1001
25) The base 16 number system is called
a) octal
b) fractal
c) sextadecimal
d) hexadecimal
26) To convert from binary to octal by grouping, one octal digit corresponds to how many binary digits?
a) one
b) two
c) three
d) eight
27) To convert from binary to hexadecimal by grouping, one hexadecimal digit corresponds to how many
binary digits?
a) two
b) four
c) eight
d) sixteen
28) Ten raised to the power negative one (10-1) is
a) 1/10
b) -10
c) -1/10
d) None of these
29) The binary number 10.012 is equivalent in decimal to
a) 2.01
b) 2.25
c) 4.25
d) 10.01
30) The octal number 1.28 is equivalent in decimal to
a) 1.25
b) 8.16
c) 8.25
d) 12
31) The hexadecimal number B.416 is equivalent in decimal to
a) 10.25
b) 10.5
c) 11.25
d) None of these
32) The decimal fraction ¼ (0.25) is equivalent to
a) 0.12
b) 0.18
c) 0.116
d) None of these
33) The digit furthest to the right is usually the
a) radix
b) lightest bit
c) least significant digit
d) most significant digit
34) The number of different digits, including zero, that exist in the number system is the
a) range
b) field
c) base
d) parameter
35) The number point (normally known by the name of the base—for example "decimal point" in base
10)—which divides whole numbers from fractional numbers is called
a) bit point
b) radix point
c) fractal point
d) division point
Analytic questions (There are no discussion questions for this chapter)
1) What is the major difference between how JPEG and GIF image files are compressed?
Sol: GIF uses a lossless compression algorithm (LZW); JPEG is a lossy compression
algorithm.
2) Why is "metadata" important?
Sol: Metadata contains information about the waveform or graphic image required to process and
reproduce the waveform or graphic image. Without metadata, applications would not understand
how to process and reproduce the original content.
3) Why is it critical that standard data representations exist?
Sol: From the text: "These data representations must be recognized by a wide variety of hardware
and software so that they can be used by users working within different computer environments.”
4) What data type would likely be used for a phone number and why?
Sol: Text (string of characters). Phone numbers are not commonly manipulated mathematically, so
there is no reason to store phone numbers in numeric form. Also, phone numbers are more commonly
used in text-based queries, which are more easily handled by text-based manipulation.
5) What shortcomings of ASCII led to the development of Unicode?
Sol: ASCII is 7-bit, and extended ASCII is 8-bit giving a total representation space of 127 and 256
symbols respectively. This is a severe limitation for representing other languages besides English.
Alternatively, ASCII cannot encode enough symbols to represent languages that use other than the
basic Latin alphabet.
6) What would printing ASCII text on an EBCDIC terminal do, and why?
Sol: from the text: "if we use an ASCII terminal for the input, the output will also be in ASCII form
unless some translation took place within the computer. In other words, printing ASCII characters on
an EBCDIC terminal would produce garbage."
7) When sorting an array of words, which comes first: "Apple" or "alligator"? How can you fix it for natural
sort?
Sol: Uppercase "A" has a collating sequence of 65(dec) and lowercase "a" has a collating sequence of
97(dec). Sorting the words "Apple" and "alligator" would result in "Apple" coming before
"alligator." This is fixed by converting the words to all uppercase (or lowercase) before sorting.
8) What is the general concept behind psychoacoustic compression?
Sol: From the text: "Psychoacoustic compression is based on the assumption that there are sounds
that a listener cannot hear or will not notice, which can then be eliminated. As an example, a soft
sound in the background is not usually noticeable against a loud foreground sound. The level of
compression depends on the tolerable level of sound quality, but also on the nature of the audio being
compressed."
9) If we record a song that is one minute long using 16-bit sound samples, sampled at 44.1KHz in mono
channel, without any metadata or compression, how large would the file be? (Express your answer in
Megabytes)
Sol:
Note:
K=1,000 in speed calculations.
M = 1,048,576 for capacity calculations.
Sol: Higher bitrates are directly related to file size and audio quality. A high bitrate means improved
representation of the audio, but larger file sizes. That in turn, means longer transmission times. From
the text "the options chosen are made by the creator of the file during the encoding process, based on
the trade-off between tolerable audio quality versus transmission rate or file size."
12) What is the main assumption regarding lossy compression?
Sol: from the text: "Lossy algorithms operate on the assumption that some data can be sacrificed
without significant effect, based on the application and on known properties of human perception."
13) Describe the advantages and disadvantages of data compression.
Sol: Files are compressed for reducing their file size but it takes computing power to perform the
compression and reverse the compression for use. Smaller files have the advantage of reduced storage
and can be transmitted over a network faster. Lossless compression is the only option for files that
must maintain their integrity.
14) A loan application takes as input loan amount, credit scores, salary history, tax history and other relevant
data and produces a single result: either the customer is credit worthy or not. What data type is the variable
"result"?
Sol: Boolean. There are only two possible values. The input data types will vary as integer, float, text
or some other data type.
15) What two factors determine how the binary numbers stored in a computer are interpreted? That is—
what determines whether 01000001 is seen as the character "A" or the integer 65?
Sol: From the text: "The interpretation of these [binary numbers stored in the computer] depends
upon two factors: The actual operations that the computer processor is capable of performing" and
"The data types that are supported by the programming language used to create the application
program." Alternative answer: The context in which the value is used.
1) Calculate largest positive integer that can be stored in 2 bytes using a) an unsigned integer
b) an integer using sign and magnitude, and c) an unsigned BCD number.
Sol: This is useful: The relationship between largest positive integer and the number (n) of bits used is
b) In two bytes there are 16 bits, of those 15 are available for positive numbers:
= 2^15 – 1
= 32768 – 1
= 32,767
Sol: from the text: “A fixed word size results in a range of some particular fixed size; it is always possible
to have a combination of numbers that produces a result outside the range. This condition is known as
overflow.”
3) The 9’s complementary operation.
a) Find the 9’s complementary representation for the three-digit number -351.
b) Find the 9’s complementary representation for the four-digit number -351.
Sol:
a) In three-digits, the 9’s complementary representation is
999
- 351
-----------
648
Sol:
a) Step 1: 51 in binary using 8-bits is 00110011
Step 2: Flip the bits: 11001100
Step 3: add 1: 11001101
a) What is the decimal sign-and-magnitude value of the 8-bit number represented in 2's complement by
11010011?
b) What is the decimal sign-and-magnitude value of the 8-bit number represented in 2's complement by
01000011?
Sol:
a) Since the leftmost digit is 1, the number is negative. So, invert the number and add one:
11010011 --> 00101100 + 1 = 45. Include the negative sign -45.
b) Since the leftmost digit is 0, the number is positive. So, just convert to decimal:
01000011 (base 2) = 67 (base 10).
7) The exponent for a given number is negative 25. What value is stored to represent the exponent in excess-50
notation?
Sol: In excess-50 notation, 50 is the midvalue or offset. So, we subtract 25 from 50 = 25.
8) What purpose is served by "normalizing" the mantissa? That is—given the extra work—
what is gained?
Sol: Moving the decimal point such that there are no leading zeros ensures the fewest number of
significant digits are truncated, which maximizes the precision.
From the text: “To maximize the precision for a given number of digits, numbers will be stored whenever
possible with no leading zeros. This means that, when necessary, numbers are shifted left by increasing
the exponent until leading zeros are eliminated. This process is called normalization.”
In problems 9-13 use the floating point format SEEMMMMM, where S = 0 is "+" and 5 is "-"; EE is the exponent
in excess-50, and MMMMM are five digits of mantissa.
9) Show how 12.25 is represented in SEEMMMMM format.
Sol:
12.25 = .1225 x 10^2
S=0
EE=52
MMMMM = 12250, where the added zero is added to make five digits
Answer: 05212250
10) Show how -0.00012325 is represented in SEEMMMMM format.
Sol:
0.00012325 = .1225 x 10^-4
S=5
EE=46
MMMMM = 12325
Answer: 54612325
11) Convert 55698799 in SEEMMMMM to a decimal integer without exponents.
Sol:
5 = S; sign is negative
56 = EE; exponent is 6
98799 = MMMMM
- .98799 x 10^6 = -987990.
12) Add the two numbers 04933460 and 04877456 (in SEEMMMMM format.) Represent your answer in
decimal form without using exponents.
Sol:
04933460 ---> +.33460 x 10 ^-1 or 0.033460
04877456 ---> +.77456 x10 ^-2 or 0.0077456
0.033460 + 0.0077456 = 0.0412056
13) Multiply the two numbers 05312675 and 05144359 (in SEEMMMMM format.) Leave the answer in
SEEMMMMM rounding if necessary.
Sol:
05312675 --> +.12675 x 10^3 = 126.75
05144359 --> +.44359 x 10^1 = 4.4359
126.75 x 4.4359 = 562.250325
Sol: From the text: “The trade-offs between integer and floating point are clear. Integer calculations are
easier for the computer to perform, have the potential to provide higher precision, and are obviously
much faster to execute. Integer values usually take up fewer storage locations. As you will see later, it
takes a certain amount of time to access each storage location; thus, the use of fewer storage locations
saves time, as well as space.”
15) Suppose you are writing a program that needs to represent a maximum 50,000 whole things (i.e. integer
data type). What would be better: to use a short integer (16 bits) or long integer (64 bits)? Why?
Sol:
First check that 16 bits is sufficient: 2^16 = 65,536 greater than 50,000, so it possible to use short integer.
From the text: “The longer integer formats may require multiple-word calculation algorithms, and as
such are slower to execute than short formats. The short format is preferable when it is sufficient for the
values that you expect. It may also be necessary to consider the limitations of other systems that the same
program may have to operate on.”
Problem Answer Section in text / comments
1 c Section 5.0 Introduction
2 d Section 5.0 Introduction
3 d Section 5.0 Introduction
4 d Section 5.0 Introduction
5 c Section 5.1 Unsigned Binary and Binary-Coded Decimal Representations
6 a Section 5.1 Unsigned Binary and Binary-Coded Decimal Representations
7 b Section 5.1 Unsigned Binary and Binary-Coded Decimal Representations
8 b Section 5.1 Unsigned Binary and Binary-Coded Decimal Representations
9 b Section 5.2 Representations for Signed Integers
10 b Section 5.2 Representations for Signed Integers
11 b Section 5.2 Representations for Signed Integers
12 b Section 5.2 Representations for Signed Integers
13 b Section 5.2 Representations for Signed Integers
14 b Section 5.2 Representations for Signed Integers
15 c Section 5.2 Representations for Signed Integers
16 d Section 5.2 Representations for Signed Integers
17 c Section 5.2 Representations for Signed Integers
18 b Section 5.2 Representations for Signed Integers
19 b Section 5.2 Representations for Signed Integers
20 b Section 5.2 Representations for Signed Integers
21 a Section 5.2 Representations for Signed Integers
22 b Section 5.2 Representations for Signed Integers
23 c Section 5.3 Real Numbers
24 b Section 5.3 Real Numbers
25 c Section 5.3 Real Numbers
26 c Section 5.3 Real Numbers
27 c Section 5.3 Real Numbers
28 a Section 5.3 Real Numbers
29 d Section 5.3 Real Numbers
30 c Section 5.3 Real Numbers
31 c Section 5.3 Real Numbers
32 b Section 5.3 Real Numbers
33 b Section 5.4 Programming Considerations
34 c Section 5.4 Programming Considerations
35 d Section 5.4 Programming Considerations
Chapter 6 The Little Man Computer
Consider this model of the LMC and answer the questions below.
Opcode Definition
0 Halt
1 ADD
2 SUBTRACT
3 STORE
5 LOAD
6 BRANCH UNCONDITIONALLY
7 BRANCH ON ZERO
8 BRANCH ON POSITIVE
901 INPUT
902 OUTPUT
Please refer to this table of Mailboxes and Contents for problems 21 through 26
Mailbox Contents
00 505
01 106
02 507
03 902
04 000
05 1 DAT
06 3 DAT
07 6 DAT
21) What is the value in the calculator after the first instruction (505) is completed?
a) 1
b) 2
c) 3
d) 6
22) What is the value in the program counter (instruction location counter) after the first instruction
(505) is completed?
a) 01
b) 02
c) 03
d) 04
23) What is the value in the calculator after the fetch but before the execute portion of second instruction
(106)?
a) 1
b) 2
c) 3
d) 6
24) What is the value in the calculator after the second (106) instruction is completed?
a) 1
b) 2
c) 3
d) 4
25) What is the value in the calculator after the third instruction (507) is completed?
a) 1
b) 2
c) 3
d) 6
26) What is the value in the calculator when the program is finished, i.e., when the halt instruction has been
executed?
a) 1
b) 2
c) 3
d) 6
Please refer to this table of Mailboxes and Contents for problems 27 through 33
Mailbox Contents
00 602
01 106
02 507
03 206
04 902
05 000
06 1 DAT
07 3 DAT
08 6 DAT
27) What is the value in the calculator after the first instruction (602) is completed?
a) 1
b) 2
c) 3
d) unknown
28) What is the value in the program counter (instruction location counter) after the first instruction
(602) is completed?
a) 01
b) 02
c) 03
d) 06
29) What is the value in the calculator after the instruction 507 is completed?
a) 1
b) 2
c) 3
d) 6
30) What instruction is never executed?
a) 602
b) 106
c) 507
d) 902
31) What data (DAT) value is never used?
a) 1
b) 2
c) 3
d) 6
32) What is the value in the program counter (instruction location counter) when the program is
finished?
a) 03
b) 04
c) 05
d) 06
33) What is the value in the calculator when the program is finished?
a) 1
b) 2
c) 3
d) 6
34) In the von Neumann architecture, memory holds
a) data only.
b) instructions only.
c) data and instructions.
d) neither data and instructions.
35) In the von Neumann architecture, memory is addressed
a) by location number.
b) by the value stored.
c) by contents of the memory location.
d) None of the above.
Discussion Questions
Please refer to this table of op codes for the discussion questions
Opcode Definition
0 Halt
1 ADD
2 SUBTRACT
3 STORE
5 LOAD
6 BRANCH UNCONDITIONALLY
7 BRANCH ON ZERO
8 BRANCH ON POSITIVE
901 INPUT
902 OUTPUT
1) Using the LMC program below, add comments to explain what the result (value in the calculator) is after
the completion of each instruction. The first one is completed as an example.
Sol:
a) What is the final value in out basket if the first in basket is 56 and second in basket is 89?
b) What is the final value in out basket if the first in basket is 75 and second in basket is 75?
c) What is the final value in out basket if the first in basket is 89 and second in basket is 56?
Sol: This program displays to the out basket "5" if the inputs are different, and a “1” if they are
same; the order of input does not matter.
4) Refer to the LMC program below and the table of op codes given above.
a) What is the first number placed in the out basket?
b) What is the last number placed in the out basket?
Mailbox Contents
00 517
01 218
02 902
03 705
04 601
05 000
……………..
17 100 DAT
18 2 DAT
Sol:
a) 98
b) 0
5) Refer to the LMC program in question (4). Change DAT in mailbox 18 to 4.
a) What is the first number placed in the out basket?
b) What is the last number placed in the out basket?
Sol:
a) 96
b) 0
6) Describe what the LMC program in question (4) does.
Sol: This program displays even numbers to the out basket counting backwards from 98. The first
number displayed is 98, and the last number displayed is 0.
7) Refer to the LMC program below. Write down what the calculator will hold after the instruction is
complete in each loop. The first one is completed as an example.
Mailbox Contents Calculator after instruction is complete
Loop1 Loop2 Loop3 Loop4
00 517 1 2 3 4
01 118
02 317
03 219
04 710
05 600
……………..
17 1 DAT
18 1 DAT
19 5 DAT
Sol:
Sol: The content of address 17 goes: 2-3-4-5. The others don’t change.
9) What instruction should be placed in mailbox 02 so the program loops 4 times? Refer to the table of op
codes above.
Mailbox Contents
00 517
01 218
02 ???
03 317
04 902
05 600
06 000
……………..
17 10
18 2
Mailbox Contents
00 901
01 309
02 207
03 902
04 708
05 602
06 000
07 1
08 000
09 DAT
Sol: The program gets a number from the user. It then loops by that number displaying the loop
count to the out basket each time. Example: in basket 4: Display to out basket: 3 – 2 – 1– 0.
11) The contents in memory occasionally have to be moved to another area of memory. When that happens,
the mailbox references must be adjusted so that the program continues to function properly. Rewrite the
LMC code in problem (10) so that it occupies mailboxes 05 through 14 only; mailboxes 01 through 04 will
be used by another program, so they can't be used. Assume that instruction 605 remains in mailbox 00.
Mailbox Contents
00 605
01 used by other program
02 used by other program
03 used by other program
04 used by other program
05 ???
06 ???
07 ???
08 ???
09 ???
10 ???
11 ???
12 ???
13 ???
14 ???
Sol:
Mailbox Contents
00 605
01 used by other program
02 used by other program
03 used by other program
04 used by other program
05 901
06 314
07 212
08 902
09 713
10 606
11 000
12 1
13 000
14 DAT
12) Describe the LMC three-digit instruction format. How does the LMC know what part of the value is an
instruction, and what part is an address?
The LMC only has to check the first digit for the opcode; the remaining 2 digits are an address.
13) How does the LMC "know" if a particular mailbox contains data or instructions?
Sol: LMC does not know if the value in a mailbox is an instruction or not. The first instruction
location is 00 and the next is determined by the program counter. If the LMC happens upon a
memory value that wasn’t intended to be an instruction, the LMC would try to execute it.
Alternatively, if the program counter points to a particular mailbox, it is assumed to contain an
instruction, not data.
14) What happens if the LMC is executing a program and never encounters a "HALT" command?
Sol: The program will continue to execute until it encounters a location that contains “000” (the
HALT instruction, even it it’s data) or a location that begins with a 4, which is an invalid operation
code. This assumes that incrementing the program counter past 99 returns it to zero.
15) Describe how the LMC is von Neumann architecture.
1) Memory holds both programs and data; this is known as the stored program concept. The stored
program concept allows programs to be changed easily.
2) Memory is addressed linearly; that is, there is a single sequential numeric address for each and
every memory location.
3) Memory is addressed by the location number without regard to the data contained within.
Alternative answer:
1. The computer consists of a CPU and memory, with facility for input and output
2. The memory holds both instructions and data
3. The instructions are executed sequentially, that is, one at a time.
Solutions
1) The Little Man instruction set is based on a decimal number system; real computers encode instructions and
data using the
a) binary system.
b) Unicode system.
c) decimal system.
d) algebraic system.
2) The ALU and CU together are known as the
a) CPU.
b) instruction set.
c) program counter.
d) Memory Management Unit.
3) The area inside of the CPU that holds data temporarily and performs calculations is called the
a) accumulator.
b) program counter.
c) arithmetic logic unit.
d) Memory Management Unit.
4) The storage locations that are used for a particular defined purpose within the CPU are called
a) RAM.
b) storage.
c) the bus.
d) registers.
5) The 1-bit registers that are used to allow the computer to keep track of special conditions (like overflow or
power failure) are often called
a) flags.
b) loops.
c) the ALU.
d) I/O counters.
6) Loading the value zero into a register is called
a) inverting a register.
b) clearing a register.
c) dumping the register.
d) incrementing a register.
7) The register that holds the address of the memory location that needs to be accessed is called the
a) IR.
b) MAR.
c) MDR.
d) MBR.
8) The register that holds the current instruction is called the
a) IR.
b) PC.
c) LMC.
d) MBR.
9) The register that will hold the data value that is being transferred between the CPU and a particular memory
location is called the
a) PC.
b) ALU.
c) MAR.
d) MDR.
10) The mailboxes in the LMC model are the equivalent to a real computer's
a) CPU.
b) ports.
c) memory.
d) control unit.
11) Which of the following is NOT one of the three lines that control the memory cell?
a) Skew line
b) Address line
c) Read/write line
d) Activation line
12) If the Memory address register is 8 bits wide, the number of possible memory addresses is
a) 8
b) 16
c) 64
d) 256
13) Memory that retains its values when power is removed is called
a) DRAM.
b) SRAM.
c) volatile.
d) nonvolatile.
14) There would never be a reason for an address transfer from the ________ to another register within the CPU.
a) IR
b) PC
c) MAR
d) MDR
15) When the instruction being executed is to store data, the data will be transferred from another register in the
CPU to the _____, and from there it will be transferred into memory.
a) IR
b) PC
c) MAR
d) MDR
16) The different ways of establishing memory addresses within an instruction are called
a) MAR codes.
b) MDR codes.
c) addressing modes.
d) programmable modes.
17) Flash Memory
a) is volatile.
b) is faster than standard RAM.
c) has unlimited rewrite capacity.
d) is nonvolatile.
18) The first step in the instruction cycle is
a) clear the accumulator.
b) fetch the instruction from memory.
c) decode the instruction in the accumulator.
d) copy the data from the MAR to the MDR.
19) The physical connections that make it possible to transfer data from one location in the computer system to
another are called
a) flags.
b) fibers.
c) buses.
d) peripherals.
20) Optical conductors are
a) faster than electrical conductors.
b) cheaper than electrical conductors.
c) more common than electrical conductors.
d) all of the above.
21) A bus in which there is an individual line for each bit of data, address, and control is called a
a) wide bus.
b) serial bus.
c) parallel bus.
d) dedicated bus.
22) A bus that transfers data sequentially, one bit at a time using just a single line pair is called
a) a serial bus.
b) a single bus.
c) a narrow bus.
d) a sequential bus.
23) A bus line that is "one-way" is called
a) a simplex bus line.
b) a serial bus line.
c) a one-way bus line.
d) a sequential bus line.
24) A bus line that can carry data in both directions at the same time is called a
a) simplex bus line.
b) complex bus line.
c) full duplex bus line.
d) half duplex bus line.
25) The exposed connectors into which external cables can be plugged are often called
a) plugs.
b) lines.
c) ports.
d) stacks.
26) A bus that carries signals from a single specific source to a single specific destination is a(n)
a) simplex bus.
b) broadcast bus.
c) Ethernet bus.
d) point-to-point bus.
27) Virtually every bus internal to the CPU is
a) serial.
b) cables.
c) optical.
d) parallel.
28) Instructions that only the operating system can execute are called
a) system instructions.
b) executive instructions.
c) privileged instructions.
d) administrative instructions.
29) Programs that execute without privileges are said to execute
a) in user space.
b) in data mode.
c) in kernel space.
d) in privilege space.
30) Multimedia applications, like modifying an image, often use
a) PSW instructions.
b) Flash instructions.
c) MMD instructions.
d) SIMD instructions.
31) The sources and destinations of data for an instruction are known as
a) Op codes.
b) Operands.
c) Op registers.
d) Operation fields.
32) Increasing the number of bits available for the op code in an instruction word
a) increases the demand on the CPU.
b) increases the number of memory locations that can be addressed.
c) increases the number of instructions available in the instruction set.
d) has no impact on any of the above.
Discussion Questions
1) How are the registers in the CPU different from main memory?
Sol: From the text: “A register is a single, permanent storage location within the CPU used for a
particular, defined purpose. A register is used to hold a binary value temporarily for storage, for
manipulation, and/or for simple calculations. Note that each register is wired within the CPU to perform
its specific role. That is, unlike [main] memory, where every address is just like every other address, each
register serves a particular purpose. The register's size, the way it is wired, and even the operations that
take place in the register reflect the specific function that the register performs in the computer.”
Alternately: Register access is much faster, and there are far fewer registers than memory locations.
2) How does the computer keep track of special conditions such as arithmetic carry and overflow, power failure,
and internal computer error?
Sol: From the text “The control unit will also contain several 1-bit registers, sometimes known as flags,
that are used to allow the computer to keep track of special conditions such as arithmetic carry and
overflow, power failure, and internal computer error. Usually, several flags are grouped into one or more
status registers.”
3) What factor factor determines the maximum capacity of memory in a real computer?
Sol: The number of bits in the memory address register determines the maximum number of memory
locations that can be addressed.
4) Why is it necessary to store start-up program code in nonvolatile memory?
Sol: from the text “At least some of the program code used to start a computer must be present in a
nonvolatile segment of primary memory. (Otherwise there would be no program in memory to execute
when the computer is powered up!) This code is known as firmware.”
5) Why is flash memory not suitable for use as main memory?
Sol: from the text “[Flash memory] is generally considered unsuitable for primary memory because it is
not possible to write to a single memory location. Instead it is necessary to erase and rewrite a large block
of memory to make any changes in flash memory. The rewrite time is extremely slow compared to
standard RAM and the number of rewrites over the lifetime of flash memory is somewhat limited.”
6) Classify the registers as either a) holding addresses only, b) holding instructions only, or c) anything.
IR ____
PC ____
MAR ____
MDR ____
Accumulator ____
General Purpose ____
Sol:
Sol: From the text “…….one common method, consider a computer that can use one of the general-
purpose registers to hold an address. To find a memory location, the computer would use the value in
that register as a pointer to the address. Instead of an address field, the instruction needs only to indicate
which register contains the address. Using this technique, the addressing capability of the computer is
determined by the size of the register.”
8) What is skew?
Sol: The slight delay in arrival time on different lines as signals traverses a parallel bus.
9) What are “Arithmetic Shifts” commonly used for?
Sol: from the text “Arithmetic shift instructions are commonly used to multiply or divide the original
value by a power of 2.”
10) Explain pop and push operations on a stack.
Sol: A pop is when data comes off the stack and a push is when data is put in the stack. Stacks are used to
implement last-in, first-out structures.
11) Why are input/output instructions generally considered privileged instructions?
Sol: from the text: “Input/output instructions are generally privileged instructions because we do not
want input and output requests from different users and programs interfering with each other.”
Sol: From the text “A bus can be characterized by the number of separate wires or optical conductors in
the bus; by its throughput, that is, the data transfer rate measured in bits per second; by the data width
(in bits) of the data being carried; by the number and type of attachments that the bus can support; by
the distance between the two end points; by the type of control required; by the defined purpose of the
bus; by the addressing capacity; by whether the lines on the bus are uniquely defined for a single type of
signal or shared; and by the various features and capabilities that the bus provides.”
13) Why is there no need for a subtract instruction?
Sol: Subtracting a number from another number is the same as changing the sign of the subtrahend and
adding. That is, 5-9 is the same as 5+(-9).
From the text: “Even the subtract instruction is theoretically not necessary, since we showed in Chapter 5
that integer subtraction is performed internally by the process of complementing and adding.”
14) Identify the implicit and explicit addresses in the Little Man instruction 531; recall that “5” is the op code
for the load instruction.
Sol: The instruction 531 is a load from mailbox 31 to the accumulator. The explicit address is 31 and the
accumulator is the implicit address.
15) What is an important disadvantage of variable length instructions?
Sol: From the text: “Variable length instructions complicate pipelining, because the starting point of the
new instruction is not known until the length of the previous instruction has been determined. If you
extend this idea to multiple instructions, you can see the difficulty of maintaining a smooth assembly line.
This issue is discussed in more detail in Chapter 8. Because pipelining has become so important to
processing speed in modern computers, the use of variable length instructions has fallen out of favor for
new CPU designs. Nearly all new CPU designs use fixed length instructions exclusively.”
Problem Answer Section in text / comments
1 a Section 7.0 Introduction
2 a Section 7.1 The Components of the CPU
3 c Section 7.1 The Components of the CPU
4 d Section 7.2 The Concept of Registers
5 a Section 7.2 The Concept of Registers
6 b Section 7.2 The Concept of Registers
7 b Section 7.2 The Concept of Registers
8 a Section 7.2 The Concept of Registers
9 d Section 7.2 The Concept of Registers
10 c Section 7.3 The Memory Unit
11 a Section 7.3 The Memory Unit
12 d Section 7.3 The Memory Unit
13 d Section 7.3 The Memory Unit
14 c Section 7.3 The Memory Unit
15 d Section 7.3 The Memory Unit
16 c Section 7.3 The Memory Unit
17 d Section 7.3 The Memory Unit
18 b Section 7.4 The Fetch-execute
19 c Section 7.5 Buses
20 a Section 7.5 Buses
21 c Section 7.5 Buses
22 a Section 7.5 Buses
23 a Section 7.5 Buses
24 c Section 7.5 Buses
25 c Section 7.5 Buses
26 d Section 7.5 Buses
27 d Section 7.5 Buses
28 c Section 7.6 Classification of Instructions
29 a Section 7.6 Classification of Instructions
30 d Section 7.6 Classification of Instructions
31 b Section 7.7 Instruction Word Formats
32 c Section 7.8 Instruction Word Requirements and Constraints
Chapter 8: CPU and Memory Design Enhancement and Implementation
1) CPU architecture is defined by the basic characteristics and major features of the CPU. “CPU architecture” is
sometimes called
a) architecture design
b) structural organization
c) instruction set architecture
d) CPU design and organization
2) The use of fixed-length, fixed-format instruction words with the op code and address fields in the same
position for every instruction would allow instructions to be fetched and decoded
a) independently.
b) dependently and in parallel.
c) independently and in serial.
d) independently and in parallel.
3) There are several factors that determine the number of instructions that a computer can perform in a second.
Which of the following is NOT a factor?
a) Word size
b) Clock speed
c) Instruction format - fixed or variable
d) Number of steps required by each instruction type
4) The __________ must be designed to assure that each step of the instruction cycle has time to complete
before the results are required by the next step.
a) ALU
b) clock cycle
c) Control Unit
d) instruction pointer
5) The fetch unit portion of the CPU consists of an instruction fetch unit and an instruction ____________ unit.
a) decode
b) translate
c) decipher
d) conversion
6) The ___________ unit contains the arithmetic/logic unit and the portion of the control unit that identifies and
controls the steps that comprise the execution part for each different instruction.
a) fetch
b) decode
c) execution
d) conversion
7) Overlapping instructions—so that more than one instruction is being worked on at a time—is known as the
a) conveyor belt method.
b) pipelining method.
c) assembly line method.
d) accelerator method.
8) Instruction reordering makes it possible to provide parallel pipelines, with duplicate CPU logic, so that
multiple instructions can actually be executed
a) sequentially.
b) consecutively.
c) simultaneously.
d) very fast in serial operation.
9) Which of the following is not a specific execution unit?
a) steering unit
b) LOAD/STORE unit
c) integer arithmetic unit
d) floating point arithmetic unit
10) A(n) _____________ processor is one that can complete an instruction with each clock tick.
a) linear
d) direct
c) scalar
d) express
11) There are a number of difficult technical issues that must be resolved to make it possible to execute multiple
instructions simultaneously. One of the most important of these is
a) Instructions completing out of order.
b) Instructions that have floating point operations.
c) Instructions that can be serialized.
d) Instructions that require the same number of CPU cycles complete.
12) Out-of-order instruction execution can cause problems because a later instruction may depend on the results
from an earlier instruction. This situation is known as a __________ or a _______________.
b) risk, reliance
a) hazard, reliance
d) risk, dependency
c) hazard, dependency
13) CPUs can actually search ahead for instructions without apparent dependencies, to keep the execution units
busy. Current Intel x86 CPUs, can search ___________ instructions ahead, if necessary, to find instructions
available for execution.
a) five to ten
b) ten to twenty
c) twenty to thirty
d) fifty to one hundred
14) Branch instructions must always be processed ahead of subsequent instructions. Conditional branch
instructions are more difficult than unconditional branches. These types of dependencies are known as control
dependencies or sometimes as ______________ or branch dependencies.
a) flow
b) decision
c) qualified
d) provisional
15) Some systems provide a small amount of dedicated memory built into the CPU that maintains a record of
previous choices for each of several branch instructions that have been used in the program being executed to
aid in determining whether a branch is likely to be taken. What are the contents of this memory called?
a) look-ahead table
b) branch history table
c) branch prediction table
d) future speculation table
16) What are the slowest steps in the instruction fetch-execute cycle?
a) Slowest steps are those that require memory access.
b) Slowest steps involve incrementing the instruction pointer.
c) Slowest steps are those that require special integer register access.
d) Slowest steps are those that require floating point register access.
17)What is the major drawback of Dynamic RAM (DRAM)?
a) cost
b) capacity
c) data loss
d) memory latency
18) Which of the following is a commonly used approach for improving performance of memory?
a) Doubling the capacity of memory.
b) Using DRAM instead of SDRAM.
c) Compressing instructions and data in RAM.
d) Widening the system bus between memory and the CPU.
19) Another method for increasing the effective rate of memory access is to divide memory into parts, called,
_____________ so that it is possible to access more than one location at a time.
a) block separation
b) high-low separation
c) memory interleaving
d) wide-path separation
20) Each block of cache memory provides a small amount of storage, perhaps between 8 and 64 bytes, also
known as
a) a cache hit.
b) niche cache.
c) a cache line.
d) a small block cache.
21) What does "locality of reference" mean?
a) most memory references occur concurrently
b) most memory references will pull data of numeric type
c) most memory references will be accessed in a predictable order
d) most memory references are confined to one or a few small regions of memory
22) The locality of reference principal makes sense because most of the instructions being executed at a
particular time are
a) register-to-memory type instructions.
b) math and logical type instructions.
c) control and branch type instructions.
d) part of a small loop or a small procedure or function.
23) Cache memory hit ratios of ________ percent and above are common with just a small amount of cache.
a) 30
b) 60
c) 80
d) 90
24) When a cache miss occurs, however, there is a time delay while new data is moved to the cache. The time to
move data to the cache is called _____________ time.
a) stall
b) backup
c) write-through
d) cache back
25) Which of the following is most likely:
a) L1 cache has 32KB and L2 cache has 1MB
b) L1 cache has 1MB and L2 cache has 32KB
c) L1 cache has 32KB and L2 cache has 32KB
d) L1 cache has 1MB and L2 cache has 1MB
26) A part of main memory can be allocated to store several adjoining blocks of disk memory. If the requested
data is in _________ then no disk access is necessary.
a) disk cache
b) cache blocks
c) read once cache
d) buffer disk cache
27) Instructions, fetched from memory, are _____________within the instruction unit, to determine the type of
instruction that is being executed. This allows branch instructions to be passed quickly to the branch processing
unit for analysis of future instruction flow.
a) partially decoded
b) partially executed
c) completely decoded
d) completely executed
28) In a superscalar CPU, the instruction unit has a(n) ____ to hold instructions until the required type of
execution unit is available.
a) pipeline
b) assembly unit
c) instruction set
d) cache memory
29) Computers that have multiple CPUs within a single computer, sharing some or all of the system's memory
and I/O facilities, are called______________, or sometimes tightly coupled systems.
a) bundled systems
b) simultaneous systems
c) multiprocessor systems
d) compound processor systems
30) Under ideal conditions, each CPU processes its own assigned sequence of program instructions
a) independently of other CPUs.
b) partially sharing the workload with other CPUs.
c) without interrupting the other CPUs.
d) by sharing L1 cache between other CPUs.
31) Each CPU in the processor, within a single integrated chip, is called a ___________
a) core.
b) CPU unit.
c) control unit.
d) Independent Processor Chip (IPC).
32) Which of the following is not an advantage of adding more than one CPU processor within a single
integrated chip?
a) Relatively inexpensive.
b) Reduce resource conflicts.
c) Programs can be divided into independent pieces and run separately.
d) Reduces power consumption, heat, and stress but gives equivalent processing power.
33) What is a "thread"?
a) The same segment of code used by many programs.
b) Independent segments of programs available to be executed in parallel.
c) The set of all variables that are used by all programs in execution.
d) Shared allocation of cache memory used by programs available to be executed.
34) In Symmetrical Multiprocessing (SMP) each CPU has
a) identical access to memory.
b) identical access to the I/O and memory.
c) identical access to the operating system, I/O and memory
d) identical access to the operating system, and to all system resources, including memory.
35) Simultaneous thread multiprocessing (STM) is also known as ___________
a) hyperthreading.
b) superthreading
c) expert threading
d) concurrent threading
Chapter 8 Discussion Questions
1) What are common characteristics included in the instruction set architecture (ISA)?
Sol: From the text: “These characteristics include such things as the number and types of registers,
methods of addressing memory, and basic design and layout of the instruction set.”
2) What are three important CPU architectural families, today?
Sol: From the text: “At present, important CPU architectural families include the IBM mainframe series,
the Intel x86 family, the IBM POWER/PowerPC architecture, the ARM architecture, and the Oracle
SPARC family.”
3) Having large numbers of specialized instructions inhibited efficient organization of the CPU. Why?
Sol: From the text: “Specialized instructions were used rarely, but added hardware complexity to the
instruction decoder that slowed down execution of the other instructions that are used frequently.
4) What is the benefit of having fixed-length instructions over variable-length instructions?
Sol: From the text: “The use of fixed-length, fixed-format instruction words with the op code and address
fields in the same position for every instruction would allow instructions to be fetched and decoded
independently and in parallel. With variable-length instructions it is necessary to wait until the previous
instruction is decoded in order to establish its length and instruction format.”
5) Describe the technique called code-morphing.
Sol: From the text: “Furthermore, a technique called code-morphing can be used to translate complex
variable-width instruction words to simpler fixed-width internal equivalents for faster execution. This
technique allows the retention of legacy architectures while permitting the use of modern processing
methods. Modern x86 implementations use this approach.”
6) Summarize how separating the fetch-execution cycle into different fetch and execution units improves
performance.
Sol: From the text: “Implementation of the fetch-execute cycle is divided into two separate units: a fetch
unit to retrieve and decode instructions and an execution unit to perform the actual instruction
operation. This simple reorganization of the CU and ALU components allows independent, concurrent
operation of the two parts of the fetch-execute cycle.”
7) Summarize how pipelining improves performance.
Sol: From the text: “The model uses an assembly line technique called pipelining to allow overlapping
between the fetch-execute cycles of sequences of instructions. This reduces the average time needed to
complete an instruction.” Or “Pipelining allows several instructions to be ‘in flight’ at the same time.”
8) Summarize the performance benefits of using separate execution units for different types of instructions.
Sol: From the text: “The model provides separate execution units for different types of instructions. This
makes it possible to separate instructions with different numbers of execution steps for more efficient
processing. It also allows the parallel execution of unrelated instructions by directing each instruction to
its own execution unit.”
9) Do pipelining and superscalar processing techniques affect the number of clock cycles of any individual
instruction? Explain your answer.
Sol: No they do not. From the text: “It is important to remember that pipelining and superscalar
processing techniques do not affect the cycle time of any individual instruction. An instruction fetch-
execute cycle that requires six clock cycles from start to finish will require six clock cycles whether
instructions are performed one at a time or pipelined in parallel with a dozen other instructions. It is the
average instruction cycle time that is improved by performing some form of parallel execution.”
10) Superscalar processing complicates the design of a CPU considerably. There are a number of difficult
technical issues that must be resolved to make it possible to execute multiple instructions simultaneously. What
are the most important issues?
Sol: From the text: “Every CPU request to main memory, whether data or instruction, is seen first by
cache memory. A hardware cache controller checks the tags to determine if the memory location of the
request is presently stored within the cache.”
12) Caching recently used data and instructions is an important performance enhancement. Summarize the
benefits cache.
Sol: selected from the subsection on Cache Memory: Main memory access is fast, but still slower than
the speed of the CPU. By storing recently used data and instruction in cache, the time required to fulfill a
memory request is decreased, thereby increasing overall performance. This improvement is significant
because cache hit ratios are commonly over 90%.
13) If a cache block is altered, what methods are used to update main memory? Of the various methods, which
is faster?
Sol: from the text: “Two different methods of handling the process of returning changed data from cache
to main storage are in common use. The first method, write through, writes data back to the main
memory immediately upon change in the cache. This method has the advantage that the two copies, cache
and main memory, are always kept identical. Some designers use an alternative technique known
variously as store in, write back, or copy back. With this technique, the changed data is simply held in
cache until the cache line is to be replaced.”
Sol: From the text: “…because of the overhead required to distribute the instructions in a useful way
among the different CPUs and the conflicts among the CPUs for shared resources, such as memory, I/O,
and access to the shared buses. With the exception of certain, specialized systems, there are rarely more
than sixteen CPUs sharing the workload in a multiprocessing computer; more commonly today, a
multiprocessor might consist of two, four, or eight core CPUs within a single chip.”
Solutions
1) Why is it so important that the CPU be allowed to do other tasks while waiting for a particular I/O operation
to be completed? (Two or three sentences should be adequate to answer this question.)
Sol: The CPU is operating at much higher speeds than I/O operations. If the CPU waited for I/O
operations, this would be extremely inefficient.
2) What would happen if interrupts were checked and processed during the middle of an execution cycle instead
of after the execution cycle has completed? (Two or three sentences should be adequate to answer this question)
Sol: From the text: "Interrupts are normally checked at the completion of each instruction. That is,
interrupts are normally checked after one instruction is finished and before another begins. This assures
that conditions won't change in the middle of an instruction that would affect the instruction's execution."
3) Once a DMA transfer has been initiated, why is it important that data being transferred not be modified during
this period? (Two or three sentences should be adequate to answer this question)
Sol: From the text: "Once the DMA transfer has been initiated, the CPU is free to perform other
processing. Note, however, that the data being transferred should not be modified during this period, since
doing so can result in transfer errors, as well as processing errors."
4) Explain why it is better to have an I/O device initiate an interrupt to the CPU rather than the CPU monitor the
I/O device. (Two or three sentences should be adequate to answer this question)
Sol: Monitoring I/O devices is considered polling, which is inefficient for the CPU. By having the I/O
device initiate communication to the CPU through an interrupt, it frees the CPU to perform other tasks.
5) Suppose that the keyboard device stored keystrokes in a buffer until it was full then sent the entire buffer for
processing. What would be some adverse consequences? (Two or three sentences should be adequate to answer
this question)
Sol: Student responses could be more creative, but generally, if user input is expected by an application,
then the application would stall waiting for the buffer to fill up. If the user wanted to interrupt the
computer, as in typing "CONTROL-ALT-DEL," nothing would happen until the buffer was full.
6) Consider the steps required to write a block of data from a disk to memory. Outline the major sequence of I/O
events that must occur to make this possible. (There are three major steps)
Sol: Taken from the example in the text.
1) Four pieces of data are sent to disk controller: 1) the location of the block in memory; 2) the location
where the data is to be stored on disk; 3) the size of the block 4) and the direction of transfer: Write.
2) The I/O service program sends a “ready” message to the disk controller and the DMA transfer process
takes place.
3) After the transfer is complete, the disk controller sends an interrupt to the CPU signaling completion,
and the interrupt handler either returns control to the program that initiated the request or notifies the
operating system that the program can be resumed.
7) Suppose an application program has initiated a DMA transfer from an I/O device, why does the I/O device
controller interrupt the CPU when it's complete? (Two or three sentences should be adequate to answer this
question)
Sol: In DMA transfers, the CPU is performing other tasks while the data transfer takes place; the CPU is
unaware of when the data transfer has completed. The device controller has to notify the CPU when it's
done so the interrupt handler can return control to the application that initiated the request.
8) Describe how the computer uses interrupts to control the flow of data to the printer.
Sol: From the text: "The computer sends one block of data at a time to the printer. The size of the block
depends on the type of printer and the amount of memory installed in the printer. When the printer is
ready to accept more data, it sends an interrupt to the computer. This interrupt indicates that the printer
has completed printing the material previously received and is ready for more."
9) Discuss how writing a device driver for a hard disk would require an in-depth understanding of how the
hardware functions. Would you also need an in-depth understanding of the OS platform for which the device
was designed to function? (Recommend using over 100 words to adequately answer this question)
Sol: I/O controllers work at the CPU interface and the device interface. The I/O device controller must
understand the specific OS instructions for CPU interfacing tasks: accepting I/O commands from the
CPU, transferring data between the controller and the CPU or memory, and sending interrupts and status
information to the CPU. At the device interface, the I/O controller must be able to control the device, such
as moving the mechanical read/write head to the correct track in a disk drive, when to read or write data
on the track, and maintaining rotational speed of the disk. Thus, writing a device driver would require an
in-depth understanding of the OS and hardware.
10) How is an arithmetic overflow error or divide by zero error interrupt different than an interrupt from the hard
disk controller signaling that a data transfer has completed? (Three or four sentences are sufficient)
Sol: Arithmetic overflow or divide by zero errors are abnormal events and it may not be possible to
complete the program in execution. In that case, the OS attempts to gracefully recover from the error
through traps or exceptions. A hard disk controller interrupting the CPU to signal that a data transfer has
completed is used by the OS to resume control of the program requesting the data transfer and does not
create the possibility that the system is halted.
11) A program in execution generates an interrupt with low priority. Before that interrupt is handled, it generates
a high priority interrupt. Discuss how these two interrupts change the flow of execution from the start of the low
priority interrupt through the completion of interrupt handling for this sequence of interrupts. (Three or four
sentences are sufficient)
Sol: From the text: “This [multiple interrupt problem] leads to a hierarchy of interrupts, in which higher-
priority interrupts can interrupt other interrupts of lower priority, back and forth, eventually returning
control to the original program that was running.”
12) The system designer of a workstation computer wants to have enough interrupt codes (IRQs) to support 32
different interrupt lines, IRQ0 – IRQ31. How many bits are needed to address all the IRQs? Show your work and
how you arrived at the solution.
Sol: Without any control or synchronous bits, 2 to the 5th power equal 32. Therefore 5 bits are needed.
13) Suppose that all programs in a particular CPU are given 50 clock cycles to process before getting swapped
out for another program. Suppose also, that it takes 5 CPU clock cycles to swap out the process control block
(PCB) for a particular program and restore the next program’s PCB.
a) What percent of the CPU clock cycles are used for processing 100 programs? (Hint: calculate: Program clock
cycles / (Swap clock cycles + Program clock cycles)). Show your work and how you arrived at the solution.
Notice that the total number of clock cycles to swap out the PCB is (n-1)*(5), where n is the number of
programs.
Total number of Clock cycles to swap out the PCB = (n-1)* 5 = 1*5 = 5
Total number of Program clock cycles = n*50 = 2*50 = 100.
Percent of CPU clock cycles used for processing 2 programs = 100/(5 +100) = 100/105 or 95.2%
Total number Clock cycles to swap out the PCB = (n-1)* 5 = 99*5 = 495
Total number Program clock cycles = n*50 = 100*50 = 5000.
Percent of CPU clock cycles used for processing 100 programs = 5000/(495 +5000) = 91%
…………………………………………………………………………………………………………………
b) With the same conditions as above assume that each of the 100 programs has one and only one interrupt
lasting 25 clock cycles. What percent of the CPU clock cycles are used for processing 100 programs?
To get started, here is an example for 2 programs and 2 interrupts.
After swapping program two into the CPU, program two gets interrupted at the 12th cycle (arbitrarily chosen),
and the interrupt gets serviced leaving 38 clock cycles (12 +38 = 50 cycles):
|<--5cycles-->|<---12cycles-->|<--5cycles-->|<---25cycles---->|<--5cycles-->|-------38cycles---->|
|<--swap--->|<---Prog2 start->|<----swap--->|<---interrupt---->|<--swap-->|<-Prog2 complete--->|
The total number of clock cycles used to swap out the PCB is 3n-1, where n is the number of programs.
Total number of Clock cycles to swap out the PCB = (3n-1)* 5 = 5*5 = 25
Total number of Program clock cycles = n*50 = 2*50 = 100.
Total number of Interrupt clock cycles = n*25 = 2*25 = 50.
Percent of CPU clock cycles used for processing 2 programs = 100/(25 +100+ 50) = 100/175 or 57.1%.
Now, calculate the percent of the CPU clock cycles are used for processing 100 programs were each program
gets interrupted only once.
Sol:
Total number of Clock cycles to swap out the PCB = (3n-1)* 5 = 299*5 = 1495
Total number of Program clock cycles = n*50 = 100*50 = 5000.
Total number of Interrupt clock cycles = n*25 = 100*25 = 2500.
Percent of CPU clock cycles used for processing 2 programs = 5000/(1495 +5000+ 2500) = 5000/8995 or
55.5%.
14) If my CPU runs at 4.0GHz, and on average takes 10 clock cycles to complete an instruction, how many
instructions will be completed in the time it takes to type "MY CPU IS RUNNING NOW"? Assume it takes 5
seconds to type the message. Show your work and how you arrived at the solution.
Sol: 4.0 G (cycles/sec) (1 instruction/10 cycles) (5 seconds) = 2,000,000,000 instructions
15) In terms of performance gains, what role does an I/O controller located inside the peripheral device perform?
(50 to 100 words should be sufficient to answer this question)
Sol: From text: "In general I/O controllers simplify the task of interfacing peripheral devices to a CPU.
I/O controllers offload a considerable amount of work from the CPU. They make it possible to control I/O
to a peripheral with a few simple I/O commands from the CPU. They support DMA, so that the CPU may
be free to perform other tasks. And, as we have already noted, device controllers provide the specialized
circuitry required to interface different types of peripherals to the computer." So, in short, I/O controllers
located inside the peripheral device allow the CPU to offload I/O tasks so the CPU can perform other
tasks, increasing the performance of the system.
Solutions
1) What two types of memory are referred to as primary memory? (A single sentence answer will suffice)
Sol: From the text: "Both conventional and cache memory are referred to as primary memory."
2) List four or more benefits of flash memory compared to a hard drive.
Sol: The barriers are cost and capacity. From the text, " Although magnetic disk storage offers huge
storage capacity at extremely low cost, the capacity of SSDs is continually expanding, and the cost falling,
suggesting that SSDs may replace magnetic disk storage for many, if not most, applications within the
next few years."
4) Explain what is meant by wear-leveling in Flash drives?
Sol: Wear-leveling is a technique that is designed to extend the life of a flash memory device. According
to the text "most failures in flash memory result from erase operations." Furthermore, from the text:
control logic, within the flash memory chip, manages memory space allocation and attempts to distribute
the write operations evenly over the entire space to minimize the number of erasures required. 5) What is
the capacity of a hard drive (in GB) consisting of 120,000 tracks, 4,000 sectors, and 4 surfaces? Assume each
block has 512 bytes.
Sol: On one surface, the size is 120,000 x 4,000 x 512 bytes = 245,760,000,000 bytes
Convert to GB: 245,760,000,000 bytes per surface *(1G / 2^30 bytes) = 228.9 GB per surface
Total capacity of drive is [4 surfaces] * [228.9 GB / surface] = 916 GB
6) If three mirrored drives are used in a fault-tolerant system, describe how majority logic is used to decide if
the integrity of the data is usable.
Sol: From the text: "If the data from all three disks is identical, then it is safe to assume that the integrity
of the data is acceptable. If the data from one disk differs from the other two, then the majority data is
used, and the third disk is flagged as an error."
7) What is the average rotational latency of a hard drive rotating at 7,200 RPM or 120 revolutions per second?
(Give your answer in milliseconds)
1 1
Sol: Formula from text: average latency time = ---------- x ----------------------------
2 rotation speed
Change rotational speed to revolution per sec: 7200 rev/min x [1 min / 60 sec] = 120 rev/sec
1 1
Average latency time = ---------- x ------------------ = 0.004167 sec or 4.167 ms
2 120 rev/sec
8) What is the transfer time for a hard drive rotating at 7,200 RPM or 120 revolutions per second? Assume there
are 30 sectors per track. (Give your answer in milliseconds)
1
Sol: From formula in text: Transfer time = --------------------------------------------
Number of sectors x rotational speed
1 1
Transfer time = --------------------- x ----------------------- = .000278 sec or .278 ms
30 sector/track 120 rev/sec
Sol:
a) seek time
b) average seek time
c) rotational latency or rotational delay or latency time
d) average rotational latency
e) transfer time
10) Explain how a mirrored array, consisting of 4 disk drives, would be approximately 4 times faster during a
multiblock read.
Sol: From the text: "In a mirrored array, each disk stores exactly the same data. During reads, alternate
blocks of the data are read from different drives, then combined to reassemble the original data. Thus,
the access time for a multiblock read is reduced approximately by a factor equal to the number of disk
drives in the array."
11) For a display of 1920 pixels by 1080 pixels at 16 bits per pixel how much memory, in megabytes, is needed
to store the image?
Sol: From the text: "In an active matrix display, the display panel contains one transistor for each cell in
the matrix. This guarantees that each cell will receive a strong charge, but is also expensive and difficult
to manufacture."
In a passive matrix display, a single transistor is used for each row and column of the matrix and
activates each cell, one at a time, repetitively, using a scan pattern.
The active matrix display is brighter.
13) How do QR codes differ from a one-dimensional barcode?
Sol: From the text: "Bar codes are read optically using a device called a wand that converts a visual scan
of the code into electrical binary signals that a bar code translation module can read. The module
translates the binary input into a sequence of number codes, one code per digit, that can then be input
into the computer."
From the text: "QR (Quick Response) codes are two dimensional codes, similar to bar codes, but with
larger data capacity. QR codes are read with a camera. They have achieved widespread use because they
are readily captured with mobile devices."
14) Using the Internet as a research tool, give an overview of how pressure-sensitive (resistive film) touch
screens work (about 50 to 100 words). Provide URL, Author (if available) and date accessed.
Sol: URLs will vary, but here is one description: (No Author, 2011), "How can a screen sense touch? A
basic understanding of touch panels." Retrieved November 2, 2013 from
http://www.eizo.com/global/library/basics/basic_understanding_of_touch_panel/
Touch screen monitors using pressure-sensitive technology use "a glass screen and a film screen
separated by a narrow gap, each with a transparent electrode film (electrode layer) attached." As a
finger or stylus touches the outer glass it comes into contact with the thin film below causing a flow of
||||||||||||||ZW2\current and the location is identified. "The point of contact is identified by detecting this
change in voltage."
15) Commercial cloud services can be used as a storage provider for data and programs needed by a company.
Use the Internet as a research tool and give three descriptions of personal or commercial cloud services that can
be used as a storage provider. Provide the author (if possible), URL, and the date you accessed the website. The
descriptions should be about 3 to 4 sentences each.
Sol: URLs will likely be different, but here are three examples: