5 Pages

EE306 HW3_Solution

Course: EE 306, Fall 2007
School: University of Texas
Rating:
 
 
 
 
 

Word Count: 917

Document Preview

WORK HOME # 3 Due Date: October 29, 2007 Q1) (4.11) State the phases of the instruction cycle and briefly describe what operations occur in each phase. (a) Fetch: Get instruction from memory. Load address of next instruction in the Program Counter. (b) Decode: Find out what the instruction does. (c) Evaluate Address: Calculate address of the memory location that is needed to process the instruction (d) Fetch...

Register Now

Unformatted Document Excerpt

Coursehero >> Texas >> University of Texas >> EE 306

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
WORK HOME # 3 Due Date: October 29, 2007 Q1) (4.11) State the phases of the instruction cycle and briefly describe what operations occur in each phase. (a) Fetch: Get instruction from memory. Load address of next instruction in the Program Counter. (b) Decode: Find out what the instruction does. (c) Evaluate Address: Calculate address of the memory location that is needed to process the instruction (d) Fetch Operands: Get the source operands (either from memory or register file). (e) Execute: Perform the execution of the instruction. (f) Store Result: Store the result of the execution to the specified destination. Q2) (4.8) Suppose a 32-bit instruction has the following format: OPCODE DR SR1 SR2 UNUSED If there are 255 opcodes and 120 registers, and every register is available as a source or destination for every opcode, 1. What is the minimum number of bits required to represent the OPCODE? 27 < 255 < 28 So, 8 bits 2. What is the minimum number of bits required to represent the Destination Register (DR)? 26 < 120 < 27 So, 7 bits 3. What is the maximum number of UNUSED bits in the instruction encoding? 32 (8 + 7 + 7 + 7) = 3 bits Q3) If a computer has a 16-bit MAR and a 32-bit MDR: 1. How many memory locations are available in the memory of this computer? 2^16 = 65,536 locations 2. How many bits are stored at each of those locations? 32 bits 3. What is the total size of the memory (in Bytes)? 32 * 65,536 = 2,097,152 bits, so 2,097,152/8 = 262144 Bytes Q4) (Prob 5.5) 1. What is an addressing mode? Addressing mode: mechanism for specifying where an operand is located. 2. Name three places an instruction's operands might be located. An instruction's operands are located as an immediate value, in a register, or in memory. 3. List the five addressing modes of the LC-3, and for each one state where the operand is located (from part b). The 5 are: immediate, register, direct memory address, indirect memory address, base + offset address. An immediate operand is located in the instruction. A register operand is located in a register (R0 R7). A direct memory address, indirect memory address and base + offset address all refer to operands located in memory. 4. What addressing mode is used by the ADD instruction shown in Section 5.1.2? Add R2, R0, R1 => register addressing mode. Q5) (Prob 5.9) We would like to have an instruction that does nothing. Many ISAs actually have an opcode devoted to doing nothing. It is usually called NOP, for NO OPERATION. The instruction is fetched, decoded and executed. The execution phase is to do nothing! Which of the following three instructions could be used for NOP and have the program still work correctly? 1. 0001 001 001 1 00000 Add R1, R1, #0 => differs from a NOP in that it sets the Condition Codes. 2. 0000 111 000000001 BRnzp #1 => Unconditionally branches to one after the next address in the PC. There fore no, this instruction is not the same as NOP. 3. 0000 000 000000000 Branch that is never taken. Yes same as NOP What does the ADD instruction do that the others do not do? It sets the Condition Codes. Q6) (Adapted 5.13) 1. How might one use a single LC-3 instruction to move the value in R2 into R3? 0001 010 011 1 00000 (ADD R3, R2, #0 ) 2. Using only one LC-3 instruction and without changing the contents of any register, how might one set the condition codes based on the value that resides in R1? 0001 001 001 1 00000 (ADD R1, R1, #0 ) or 0101 001 001 1 11111 (AND R1, R1, #1) 3. Write an LC-3 instruction that clears the contents of R2. 0101 010 010 1 00000 (AND R2, R2, #0) Q7) Classify the LC-3 instructions into operate, data movement or control instructions. Operate ADD, AND, NOT Data Movement LD, LDI, LDR, ST, STI, STR, LEA. Control BR, JMP, JSR, JSRR, RET, RTI, TRAP. Q8) (5.30) The following table shows a part of the LC-3s memory: Address 0011 0001 0000 0000 0011 0001 0000 0001 0011 0001 0000 0010 0011 0001 0000 0011 Data 1001 001 001 111111 0001 010 000 000 001 1001 010 010 111111 0000 010 111111100 State what is known about R1 and R0 if the conditional branch redirects control to location x3100. R1=R0 The assembly code for the given machine code is: NOT R1, R1; Inst 1 ADD R2, R0, R1; Inst 2 NOT R2, R2; Inst 3 BRz x3100; Inst 4 Since the branch is taken, Inst 3 (NOT R2, R2) should have set the condition code to 0. This implies Inst 3 stores a 0 in R2. Hence, R2 originally should have contained xFFFF. Going back to Inst 2, R0 + NOT(R1)=xFFFF. Hence R0=R1. Q9) The following LC-3 Machine Language program is supposed to multiply the contents of R1 with R2 and store the result in R3. The program assumes that both R1 and R2 contain positive integers. However, there is an error in the program. x3000: 0101 0110 1110 0000 0001 0110 1100 0010 0001 0010 0111 1111 0000 0111 1111 1101 1111 0000 0010 0101 1. What is the error? The error is in the 4th instruction. It branches back if the result from the previous instruction was positive or zero, resulting in the loop being executed one extra time than is needed. 2. Modify the present program to make it work correctly Everything should remain the same except the 4th line which should be 0000 0011 1111 1101. Now, it branches back only if the result was positive. Q10) (5.28) It is the case that we REALLY don't need to have load indirect (1010) and store indirect (1011) instructions. We can accomplish the same results using other instruction sequences instead of using these instructions. Replace the store indirect (1011) instruction in the code below with whatever instructions are necessary to perform the same function. X3000 X3001 X3002 X3003 X3004 0010 0000 0000 0010 1011 0000 0000 0010 1111 0000 0010 0101 0000 0000 0100 1000 1111 0011 1111 1111 The above instructions are: X3000 : LD R0, x3003 X3001 : STI R0, x3004 X3002 : TRAP x25 X3003 : x0048 X3004 : xF3FF Here, we first load R0 with x0048, and then use STI instruction to store the contents of R0 (x0048) in memory location xF3FF. Alternatively, this can be done using the following instructions: X3000 : LD R0, x3004 (0010 0000 0000 0011) X3001 : LD R1, x3005 (0010 0010 0000 0011) X3002 : STR R0, R1, #0 (0111 0000 0100 0000) X3003 : TRAP x25 (1111 0000 0010 0101) X3004 : x0048 (0000 0000 0100 1000) X3005 : xF3FF (1111 0011 1111 1111)
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

