Computer Literacy Workbook

1996-1997 Printing, 3rd Edition

William T. Verts


Solutions to Sample Midterm Exam

Pages 390-402

While many of the questions are complete in this document, you will find it useful to have your workbook available for the diagrams and pictures that they refer to.

Visitors since March 15, 1997


Index

  1. Jump to Part 1 -- General Questions
  2. Jump to Part 2 -- MS-DOS Review
  3. Jump to Part 3 -- Microsoft Windows
  4. Jump to Part 4 -- Word Processing & Window Write
  5. Jump to Part 5 -- Spreadsheets & Lotus 1-2-3

PART 1 -- General Questions

#1 -- True or False

#2 -- Convert the following numbers (show your work, and NO calculators allowed!)

#3 -- Convert the binary number 111011010 to base 8 without converting it to base 10 first (show how the binary number is partitioned into bits before the conversion

Since 2^3 = 8^1, every three binary (base 2) digits is equivalent to one octal (base 8) digit. Starting at the right, partition the binary number into packets of three bits and treat each packet of three bits as if it were a separate (much smaller) conversion problem. (If you get to the left side of the binary number and fewer than three bits remain, pad to the left with zeroes until you get three bits -- remember that leading zeroes don't affect the result.) For this problem, the partitions give you bit packets:
111 011 010

Convert 111 to decimal: 1*2^2 + 1*2^1 + 1*2^0 = 4+2+1 = 7
Convert 011 to decimal: 0*2^2 + 1*2^1 + 1*2^0 = 0+2+1 = 3
Convert 010 to decimal: 0*2^2 + 1*2^1 + 0*2^0 = 0+2+0 = 2

Once you have made all of the conversions, write down the digits in order:

732 (base 8)

If the problem were to convert the number into hexadecimal (base 16), the only part that differs from above is the number of bits in each packet. Since 2^4 = 16^1, every four bits is the same as one hexadecimal digit. Partitioning the binary number gives us (notice that we had to pad the left packet with three zeroes):

0001 1101 1010

Convert 0001 to decimal: 0*2^3 + 0*2^2 + 0*2^1 + 1*2^0 = 1
Convert 1101 to decimal: 1*2^3 + 1*2^2 + 0*2^1 + 1*2^0 = 13
Convert 1010 to decimal: 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 = 10

After all conversions, write down the digits in order, mapping digits greater than 9 onto the appropriate letters (A=10, B=11, C=12, D=13, E=14, F=15):

1DA (base 16)

#4 -- To convert a binary number directly to a base which is a power of two (base 4, 8, 16, 32, etc.) without going through decimal, partition the number into groups, then convert each group individually. How many bits are in each group if you are converting to:

#5 -- A word in computer jargon is defined as two consecutive bytes of memory. How many...

In this problem, you must remember that there are 8 bits in a byte, and that "kilo" means 2^10 = 1024 when talking about computer memory. So, a "kiloX" means 1024 X's, whatever an X is.

#6 -- A quad is defined as four consecutive bytes of memory. How many.....

As in the previous problem, this involves computer memory, where "kilo" means 1024. When performing conversions, you need to know whether to multiply one unit by another or divide. If you are going from lots of little units (e.g., bits) to fewer big units (bytes, nybbles, words, quads, etc.) you divide. If you are going in the other direction you multiply to get a large number of smaller units.

#7 -- Think about one digit from the seven segment display on your pocket calculator; you can light the segments to form a lot more characters than simply 0 through 9 (think about A, C, and E, for example). How many different patterns of lighting can you set up on one display digit? (you may express your answer as a power; you don't need to calculate it.)

Each digit has seven segments, each segment may be either on or off. In some sense, then, the display represents a seven digit binary number (1=on, 0=off), and the problem becomes "how many different numbers can you generate with seven binary digits?". Study pages 25-27 of the workbook. From that you will see that the number of patterns is b^d, where b is the base and d is the number of digits. For this problem, b=2 and d=7, so you can get 2^7 = 128 different patterns on one display digit. (With one segment you have two patterns, one and off. With two segments you have four: off-off, off-on, on-off, and on-on. Every time you add a segment you double the number of possible patterns.)

#8 -- A family has four children, each with a red shirt, a green shirt, and a blue shirt. How many configurations of children and shirts are possible?

This is the same kind of problem as #7. You must determine the base (number of possibilities per digit) and the number of digits (the independent variables). In this case, the children are independent, so the number of digits is four. The base is three because each child has one of three choices for shirts. Since b=3 and d=4, b^d = 3^4 = 81 combinations.

#9 -- Suppose I give you a 5-input AND gate.....

#10 -- Trace the following circuit and show the outputs for all possible input values

#11 -- Trace the following circuit and show the outputs for all possible input values


PART 2 -- MS-DOS Review

#12 -- In this problem, each of the descriptions below is for a task that I wish to perform as part of a sequence (each answer builds on the one before it). For each description, write down the single MS-DOS command that you would type in to perform the requested task. You may assume that you are on one of the machines in the lab, connected to the file server, and that there is a blank, formatted disk in the A: drive. Your prompt is C:\>, the default path on F: is F:\, and the default path on A: is A:\ (of course since the disk in A: is blank).

There may be several correct answers for the questions below; in such cases the answers will be listed on separate lines.

#13 -- Two files called FILEA.WRI and FILEB.WRI are in the current subdirectory of my disk. FILEA.WRI contains the data that should be in FILEB.WRI, and vice versa.

#14 -- You are working in Windows Write on a document. In order to keep old versions, you successively save your document to unique files where the names contain an increasing number. These files are called (successively) FILE0001.WRI, FILE0002.WRI, FILE0003.WRI, and so on.

#15 -- In MS-DOS, what is the difference between an internal command (such as CLS, CD, DEL, and RD) and an external command (such as FORMAT, CHKDSK, or WIN)?

Internal commands are those that you absolutely need in order to manage the files on your disks, and as such are built into the operating system running in RAM so as to be always available. When you type in a command at the MS-DOS prompt, DOS first looks through its internal list to see if the command you typed is present; if so the command is executed immediately from the code running in RAM. If not, then MS-DOS looks around on the disk drives for a program file with the same name as the command, but ending in one of the extensions .BAT, .COM, or .EXE. Upon finding such a file, the file is loaded into RAM from the disk, run, then flushed from RAM (if no file with that name is found, then you get the error message "BAD COMMAND OR FILE NAME"). This is a neat way of extending the operating system so that to a user it looks like all the needed commands are built in, even those that the writers of MS-DOS could not anticipate.

For a short "exam answer", state that internal commands are built into MS-DOS and are always available, while external commands are program files that must be loaded in from disk before they can be run.

#16 -- What are the three major functions of an operating system?

  1. To manage the hardware

    Computers have peripheral devices (tape drives, disk drives, keyboards, modems, printers, etc.), so when services from one or more of these are required, the operating system makes sure that they are healthy and available. In a multi-user computing system (such as UNIX) the operating system is responsible for arbitrating requests for hardware from different users, so that everybody gets a fair chance at using the equipment. (For example, suppose that a system had four tape drives and two individual users each wanted three tape drives at the same time. The operating system has to make sure that one user doesn't just grab and hold the drives without letting the other user have a chance, and it must insure that both users don't grab two drives and lock each other out from the third.)

  2. To provide a user interface

    Whether it is a GUI (graphical user interface) such as the Mac or one of the varieties of Windows, or a CLI (command line interface) such as DOS or UNIX, the operating system has to provide some mechanism for allowing users to enter commands and see their results.

  3. To allow users to run programs, including user programs

    Using a computer means running programs, whether those written by the "wizards" who set up the system, or the "ordinary mortals" who have to use it.

#17 -- You have a blank, formatted disk in A:, and the prompt is A:\>. To the right, write down all commands necessary to construct the directory structure shown.

(The root of A: has subdirectories MONEY and JUNK hanging from it, and MONEY has subdirectories GLOP and JUNK hanging from within it.)

  1. MD MONEY
  2. MD JUNK
  3. MD MONEY\GLOP
  4. MD MONEY\JUNK

Since there are only four slots for answers, and four subdirectories that must be created, all four commands must be variants of the MD command. Therefore, you can't create MONEY and then CD MONEY in order to create the inner subdirectories (that would take a fifth command). Hence, you must include the path information for the commands that create the inner subdirecotries.

#18 -- Assume that you successfully built the directory structure above. For all questions below, assume that the prompt is A:\MONEY> (all questions are independent).

#19 -- A new command called BUBBLE is available. BUBBLE works exactly the same way that the DIR command does, except that instead of displaying the files in the directory it counts the number of matching files (not including the special subdirectories . and ..) and then displays that many "bubbles" on the screen. Just as in the DIR command, the BUBBLE command may use the * and ? wildcard characters. For example, if I type in the regular command DIR A:\COINS105\FALL1992\*.DOC then the file names printed out would be LAB1.DOC, LAB2.DOC, LAB3.DOC, and LAB4.DOC. By contrast, the new command BUBBLE A:\COINS105\FALL1992\*.DOC would answer with oooo (4 bubbles). Using BUBBLE, and the directory tree drawn below, give commands to display on the screen exactly:

(In several cases where many answers are legal an assortment is given.)

#20 -- How many bubbles will be displayed by the command below? BUBBLE A:\TAXES\1991\*.WK1

Two. One bubble for REPLY.WK1 and one for RESEARCH.WK1 (only two files have .WK1 extensions).

#21 -- What single MS-DOS command will erase all files in the \WORD subdirectory?

DEL \WORD\*.* will do the job. You may use the synonym ERASE for the DEL command, and you may include the A: as part of the path, even though it is not required.

PART 3 -- Microsoft Windows

#22 -- What advantages do a Graphical User Interface (GUI) such as Microsoft Windows have over a Command Line Interface (CLI) such as MS-DOS?

In a CLI you must remember all of the possible commands, as well as any modifiers, and must type them in exactly or they will not work correctly. In a GUI all available commands are presented as a list of menu items or push buttons. In essence, CLI's are "fill in the blank", and GUI's are "multiple choice".

#23 -- In a Windows dialog box, what is the difference between a set of check-boxes and a set of radio-buttons?

Although check-boxes are typically shown as squares and radio-buttons as circles, there is a more fundamental difference than shape. In a group of check-boxes, any or all may be checked or unchecked; they are used for selecting many options from a set of options. In a group of radio-buttons, only one may be selected at any one time; selecting another unselects the previously selected button. This is similar to the car radios which have a set of buttons for finding preset stations quickly; pushing in one button pops out the one that was pushed in.

#24 -- Please write a single sentence to define each of the following terms:

#25 -- Based on the views above, most of your answers to the questions below will be like "Click on the ___ button", "Click on the ___ menu entry", "Double click on the ___ icon", or "Click-drag on the ___ control" (filling in the blank appropriately).

#26 -- Short answer. What is a group icon, and how is it used?

A group icon is an icon that exists inside of Program Manager, and is used to contain program icons. Typically, the program icons within a group icon are related in some general way.

#27 -- For these questions, please refer to the screen image just above:


PART 4 -- Word Processing & Windows Write

#28 -- Must you highlight an entire document before saving it? Why or why not?

No. I've had some people believe that they had to select the whole document in order to save the whole document, and in some way that makes a certain kind of sense. However, the File-Save menu entry assumes that the entire document is to be saved. In order to save a fragment of a document, you would have to create a separate document containing only that fragment (by cut and paste), then save that separate document.

#29 -- What is the difference between saving a document and printing it to a file?

This is an exercise that you did in lab 2; you printed your document to a file, then copied the file to the printer. This is to illustrate that you can "print" without actually having a printer available, then take your file to a computer that has a printer (but not necessarily a word processor). This also help us in those cases where the lab computers are working but not the printer -- you can do all of your work, including the print step, then come back when the printer is up to copy the results to paper. For many years, I had no printer at home: I would print my documents to files, then shove the files up through the modem to computers in my department that were attached to good printers. Those departmental computers not only did not know anything about how my document was formatted, they weren't even PC's!

Saving a document in the normal way (File-Save) saves the text along with formatting commands (which characters are bold face, which are italic or underlined, paragraph styles, document layout styles, font information, etc.). Typically, this file does not contain information about a specific type or brand of printer.

Printing to a file converts the document into a series of commands that tell a specific type of printer how to place marks on a page. When the file is copied to the printer, the printer has no way of telling that it is receiving its information from a file and not from a File-Print menu command.

#30 -- Short Answer: what is kerning, and how does it improve the look of a document?

Normally, characters do not overlap. Each character is placed directly next to its neighbors on the line. The shapes of those adjacent characters may be such that there is an awkward looking gap between them (think of a "V" followed by an "A").

Kerning allows characters to overlap in order to reduce the amount of whitespace between them. In some cases, one character may fit under an overhang of another.

Note that kerning and proportional spacing are not the same; proportional spacing means that every character takes up only the amount of space on the line that it requires ("i" takes up less space than "W"), and proportional spaced text may be either kerned or not kerned.

#31 -- Short answer: what is the difference between a typeface and a font?

A typeface is the set of common shapes that define an alphabet. In many cases, these shapes are defined by mathematical curves that can be scaled up or down, skewed, shifted, etc. A font is a typeface at a particular weight (normal, bold, thin, etc.), style (normal, italic, reverse italic, hollow, etc.), and point size. "Times Roman" is a typeface, "Times Roman, bold, italic, 12 point" is a font. Typefaces can't be printed (because you don't know size, etc.), but fonts can.

