Solution Manual for Computer Science: An Overview, 13th Edition
- Information Technology
- 164 pages
- Shared May 2025
Solution Manual for Computer Science: An Overview, 13th Edition helps you grasp essential concepts faster with structured explanations.
Preview 16 of 164 pages
See the first 16 pages exactly as they appear in the document.
Page 1 Read page 1 as text
S olution Guide to Accompany Computer Science: An Overview Twelfth Edition J. Glenn Brookshear Dennis Brylow
Page 2 Page 3 Read page 3 as text
1 Chapter Zero INTRODUCTION Chapter Summary This chapter introduces computer science as the discipline that seeks a scientific foundation for topics such as computer design, computer programming, algorithmic processes, etc. It gives an informal introduction to the concept of an algorithm (more detail is given in Chapter 5 ) and discusses how this concept forms the foundation of the fi el d known as computer science. The chapter also presents a brief history of computing machinery and introduces the “Big Ideas of Computer Science” of the College Boards codification , namely ; algorithms, abstraction, creativity, data, programming, Interne t, and impact. These can be found in “The Principles Project” , by Owen Astrachan and Amy Briggs , a publication on the CS Principles website (www. c s principles.org). A major goal of this chapter is to establish the concept of computer science as being the underpinning for the development of the computer applications with which students are familiar. Most introductory students will have seen computer science only in the context of using application software, Web browsing, and perhaps some programming. Thus, they may not understand the distinction between studying computer science and learning how to use today’s computer application software. I find it helpful to explain that computer science deals with the development of tomorrow’s application software, rather than learning how to use the applications of today. Comments 1. This introductory chapter is included to set the stage — not to be the final word on the topics presented. The goal at this point is merely to develop an intuitive understanding of the ideas and the terminology involved. 2. When writing this introduction, I envisioned a chapter that would be used largely as a reading assignment. Students tend to start a new semester with a fresh, enthusiastic attitude. They are eager to get started and have resolved that this semester "I'll keep up and stay organized." I like to take advantage of this enthusiasm. Thus, I assign this chapter as a reading assignment on the first day of class and spend very little time discussing it. I n my courses , class presentation usually starts with material from Chapter 1. 3. Those of us who teach introductory computer science courses are always looking for interesting algorithms to use as examples. Along these lines I've drawn from the art of origami (see the bird folding algorithm in Chapter 5 ) for some time. Introductory students seem to enjoy working with an algorithm that does something "different." I've also drawn from the field of magic for such examples. I hope you like the example in Figure 0.2 of the text and find it useful. 4. Most beginning students don’t distinguish between using current technology and computer science. They don't understand that there is much more to computer science than Web browsing and writing programs. In this regard, I like to use the following quote from Charles Darwin. "... science consists of grouping facts so that general laws and conclusions may be drawn from them."
Page 4 Read page 4 as text
2 5. The topics discussed throughout the text collectively provide an understanding of computer science. There is probably no single topic that a student must know. (Do students really have to know about error correcting codes , two's complement arithmetic, or the significance of the halting problem?) So don't hesitate to skip a topic if it doesn't fit your course goals. On the other hand, I encourage you to cover a wide range of topics. The goal is to introduce students to computer science by presenting a variety of topics in enough detail to expose the realities of the issues involved. (Each individual topic may not be necessary on its own, but together they paint an important picture.) Maintaining this perspective is perhaps more of a challenge when teaching a computer literacy course than a course within a computer science curriculum. In these former cases there is a temptation to skip the more challenging or tedious topics since "they don't need to know that anyway." In contrast, I prefer to go ahead and present such subjects in a manner compatible with the audience and then adjust the level of assignments and exams to match the objectives of the particular course and the abilities of the students. ( I think a major problem in today's education is that we avoid challenging topics. In turn, the students have learned to view formal course work as an irrelevant waste of time and treat it accordingly. They perform poorly, we decide we need to simplify the course further, and the cycle continues. )
Page 5 Read page 5 as text
3 Chapter One DATA STORAGE Chapter Summary This chapter presents the rudiments of data storage within digital computers. It introduces the basics of digital circuitry and how a simple flip - flop can be used to store a single bit. It then discusses addressable memory cells and mass storage systems (magnetic disk, compact disks, and flash memory ). Having established this background, the chapter discusses how information (text, numeric values, images, and sound) are encoded as bit patterns. The re are two optional sections , first in a brief introduction to Python highlighting the means by which a programming languages hides the details of memory represention. The second delve s more deeply into data storage topics by presenting the problems of overflow errors, truncation errors, error detection and correction techniques, and data compression. Comments 1. Perhaps the most important comment I can make about this chapter (and the next one as well) is to explain its role in the chapters that follow. This involves the distinction between exposing students to a subject and requiring them to master the material — a distinction that is at the heart of the spirit in which the entire text was written. The intention of this chapter is to provide a realistic exposure to a very important area of computer science. It is not necessary for the students to master the material. All that is needed from this chapter in the remaining part of the book are the remnants that remain from a brief exposure to the issues of data storage. Even if the course you teach requires a mastery of these details or the development of manipulation skills, I encourage you to avoid emphasizing bit manipulations and representation conversions. In particular, I urge you to avoid becoming bogged down in the details of converting between base ten and binary notation. I can’t think of anything that would be more boring for the students. (I apologize for stating my opinion.) 2. The “ required ” sections in this chapter cover the composition of main memory (as a background for machine architecture in chapter 2 and data structures in chapter 8 ), the physical issues of external data storage systems (in preparation for the subjects of file and database systems in chapter 9 ), and the rudiments of data en coding (that serves as a background for the subject of data types and high - level language declaration statements in chapter 6) . The optional sections explore the issues of error handling, including transmission error detection and correction as well as the problem of truncation and overflow errors resulting from numeric coding systems. 3. As mentioned in the preface of the text, there are several themes that run throughout the text, one of which is the role of abstraction. I like to include this theme in my lecture in which I introduce flip - flops. I end up with both flip - flop diagrams from the text on the board, and I emphasize that they represent two ways of accomplishing the same task. I then draw a rectangle around each diagram and erase the circuits within the rectangles leaving only the inputs, outputs, and rectangles showing. At this point the two look identical. I think that this creates a strong visual image that drives home the distinction between an abstract tool’s interface with the outside world and the internal details of the tool. This is a specific example of teaching several topics at the same time — in this case, the concepts of abstraction and encapsulation are taught in the context of teaching digital circuits.
Page 6 Read page 6 as text
4 4. Don’t forget about the circuits in Appendix B. I used to have students who continued to record an extra bit in the answer to a two’s complement addition problem when a carry occurred — even though I had explained that all values in a two’s complement system were represented with the same number of bits. Once I started presenting the addition circuit in Appendix B, this problem disappeared. It gave the students a concrete understanding that the carry is thrown away. ( Of course, i n a later course computing students will learn that it really isn’t thrown away but saved as the "carry bit" for potential use in the future, but for now I ignore this.) I have also found that a good exercise is to ask students to extend the circuit in Figure B.3 so that it produces an additional output that indicates whether an overflow has occurred. For example, the output could be 1 in the case of an overflow and 0 otherwise. 5. For most students, seeing the reality of the things they are told is a meaningful experience. For this reason I often find it advantageous to demonstrate the distinction between numeric and character data using a spreadsheet. I like to show them how the manipulation of large numbers can lead to errors. 7. I have found that students respond well to hearing about CD and DVD storage systems, how sound is encoded, and image representation systems such as GIF and JPEG. I have often used these topics as a way of getting non - majors interested in technical issues. 8. For students not majoring in computer science, topics such as two's complement and floating - point notation can get a bit dry. The main point for them to understand is that when information is encoded, some information usually gets lost. This point can be made just as well using audio and video, which are contexts that seem to be more interesting to the non - majors. Answers to Chapter Review Problems 1. With a 1 on the upper input and a 0 on the lower input, all circuits will produce an output 0. If instead a 0 is on the upper input and 1 is on the lower input, circuits b and c will produce an output 1, and circuit a will still produce a 0. 2. a. The entire circuit is equivalent to a single AND gate. b. The entire circuit is equivalent to an Exclusive OR gate. 3. a. After the third pulse, this circuit will produce an output of 1 and 1. After the fourth pulse, both flip - flops are flipped back to a 0 state so t he circuit will again produce an output of 0 and 0. It is interesting to note that this circuitry forms a binary counter that will repeatedly count from 00 to 11. Thus, this circuit forms a n abstract tool that can be used as a building block in other circuits. Additional flip - flops can be added to count through a larger range of numbers. b. A 1 will be sent on Output B on the 2 nd , 6 th , 10 th … pulses of the clock. Likewise, a 1 will be sent to Output C on the 3 r d , 7 th , 11 th … pulses of the clock. A 1 will not be sent to any output on the 4 th , 8 th , 12 th … pulses of the clock. As we move forward into the next chapter, a circuit similar to this can be used to drive the machine cycle (composed of fetch, decode, and execute). Output A would be connected to the input that activates the fetch circuitry. Likewise Output B and Output C would be connected to the decode and execute circuits respectively. 4. This is a flip - flop that is triggered by 0s rather than 1s. That is, temporarily changing the upper input to 0 will establish an output of 1, whereas temporarily changing the lower input to 0 will establish an output of 0. To obtain an equivalent circuit using NAND gates, simply replace each AND - NOT gate pair with a NAND gate.
Page 7 Read page 7 as text
5 5. Address Contents 00 02 01 53 02 01 03 53 6. 256 using two hexadecimal digits (16 bits) , 65536 using four hexadecimal digits (32 bits). 7. a. 11001101 b. 01100111 c. 1001 1010 d. 11111111 e. 00010000 8. a. 1 b. 1 c. 0 d. 0 9. a. A0A b. C 7 B c. 0 B E 10. The image consists of 1024 x 1024 = 1,048,576 pixels and therefore 3 x 1,048,576 = 3,145,728 bytes, or about 3MB. This means that about 86 images could be stored in the 256MB camera storage system. (By comparing this to actual camera storage capacities, students can gain an appreciation for the benefits of image compression techniques. Using them, a typical 256MB storage system can hold as many as 300 images.) 11. 786,432. (Each pixel would require one memory cell.) 12. Data retrieval from main memory is much faster than from disk storage. Also data in main memory can be referenced in byte - sized units rather than in large blocks. On the other hand, disk storage systems have a larger capacity than main memory and the data stored on disk is less volatile than that stored in main memory. 13. There are 70GB of material on the hard - disk drive. Each CD can hold no more than 700MB. Thus, it will require at least 100 CDs to store all the material. That does not seem practical to me. On the other hand, DVDs have capacities of about 4.7GB, meaning that only about 15 DVDs would be required. This may still be impractical, but its a big improvement over CDs. (The real point of this problem is to get students to think about storage capacities in a meaningful way.) 14. There would be about 5,000 characters on the page requiring two bytes for each two byte Unicode character. So the page would require about 10,000 bytes or 10 sectors of size 1024 bytes. 15. The novel would require about 1.4MB using ASCII and about 2.8MB if two byte Unicode characters were used. 16. The latency time of a disk spinning at 3 60 0 revolutions per minute is only 0. 00833 seconds. 17. About 11 . 4 milliseconds. 18. About 7 years! 19. What does it say? 20. h ex notation 21. a. D o e s 1 0 0 01000010 01101111 01100101 01110011 00100000 00110001 00110000 00110000 / 5 = 2 00100000 00101111 00100000 01101010 00100000 00111101 00100000 00110010 0 ? 00110000 00111111 b. T h e t o t a 01010100 01101000 01100101 00100000 01110100 01101111 01110100 01100001 l c o s t i 01101100 00100000 01100011 01101111 01110011 01110100 00100000 01101001 s $ 7 . 2 5 .
Page 8 Read page 8 as text
6 01110011 00100000 00100100 00110111 00101110 00110010 00110101 00101110 22. a. 42 6F 65 73 20 31 30 30 20 2F 20 35 20 3D 20 32 30 3F b. 54 68 65 20 74 6F 74 61 6C 20 63 6F 74 20 69 73 20 24 37 2E 32 35 2E 23. 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000 , 10001, 10010 24. a. 00110010 00110011 b. 10111 25. They are the powers of two. 1 10 100 1000 10000 100000 26. a. 15 b. 1 c. 21 d. 16 e. 19 f. 0 g. 5 h. 9 i. 17 j. 25 k. 26 l. 27 27. a. 111 b. 1011 c. 10000 d. 10001 e. 11111 28. a. 1 b. 5 c. - 3 d. - 1 e. 15 29. a. 100 b. 111 c. 010 d. 011 e. 110 30. a. 15 b. - 12 c. 12 d. - 16 e. - 10 31. a. 0001101 b. 1110011 c. 1111111 d. 0000000 e. 0010000 32. a. 01101 b. 00000 c. 10000 (incorrect) d. 10001 e. 11110 f. 10011 (incorrect) g. 11110 h. 01101 i. 10000 (incorrect) j. 11111 33. a. 5 00101 + 1 becomes + 00001 00110 which represents 6 b. 5 00101 00101 - 1 becomes - 00001 which converts to + 11111 00100 which represents 4 c. 12 01100 01100 - 5 becomes - 00101 which converts to + 11011 00111 which represents 7 d. 8 01000 01000 - 7 becomes - 00111 which converts to + 11001 00001 which represents 1 e. 12 01100 + 5 becomes + 00101 10001 which represents - 15 (overflow) f. 5 00101 00101 - 11 becomes - 01011 which converts to + 10101 11010 which represents - 6 34. a. 3 3 /4 b. 4 5/16 c. 13/16 d. 1 e. 2 1/ 4
Page 9 Read page 9 as text
7 35. a. 101. 11 b. 1111 . 1111 c. 101 . 011 d. 1. 01 e. 110.101 36. a. 1 1/ 8 b. - 1/2 c. - 3/16 d. 9/32 37. a. 11111111 b. 01001000 c. 11101111 d. 00101110 e. 00011111 (truncation) 38. 00111100, 01000110, and 01010011 39. The best approximation of the square root of 2 is 1 3/8 represented as 01011011. The square of this value when represented in floating - point format is 01011111, which is the representation of 1 7/8. 40. The value one - eighth, which would be represented as 00101000. 41. Since the value one - tenth cannot be represented accurately, such recordings would suffer from truncation errors. 42 . a. The value is either eleven or negative five. b. A value represented in two's complement notation can be changed to excess notation by changing the high - order bit, and vice versa. 43 . The value is two; the patterns are excess , floating - point , and two's complement, respectively. 4 4 . b would require too many significant digits . c would require too large of an exponent . d would require too many significant digits. 45 . When using binary notation, the largest value that could be represented would change from 15 to 63 . When using two's complement notation the largest value that could be represented would change from 7 to 31 . 46 . 4FFFFF 47 . 1123221343435 48 . yyxy xx yyxy xyx xx xyx 49 . Starting with the first entries, they would be x , y , space, xxy , yyx , and xxyy . 50 . Not a chance. MPEG requires transfer rates of 40 Mbps. 51 . a. D o e s 1 0 0 001000010 001101111 001100101 101110011 100100000 100110001 000110000 000110000 / 5 = 2 100100000 100101111 100100000 000110101 100100000 100111101 100100000 100110010 0 ? 000110000 000111111 b . T h e t o t a 101010100 101101000 001100101 100100000 001110100 001101111 001110100 101100001 l c o s t i 101101100 100100000 001100011 001101111 101110011 001110100 100100000 001101001 s $ 7 . 2 5 . 101110011 100100000 100100100 100110111 000101110 100110010 000110101 000101110 5 2 . The underlined strings definitely contain errors. 11001 11011 10110 00000 11111 10001 10101 00100 01110 53 . The code would have a Hamming distance of 3. Thus, by using it, one could detect up to 2 errors per character and correct up to 1 error per character.
Page 10 Read page 10 as text
8 54 . a. HE b. FED c. DEAD d. CABBAGE e. CAFE 55. Answers will vary as the exchange rates change daily . 56. Answers will vary depending on the currency selected. 5 7 . This is an interactive exercise , results will depend on the browser . 5 8 . A change to the dollar amount would need to be made in each of the expressions. 5 9 . no_B = 123234234 no_KB = no_B / 10 24 no_MB = no_KB / 1024 no_GB = no_MB / 1024 no_TB = no_TB / 1024 print(str(no_B) + ' B ' ) print(str(no_KB) + ' KB ' ) print(str(no_MB) + ' MB ' ) print(str(no_GB) + ' GB ' ) print(str(no_TB) + ' TB ' ) print(str(no_KB) + ' KB ' ) print(str(no_KB) + ' KB ' ) no_TB = 1.123 no_GB = no_TB * 1024 no_MB = no_GB * 1024 no_KB = no_MB * 1024 no_B = no_KB * 1024 print(str(no_B) + ' B ' ) print(str(no_KB) + ' KB ' ) print(str(no_MB) + ' MB ' ) print(str(no_GB) + ' GB ' ) print(str(no_TB) + ' TB ' ) print(str(no_KB) + ' KB ' ) print(str(no_KB) + ' KB ' ) 60 . m ins = 50 s ecs = 23 t ot_ s ecs = m ins * 60 + s ecs samples_per_ s ec = 44100 bytes_per_ s ample = 2 tot_bytes = tot_secs * samples_per_sec * bytes_per_sample print(tot_bytes) 61 . ‘**’ should be ‘*’ and ‘PRINT’ should be ‘print’
Page 11 Read page 11 as text
8 Chapter Two DATA MANIPULATION Chapter Summary This chapter introduces the role of a computer's CPU. It describes the machine cycle and the various operations (or, and, exclusive or, add, shift, etc.) performed by a typical arithmetic/logic unit. The concept of a machine language is presented in terms of the simple yet representative machine described in Appendix C of the text. The chapter also introduces some alternatives to the von Neumann architecture such as multiprocessor machines. The optional sections in this chapter present a more thorough discussion of the instructions found in a typical machine language (logical and numerical operations, shifts, jumps, and I/O communication), a short explanation of how a computer communicates with peripheral devices, and alternative machine designs. The machine language in Appendix C involves only direct and immediate addressing. However, indirect addressing is introduced in the last section (Pointers in Machine Language) of Chapter 7 after the pointer concept has been presented in the context of data structures. Comments 1. Much of Comment 1 regarding the previous chapter is pertinent here also. The development of skills in the subjects of machine architecture and machine language programming is not required later in the book. Instead, what one needs is an image of the CPU/main memory interface, an understanding of the machine cycle and machine languages, an appreciation of the difference in speeds of mechanical motion compared to CPU activities, and an exposure to the limited repertoire of bit manipulations a CPU can perform. 2. To most students at this stage the terms millisecond, microsecond, nanosecond, and picosecond merely refer to extremely short and indistinguishable units of time. In fact, most would probably accept the incorrect statement that activities within a computer are essentially instantaneous. Once a student of mine wrote a recursive routine for evaluating the determinant of a matrix in an interpreted language on a time - sharing system. The student tried to test the program using an 8 by 8 matrix, but kept terminating the program after a minute because "it must be in a loop." This student left with an understanding of microseconds as real units of time that can accumulate into significant periods. 3. A subtle point that can add significantly to the complexity of this material is combining notation conversion with instruction encoding. If, for example, all the material in Chapters 1 and 2 is new to a student, the problem, "Using the language of Appendix C, write an instruction for loading register 14 with the value 124" can be much more difficult than the same problem stated as, "Using the language of Appendix C, write an instruction for loading register D with the (hexadecimal) value 7C." In general, notation conversion is a subject of minor importance and should not be allowed to cloud the more important concerns. 4. If you want your students to develop more than a simple appreciation of machine language programming, you may want to use one of the many simulators that have been developed for the machine in Appendix C. A nice example is included on the Addison - Wesley website at http:// www. aw.com/brookshear or y ou can find other simulators by searching the Web.
Page 12 Read page 12 as text
9 5. Here are some short program routines in the machine language presented in Appendix C of the text, followed by their C language equivalents. (These examples are easily converted into Java, C++, and C#.) Each machine language routine starts at address 10. I've found that they make good examples for class presentations or extra homework problems in which I give the students the machine language form and ask them to rewrite it in a high - level language . Address Contents Address Contents Address Contents 0D 00 14 20 1B 0F 0E 00 15 5A 1C 50 0F 00 16 30 1D 12 10 20 17 0F 1E 30 11 5C 18 11 1F 0D 12 30 19 0E 20 C0 13 0E 1A 12 21 00 C language equivalent: {int X,Y,Z; X = 92; Y = 90; Z = X + Y; } If the contents of the memory cell at address 1C in the preceding table is changed from 50 to 60 the C equivalent becomes: {float X, Y, Z; X = 1.5; Y = 1.25; Z = X + Y; } Here's another example: Address Contents Address Contents Address Contents 0E 00 19 0F 24 20 0F 00 1A 20 25 01 10 20 1B 04 26 50 11 02 1C B1 27 01 12 30 1D 2C 28 30 13 0E 1E 12 29 0F 14 20 1F 0E 2A B0 15 01 20 50 2B 18 16 30 21 12 2C C0 17 0F 22 30 2D 00 18 11 23 0E C equivalent: {int X, Y; X = 2; Y =1; while (Y != 4) {X = X + Y; Y = Y + 1;} }
Page 13 Read page 13 as text
10 6. Here are two C program segm e nts that can be conveniently translated into the machine language of Appendix C. {int X, Limit; X = 0; Limit = 5; do X = X + 1 while (X != Limit); } Program segment in machine language: Address Contents Address Contents Address Contents 0E 00 (X) 18 22 (R2 = 1) 22 10 (R0 = Limit) 0F 00 (Limit) 19 01 23 0F 10 20 (X = 0) 1A 11 (R1 = X) 24 B1 (go to end 11 00 1B 0E 25 28 if X == Limit) 12 30 1C 50 (X = X+1) 26 B0 (return) 13 0E 1D 12 27 1A 14 20(Limit = 5)1E 30 28 C0 (halt) 15 05 1F 0E 29 00 16 30 20 11 (R1 = X) 17 0F 21 0E {int X, Y, Difference; X = 33; Y = 34; if (X > Y)Difference = X - Y else Difference := Y – X} Program segment in machine language: Address Contents Address Contents Address Contents 0D 00 (X) 1D 01 2D 16 (Diff = X - Y) 0E 00 (Y) 1E 24 (R4=FF) 2E 30 0F 00 (Diff) 1F FF 2F 0F 10 20 (X = 33) 20 96 (R6=not Y) 30 B0 (branch to 11 21 21 24 31 3A halt) 12 30 22 56 (R6= - Y) 32 90 (R0=not X) 13 0D 23 36 33 14 14 20 (Y = 34) 24 50 (R0=X - Y) 34 50 (R0 = - X) 15 22 25 16 35 03 16 30 26 25 (R5=80Hex) 36 50 (R0 = Y - X) 17 0E 27 80 37 02 18 11 (R1=X) 28 80 (mask low) 38 30 (Diff = Y - X) 19 0D 29 50 7 bits) 39 0F 1A 12 (R2=Y) 2A B5 (if R0=R5 3A C0 (halt) 1B 0E 2B 32 then Y>X 3B 00 1C 23 (R3=1) 2C 50
Page 14 Read page 14 as text
11 Answers to Chapter Review Problems 1. a. General purpose registers and main memory cells are small data storage cells in a computer. b. General purpose registers are inside the CPU; main memory cells are outside the CPU. (The purpose of this question is to emphasize the distinction between registers and memory cells — a distinction that seems to elude some students, causing confusion when following machine language programs.) 2. a. 0010001100000100 b. 1011 c. 001010100101 3. Eleven cells with addresses 98, 99, 9A, 9B, 9C, 9D, 9E, 9F, A0, A1 , and A2 . 4. CD 5. Program Instruction Memory cell counter register at 02 02 2211 32 04 3202 32 06 C000 11 6. To compute x + y + z, each of the values must be retrieved from memory and placed in a register, the sum of x and y must be computed and saved in another register, z must be added to that sum, and the final answer must be stored in memory. A similar process is required to compute (2x) + y. The point of this example is that the multiplication by 2 is accomplished by adding x to x. 7. a. OR the contents of register 2 with the contents of register 3 and place the result in register 1. b. Move the contents of register E to register 1. c. Rotate the contents of register 3 four bits to the right. d. Compare the contents of registers 1 and 0. If the patterns are equal, jump to the instruction at address 00. Otherwise, continue with the next sequential instruction. e. Load register B with the value (hexadecimal) CD. 8. 16 with 4 bits, 64 with 6 bits 9. a. 2677 b. 1677 c. BA24 d. A403 e. 81E2 10. The only change that is needed is that the third instruction should be 6056 rather than 5056. 11. a. Changes the contents of memory cell 3C. b. Is independent of memory cell 3C . c. Retrieves from memory cell 3C. d. Changes the contents of memory cell 3C . e. Is independent of memory cell 3C . 12. a. Place the value 55 in register 6 . b. 55 13. a. 1221 b. 2134
Page 15 Read page 15 as text
12 14. a. Load register 2 with the contents of memory cell 02 . Store the contents of register 2 in memory cell 4 2 . Halt. b. 32 c. 06 15. a. 06 b. 0A 16. a. 00, 01, 02, 03, 04, 05 b. 06, 07 17. a. 04 b. 04 c. 0E 18. 04 . The program is a loop that is terminated when the value in register 0 (initiated at 00) is finally incremented by twos to the value in register 3 (initiated at 04 ). 19. 11 microseconds. 20. The point to this problem is that a bit pattern stored in memory is subject to interpretation — it may represent part of the operand of one instruction and the op - code field of another. a. Registers 0, 1, and 2 will contain 32, 24 , and 12, respectively. b. 12 c. 32 21. The machine will alternate between executing the jump instruction at address AF and the jump instruction at address B0. 22. It would never halt. The first 2 instructions alter the third instruction to read B000 before it is ever executed. Thus, by the time the machine reaches this instruction, it has been changed to read "Jump to address 00." Consequently, the machine will be trapped in a loop forever (or until it is turned off). 23. a. b. c. 14D8 14D8 2000 34B3 15B3 1144 C000 358D B10A 34BD 22FF C000 B00C 2201 3246 C000 24. a. The single instruction B000 stored in locations 00 and 01. b. Address Contents 00,01 2100 Initialize 02,03 2270 counters. 04,05 3109 Set origin 06,07 320B and destination. 08,09 1000 Now move 0A,0B 3000 one cell. 0C,0D 2001 Increment 0E,0F 5101 addresses. 10,11 5202 12,13 2333 Do it again 14,15 4010 if all cells 16,17 B31A have not
Page 16 Read page 16 as text
13 18,19 B004 been moved. 1A,1B 2070 Adjust values 1C,1D 3071 that are 1E,1F 2079 location 20,21 3075 dependent. 22,23 207B 24,25 3077 26,27 208A 28,29 3087 2A,2B 2074 2C,2D 3089 2E,2F 20C0 30,31 30A4 32,33 2000 34,35 20A5 36,37 B070 Make the big jump! c. Address Contents 00,01 2000 Initialize counter. 02,03 2100 Initialize origin. 04,05 2270 Initialize destination. 06,07 2430 Initialize references 08,09 1530 to table. 0A,0B 310D Get origin 0C,0D 1600 value. 0E,0F B522 Jump if value must be adjusted. 10,11 3213 Place value 12,13 3600 in new location. 14,15 2301 Increment 16,17 5003 R0, 18,19 5113 R1, and 1A,1B 5223 R2. 1C,1D 233C Are we done? 1E,1F B370 If so, jump to relocated program. 20,21 B00A Else, go back. 22,23 2370 Add 70 to 24,25 5663 value being 26,27 2301 transferred and 28,29 5443 update R4 and 2A,2B 342D R5 for next 2C,2D 1500 location. 2E,2F B010 Return (from subroutine). 30,31 0305 Table of 32,33 0709 locations that 34,35 0B0F must be 36,37 111F updated for 38,39 212B new location. 3A,3B 2FFF 25. 20A0 21A1 6001 21A2 6001 21A3 6001 30A4 C000
148 more pages in the full document
Unlock it once and it stays in your library, ready to chat with or turn into flashcards.
Unlock the full documentMore Information Technology study materials
See all
Exam GuidesTest Bank for Managing and Using Information Systems: A Strategic Approach, 7th Edition (Chapters 1-13)
Information Technology
452 pages149downloadsFeb 2025
Exam GuidesTest Bank for Essentials of MIS, 12th Edition
Information Technology
342 pages146downloadsFeb 2025
Exam GuidesA+ Guide to Hardware, 9th Edition Test Bank
Information Technology
116 pages142downloadsFeb 2025
Textbook GuidesSolution Manual for Essentials of System Analysis and Design, 4th Edition
Information Technology
282 pages140downloadsFeb 2025
Textbook GuidesGuide To Networking Essentials, 7th Edition Solution Manual
Information Technology
48 pages139downloadsFeb 2025
Past Exams2023-2024 SOPHOS FIREWALL V19.5 Practice Exam with Answers (75 Solved Questions)
Information Technology
7 pages134downloadsFeb 2025
Class NotesLecture Notes for CCNP Enterprise: Core Networking (ENCOR) v8 Lab Manual, 2nd Edition
Information Technology
1089 pages123downloadsFeb 2025
Class NotesLecture Notes for Adobe XD Classroom in a Book (2020 release)
Information Technology
66 pages118downloadsFeb 2025
Study this document with CramX
Once it is in your library, every tool can work from it.