University of Texas - EE - 302
Thvenin Equivalent Circuit Summary EE 302 Dr. McCann Basic Concept:Any linear DC circuit can be replaced by an equivalent circuit consisting of a voltage source in series with a resistor. This Thvenin Equivalent Circuit can then be used to determin
SMU - PLSC - 3360
Joseph McNamara 2/25/08 Plsc 3360 Professor CarterThe kalliopolis?&quot;For man, when perfected, is the best of animals, but, when separated from law and justice, he is the worst of all; since armed injustice is more dangerous&quot; (Aristotle, 5). Aristotl
University of Texas - EE - 302
Node Voltage and Mesh Current ExerciseFor each of the branches shown below, write the expression for the current leaving Node A toward Node B (Iab) in terms of the node voltages VA and VB and the expression for the voltage drop from Node A to Node B
University of Texas - M - 427K
University of Texas - M - 427K
University of Texas - M - 427K
University of Texas - M - 427K
University of Texas - EE - 306
EE306 Revision List Fall 2007 Chapter 1: What is a computer? Turing Machine concept. Chapter 2: Use of binary in the computer and why. Data Types Unsigned/signed integers 2's complement Binary/Decimal/Binary conversion Different number bases Binar
University of Texas - M - 427K
University of Texas - M - 427K
University of Texas - M - 427K
University of Texas - EE - 302
Intellectual Property Law Summary for EE302By Dr. Bruce McCannPatents:Coverage: Inventions (novel, non-obvious, useful and of patentable subject matter). Protection: Right to exclude others from making, using, or selling what has been claimed as
University of Texas - M - 427K
ReviewChapters 1 to 5.7Chapter 1 - Introduction 1. Differential Equation: derivative and an equal sign. 2. Dependent Variable: varies as a function of another variable. 3. Independent Variable: does not vary with any other variables. 4. Ordinary Di
Virginia Tech - BIOL - 1005
Chapter Two 1. Atoms are the fundamental structural units of matter that are composed of a central atomic nucleus which contains two subatomic particals (protons and Neutrons) and Electrons orbit the nucleus because they are lighter and negatively ch
UVA - BIOL - 317
NEUROBIOLOGYCh. 19MECHANISMS OF ESCAPE BEHAVIOR Night-flying moths, or noctuids, have a tympanic membrane that stretches over an enclosed ear sac which is located in the insect's abdomen. In the tympanic membrane, there are two sensory (acoustic)
UVA - BIOL - 317
NEUROBIOLOGYCh. 20ANALYSIS OF SIMPLE BEHAVIOR Servomechanism- a man-made device that uses feedback to regulate output. Figure 20-1 shows the parts of a servomechanism: Effector- produces a desired action Sensor- measures action result Comparator-
CSU Mont. Bay - WRT - 95
Final DraftSurfing and SlangIn the surfing world, there are many different suits that are available and each manufacturer is pushing their suits to seem like the latest and greatest. In the article Rubber Soul, Mike Fish uses doublespeak to portra
Mount St. Mary's College, California - BUS - 5
Briefing Robins vs. Pruneyard Shopping Center Facts A group of demonstrators entered a privately owned shopping center to petition, but was told to leave the premise with possibility of arrest for trespassing. 1946, U.S. Supreme Court held that priva
Texas State - BIO - 1420
REVIEW STEMS FOR CH 27 BIODIVERSITY IN PERSPECTIVE 1.Which of the following is a factor that lead to the collapse of human society on Easter Island? Overpopulation Over development(Agriculturalization of the land) Stripping the the land of all trees
Texas State - HISTORY - 3465
By 1698 both parties (whigs and Tories) are disintegrated. Henry is the &quot;Stock Holder&quot; of the East Indies and at the point of 1689 the East Indies was the key to the French Expanse. At this point, French Expanse was increasing exponentially. William
Texas State - HISTORY - 3465
Kelly Keefer English 3301 March 26, 2008 A Streetcar Named Desire &quot;The Kowalskis and the DuBois have different notions&quot; (Williams 37). Stanley Kowalski is a lower class, blue-collar worker who is married to Blanche DuBois's sister, Stella. Blanche an
Texas State - HISTORY - 3465
1. Irrelevant Authority-of or pertaining to the idea that a certain person/s gives knowledge outside of his/her particular field of expertise, therefore making the statement irrelevant. (I.E. &quot;The world is dying, we need to take drastic steps towards
Minnesota - POL - 1001
POL 1001 Midterm Study Guide The midterm will be October 30, 2007 in class and worth 20% of your grade. It will consist of 50 multiple-choice questions that cover all of the reading assigned in class, as well as material covered in lectures and films
Texas State - HISTORY - 3465
1Jan Wong Red China Blues: My Long March From Mao to Now; New York: Anchor Books, 1996. Pp. xxv, 395. Price: $15.95Book Review on Red China BluesJan Wong's book Red China Blues is a description of her youthful passion for leftwing politics and
Vanderbilt - MSE - 150
EXAM I MATERIALS SCIENCE I - MSE 150 SPRING 2008HONOR CODEI PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TA
Vanderbilt - MSE - 150
EXAM II INTRODUCTION TO MATERIALS SCIENCE - MSE 150 SPRING 2008HONOR CODEI PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION.SIGNATURE _PRINT NAME _CAST YOUR VOTE TO DECIDE WHETHER THERE WILL BE A BONUS QUIZ ON W
Vanderbilt - MSE - 150
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIAL SCIENCE MSE-150 QUIZ 1 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TAK
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemChapter 7, Solution 2. The three stages consist of: 1. The specimen elongates, forming a necked region in which cavities form. 2. The cavities coalesce in the neck center, forming a crack
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemChapter 11, Solution 5. The two main factors which affect the packing of ions in ionic solids are: 1. The relative size of the ions in the ionic solid, assuming the ions are hard spheres w
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemChapter 14, Solution 6. The resistance is calculated with the length expressed as 85 cm,Rl 85 cm -3 10.0 106 cm 2 2.09 10 A 0.720 cm / 4 Chapter 14, Solution 11. As t
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemChapter 10, Solution 220. During elastic deformation, the covalent bonds of the molecular chains stretch. Subsequently, the chains uncoil in a process that involves both elastic and plasti
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemMSE 150 Section 1 Homework 9 SolutionsChapter 5, Solution 4. a) The equilibrium number of vacancies is calculated as nv = NCe- Ev / kT . Thus for silver, N= N o Cu (6.02 1023 atoms/at
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIAL SCIENCE MSE-150 QUIZ 2 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TAK
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIALS SCIENCE MSE-150 QUIZ 8 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATIONSIGNATURE _ (1 pt each) Multiple Choice 1- An interstitial solid solution of carbon in BCC iron. a) austeni
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIAL SCIENCE MSE-150 QUIZ 3 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TAK
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIALS SCIENCE MSE-150 QUIZ 7 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. SIGNATURE _ (2 points each) Label the graph of free energy versus radius of a spherical nucleus for solidif
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIAL SCIENCE MSE-150 QUIZ 5 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TAK
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIAL SCIENCE MSE-150 QUIZ 4 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TAK
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemChapter 14, Solution 68. First determine 0 , the intrinsic electrical conductivity, for InSb at 27C (300 K): = 0 = ni q( n + p )= (1.35 1022 m -3 )(1.60 10-19 C) 8.0 m 2 / ( V s )
Vanderbilt - MSE - 150
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemMSE 150 SPRING 2008 SECTION 1 HOMEWORK 11 SOLUTIONSChapter 14, Solution 59. In an n-type NMOS or MOSFET, two islands of n-type silicon, formed within a p-type silicon substrate, serve
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemChapter 3, Solution 39.[111] , [1 1 1] , [111] , [111] ,[111] , [11 1] , [111] , [1 11]Chapter 3, Solution 41.[111] , [111] , [11 1] , [111][111] [111] [11 1]Chapter 3, Solution 4
Vanderbilt - MSE - 150
COSMOS: Complete Online Solutions Manual Organization SystemMSE 150 Section 1 Spring 2008 Homework 10 Solutions Chapter 8, Solution 15. (a) At 1000C: Phases present: Compositions of phases: (b) At 800C, Phases present: Compositions of phases: Am
Vanderbilt - MSE - 150
PRINT NAME _ INTRODUCTION TO MATERIAL SCIENCE MSE-150 QUIZ 6 I PLEDGE MY HONOR THAT I HAVE NEITHER GIVEN OR RECEIVED AID ON THIS EXAMINATION. I FURTHER PLEDGE THAT, IF I HAVE REASON TO SUSPECT THAT THE CODE HAS BEEN VIOLATED, I HAVE TAKEN OR WILL TAK
Virginia Tech - CHEM - 2114
Chapter 8: Introducing Acids and BasesDefinitions in aqueous chemistryAcid: a substance that increases the concentration of [H+] Base: a substance that increases the concentration of [OH-]Brnsted and LowryAcid: a [H+] donor Base: a [H+] acceptor
Virginia Tech - CHEM - 2114
Chapter 9: BuffersConsider two different cases Case 1:1.0 x 10-4 mol HClNeutral water pH = 7H 2O1L[H+] = 1.0 x 10-4 mol/1L = 1.0 x 10-4 MpH = -log[H+] = 4.00 pH change = 3.00Case 2:1.0 x 10-4 mol HCl CH3COOH 0.10 -x 0.10 M CH3COOH CH3C
Mass Colleges - MGT - 301
MGT 301- TEXT STUDY GUIDE MANAGERIAL BEHAVIOR MODULE Text- Principles of Management MGT 301 3rd Ed. (Red cover) Pages 103-246 Chapter 1 The Exceptional Manager Pages 103- 112 Know the six challenges to being a star manager p. 109-112 skim rest Chapt
Mass Colleges - MGT - 301
6 Challenges to being a Manager:Managing for competitive advantage, Globalization, diversity, Information Technology, Ethical Standards, Your own Happiness and Life Goals.Classical Viewpoint:Emphasized finding ways to manage work more efficient
University of Maine - HISTORY - 202
Philosophy- IntroductionPlato1/15/2008 5:39:00 PMSocrates- First Important Philosopher- lived in Athens Pre-Socrates- 6 Greeks Socrates Did not write, talked instead Plato- wrote what Socrates said Dialogues with Principle Character o Fall into
Grand Valley State - BIO - 109
BIO 109 Plants in the World Instructor Hollister Lectures 27 Plant Ecology Study Questions 1. What is ecology? a. Ecology is the branch of biology which deals with the relation of living things with their environmenet and to each other 2. What level
Grand Valley State - BIO - 109
BIO 109 Plants in the World Instructor Hollister Lectures 28 Agriculture Study Questions 1. How fast has the world population been growing in recent years? a. Very fast2. Is it possible for the world population to continue to grow at the rate that
Grand Valley State - BIO - 109
BIO 109 Plants in the World Instructor Hollister Lectures 11 Starchy Staples &amp; Wood Study Questions 1. What is the importance of the potato? How is it that a potato producer can claim that growing potatoes provides the world with more protein than w
Grand Valley State - BIO - 109
OBIO 109 Plants in the World Instructor Hollister Lectures 12 Genetics Study Questions 1. What was the blending hypothesis of inheritance?2. What were the discrete factors Mendel described?3. Would Mendel have likely come to the same conclusions
Grand Valley State - BIO - 109
BIO 109 Plants in the World Instructor Hollister Lectures 09 Legumes Study Questions 1. Why do beans give you gas? a. Beans have an enzyme in them that cannot be digested by your digestive tract, but can be digested by your colon. The gas you are &quot;p
Texas State - HIST - 1320
ESSAY 2 Discuss the factors that contributed to the rapid industrialization of America during the late 19th and early 20th centuries I. II. Intro Raw Materials and Technology a. Iron ore make steel : Bessemer Process b. Coal necessary to run the fac
UC Riverside - CBNS - 106
NAME: STUDENT ID NUMBER LAB TIME TA NAMECHEMISTRY 112A First Midterm February 6, 2006I. - (10) II.- (8) III.- (10) IV- (6) V. - (10) VI. -- (8) VII- (10) VIII- (10) IX- (10) X- (8) XI- (10) Bonus - (5)Total -(100)I)a) Name the compound below
Texas State - COMM - 1320
DIANA, PRINCESS OF WALES: THE PEOPLE'S PRINCESS Topic: Presentation about a Person Organization: Topical Specific Purpose: I would like my audience to understand three major factors that contributed to Princess Diana's life. Intro I. Attention Getter
Texas State - PSY - 1310
PSYCHOLOGY TEST 3 REVIEW I. Sexuality and Gender a. Gender Stereotyping judgments about individual members of a group on the basis of their membership in that group i. Sexual harassment ii. sexism negative attitudes and behavior toward a person bas
Texas State - HIST - 1320
1) Whig Party- An American political party formed in the 1830s to oppose President Andrew Jackson and the Democrats. Whigs stood for protective tariffs, national banking, and federal aid for internal improvements. Senators Henry Clay and Daniel Webst
Texas State - PSY - 1310
TEST 2 REVIEW 1. Stages of Sleep and Brain Waves in Sleep a. Stage 1 transition between wakefulness and sleep, has relatively rapid low voltage brain waves b. Stage 2 slower more regular wave pattern, has momentary interruptions called sleep spindl