#32 -- A character font is defined by four major attributes, listed below. Define each one:

#33 -- Suppose that whenever you go to the Edit menu, you don't see either Cut or Copy in boldface (i.e., they are grayed out and you are not allowed to choose either one). What does this mean? What would it mean if Paste were grayed out?

If Cut and Copy are grayed out, there is nothing to either cut or copy to the clipboard. This means that nothing in the document is selected (covered by the highlight). To check this, bring up an existing Windows Write document, make sure that the insertion point is a vertical line between two characters, then click on the Edit menu -- Cut and Copy will be gray.

If Paste is grayed out, there is nothing in the clipboard to paste. This is the state that Windows is in when you first start it up, and if you click the Edit menu in an existing document before doing any cuts or copies, the Paste entry will be gray. Once you make a cut or copy, Paste will be activated for the rest of the session (remember that material remains in the clipboard until it is replaced by something new).

#34 -- Windows is running, and there are two copies of Windows Write open on the desktop. One copy contains a document called TOP.WRI, and the other, which is the active window, contains a document called BOTTOM.WRI. Describe all the steps to move (not just copy) all the text from BOTTOM.WRI to the bottom of the text in TOP.WRI.

First, select all of the text in BOTTOM.WRI (this can be done by scrolling to the top of the document, then click-dragging to the bottom, or by keyboard command Ctrl-Home followed by Ctrl-Shift-End). Next, click on Edit-Cut (because this is a move instead of a copy, you Edit-Cut instead of Edit-Paste). Next, click on the window containing TOP.WRI, and position the insertion point at the bottom of the document. Finally, click Edit-Paste.

#35 -- True or False: If you left justify a paragraph, then immediately right justify, you have performed the same action as clicking on Paragraph, then on Justify

False. The paragraph remains in the last justification mode selected, namely right justified. Full justification requires a separate menu entry.

#36 -- Word processors often have a feature called drag-and-drop. After text is selected by a click-drag, the user moves the text by clicking inside the highlight, then dragging the cursor to where the text should go. When the button is released, the text appears in the new position. Does drag-and-drop use the clipboard to hold the text being moved? Explain.

There is no need to use the clipboard because the source text and its new destination are both well defined. Drag-and-drop is most useful when both source and destination are only short distances apart (no more than a page apart, say). For longer moves, Edit-Cut and Edit-Paste (which use the clipboard) are still useful.

#37 -- Examine the following Windows Write document. Notice that the Indents dialog box is open on top of the text window. What values would you put in each of the three boxes for the requested indents?

Left Indent First Line Right Indent
What are the current values of the indents? 0.0 0.0 0.0
Normal: Indent the first row by 1/2 inch 0.0 0.5 0.0
Hanging: Indent body 1/2 inch, but not first line 0.5 -0.5 0.0
Quoted: Indent both sides by 1/2 inch, not first line 0.5 0.0 0.5
Quoted: Indent both sides and first line by 1/2 inch 0.5 0.5 0.5
Remember that the First Line indent is relative to the Left Indent. A positive First Line indent moves to the right, a negative First Line indent moves to the left (see the Hanging indent example).

#38 -- Answer each question below for the corresponding screen to its left.

#39 -- Your boss puts you in front of a word processing program you've never seen before. Name at least two capabilities (beyond simply typing/editing/saving/printing the text) that Windows Write has that you also expect the new word processor to have

#40 -- Name two things that Window Write does not have that you would expect this new word processor to have

#41 -- The Paintbrush accessory is running, and is behind your Windows Write document (but a portion of its window is still visible). List all steps needed to put a chunk of the graphics image into the document at the current insertion point

First, click in Paintbrush to activate it. Next, select the scissors tool. Click-drag over the desired region of the image, then Edit-Copy to place that region into the clipboard. Click on the Windows Write window, and set the insertion point to where you want the image to be placed. Finally, click on Edit-Paste in the Windows Write window to drop the image into the document.

#42 -- Short Answer. In Calculator, why is there an Edit-Copy menu entry, but no need for an Edit-Cut entry?

Edit-Copy puts the number from the calculator display into the clipboard. What would Edit-Cut mean? Put the number into the clipboard, then clear the display? There is no need for this action since the display can be cleared manually.

PART 5 -- Spreadsheets & Lotus 1-2-3

#43 -- The formula in cell E11 is: (E8+(1.2*$C$4)-$F7/H5+G$10). The formula is then copied to cell J15. What is the formula in J15 after the /Copy is completed?

First, identify those portions of the formula that do not change. These are absolute cell addresses (with a $ prefix), constants, and arithmetic operators. If you write down that much, even if you don't know how the changeable parts actually change, you will get partial credit. The partial credit answer is:
(__+(1.2*$C$4)-$F_/__+_$10)

The 1.2 doesn't change because it is a numeric constant, not a cell address. The $C$4 is an absolute cell address, and does not change under a copy. Cell addresses $F7 and G$10 are mixed addresses, partially relative and partially absolute. The relative part will change and the absolute part will not.

To complete the formula, you must figure out how the relative addresses change. Relative to cell E11, cell E8 is up three, cell H5 is right three, up six, cell $F7 is absolute column F, up four, and cell G$10 is right two, absolute row 10.

Now, relative to the target cell J15, up three is J12, right three, up six is M9, column F, up four is $F11, and right two, row 10 is L$10. The final formula is then:

(J12+(1.2*$C$4)-$F11/M9+L$10)

#44 -- The formula in cell D7 is (B7-14+E8*$F$10/B9*G$1). The formula is then copied to cell G15. What is the formula in cell G15 after the /Copy is completed?

As before, identify the relative parts that will change, then write down everything else. The partial credit answer is:
(__-14+__*$F$10/__*_$1)

The 14 doesn't change because it is a constant, not a cell address. The $F$10 is an absolute address, and the G$1 is mixed (The G will change but the $1 will not).

Relative to cell D7, cell B7 is left two, cell E8 is right one, down one, cell B9 is left two, down two, and cell G$1 is right three, absolute row 1.

Relative to target cell G15, left two is E15, right one, down one is H16, left two, down two is E17, and right three, row 1 is J$1. The final formula is:

(E15-14+H16*$F$10/E17*J$1)

#45 -- Why is often a bad idea to place constants inside formulae? (As in the example (D11+D11*0.09-2.00) which you miht have seen in the first spreadsheet lab.)

Placing constants in a formula is a bad idea because you will probably end up needing to change the constant at some point in the future. If so, you must change every formula that uses the constant. The solution is to put the constant in a cell by itself, and write all formulas that depend on it to reference the cell address instead of the literal value. Now, changing the contents of the cell updates all of the formulae automatically.

This may seem silly if all you have are a couple of formulae that use the value, but even so it is much easier to replace the contents of a cell with a new value than it is to edit a formula (and make sure that you don't mess up some other part of the formula while you are correcting the value).

#46 -- The result of the formula in cell H12 is the number 123.456, but the width of column H is 3 characters. What, exactly, will show up on screen in this cell?

The result will be *** (the cell will be filled with asterisks). Numeric results need space for the significant digits of the value and a space for the sign of the number (blank for positive, "-" for negative). In this case, that would require four spaces, not three. Since there is definitely no room in the cell to switch to scientific notation, the cell must be filled with stars to show that there is a value that cannot be displayed under the current width.

#47 -- Cell J15 evaluates to the number 1626. Now, why would the formula ^J15+1 return a different value from the formula (J15+1)?

The formula (J15+1) returns the value 1627, as you would expect. In the other formula, the leading ^ indicates that the formula represents centered text, so what you would see on screen is the string J15+1 centered in the cell. It is not a formula at all, but only superficially looks like one.

#48 -- Cell A1 contains the formula (A2+1), and cell A2 contains the formula (A1+1). What kind of error is illustrated here? What is the error message shown on screen?

Cell A1 can't know its value until A2 is computed, and cell A2 can't know its value until A1 is computed. This tail-chasing is called a "circular reference error", and is shown in Lotus 1-2-3 by the message CIRC at the bottom of the screen. One of the formulas must be changed to break the ring.

#49 -- Assume that cell A1 contains the number 5, and cell B1 contains 1. For each of the following formulae, write down the result that would appear on screen. Be careful in your answer to indicate the proper justification of the result in the cell.

The formula you
type in:
The result you
see on screen:
Explanation
'Mary Mary Leading quote means left justified text
"Sam Sam Leading double quote means right justified text
Sam Sam Starting with a letter is the same as starting with a single quote (left justified text)
\= ============= The leading backslash says to repeat the following character(s) throughout the cell, regardless of the width of the cell
(B1-2*A1) -9 Since multiplication has precedence over subtraction, after replacing the cell references with their numeric values the formula becomes (1-(2*5)) = (1-10) = -9. By default numbers are right justified in Lotus 1-2-3.
B1-2*A1 B1-2*A1 Since the first character is a letter, this is a simple text string, not a numeric formula to be calculated.
@SUM(A1*2,B1,1) 12 The cell arguments to the @SUM function are replaced by the values from the referenced cells. The formula becomes @SUM(5*2,1,1) = @SUM(10,1,1) = (10+1+1) = 12. As before, numbers are right justified.
"B1+A1 B1+A1 The leading double quote means that this is a text string, not a numeric formula to be calculated.

#50 -- In the following expression, put parentheses around the terms in such a way as to indicate how Lotus 1-2-3 would calculate the answer.

1 - 2 ^ 3 + 4 * 5 ^ 6 / 7 + 8 * 9

This problem indicates to put as many parentheses in the expression as possible without changing its meaning. Remember that operators of the same precedence level are evaluated from left to right. An acceptable partial answer is to show only the exponentiation and multiplication/division operators parenthesized, but a complete answer will also show how the addition/subtraction operators are parenthesized as well. The partial answer is:

1 - (2 ^ 3) + ((4 * (5 ^ 6)) / 7) + (8 * 9)
The complete answer is:
(((1 - (2 ^ 3)) + ((4 * (5 ^ 6)) / 7)) + (8 * 9))

#51 -- For the rest of the Lotus questions, use the spreadsheet sample given below.

____A____ ____B____ ____C____ ____D____ ____E____ ____F____ ____G____
1
2 Quarter1 Quarter2 Quarter3 Quarter4
3 Fred 13 8 5 8
4 Mary 10 13 9 8
5 Sam 10 3 1 4
6 Total

Back to the top of this document
Back to the CMPSCI 105 page