Instructions. An 8.5 x 11 Cheat Sheet may also be used as an aid for this test. MUST be original handwriting.

Similar documents
CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Solutions - Homework 1 (Due date: September 9:30 am) Presentation and clarity are very important!

Trigonometry Revision Sheet Q5 of Paper 2

Name Ima Sample ASU ID

Section 1.3 Triangles

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Fast Boolean Algebra

, g. Exercise 1. Generator polynomials of a convolutional code, given in binary form, are g. Solution 1.

MATH FIELD DAY Contestants Insructions Team Essay. 1. Your team has forty minutes to answer this set of questions.

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL:

Homework Solution - Set 5 Due: Friday 10/03/08

Special Numbers, Factors and Multiples

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Problem Set 9. Figure 1: Diagram. This picture is a rough sketch of the 4 parabolas that give us the area that we need to find. The equations are:

expression simply by forming an OR of the ANDs of all input variables for which the output is

Discrete Structures Lecture 11

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

5. Every rational number have either terminating or repeating (recurring) decimal representation.

NON-DETERMINISTIC FSA

Scientific notation is a way of expressing really big numbers or really small numbers.

Lecture 6: Coding theory

1.3 SCALARS AND VECTORS

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

Unit 4. Combinational Circuits

September 13 Homework Solutions

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

STRAND J: TRANSFORMATIONS, VECTORS and MATRICES

Individual Contest. English Version. Time limit: 90 minutes. Instructions:

Part I: Study the theorem statement.

First Midterm Examination

Formal languages, automata, and theory of computation

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

Engr354: Digital Logic Circuits

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

Instructions to students: Use your Text Book and attempt these questions.

AP CALCULUS Test #6: Unit #6 Basic Integration and Applications

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

ECE 327 Solution to Midterm 2016t1 (Winter)

Factorising FACTORISING.

Good Review book ( ) ( ) ( )

Activities. 4.1 Pythagoras' Theorem 4.2 Spirals 4.3 Clinometers 4.4 Radar 4.5 Posting Parcels 4.6 Interlocking Pipes 4.7 Sine Rule Notes and Solutions

Vectors. a Write down the vector AB as a column vector ( x y ). A (3, 2) x point C such that BC = 3. . Go to a OA = a

AP Calculus AB Unit 4 Assessment

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

1 This question is about mean bond enthalpies and their use in the calculation of enthalpy changes.

12.4 Similarity in Right Triangles

Figure 1. The left-handed and right-handed trefoils

2.4 Linear Inequalities and Interval Notation

GM1 Consolidation Worksheet

CS 330 Formal Methods and Models

= state, a = reading and q j

Homework 3 Solutions

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Chapter 8 Roots and Radicals

Designing Information Devices and Systems I Discussion 8B

Exam 2 Solutions ECE 221 Electric Circuits

p-adic Egyptian Fractions

Pythagoras Theorem. Pythagoras Theorem. Curriculum Ready ACMMG: 222, 245.

Space Curves. Recall the parametric equations of a curve in xy-plane and compare them with parametric equations of a curve in space.

Symmetrical Components 1

Harvard University Computer Science 121 Midterm October 23, 2012

Polynomials. Polynomials. Curriculum Ready ACMNA:

Lecture 6. Notes. Notes. Notes. Representations Z A B and A B R. BTE Electronics Fundamentals August Bern University of Applied Sciences

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

332:221 Principles of Electrical Engineering I Fall Hourly Exam 2 November 6, 2006

COMPUTER SCIENCE TRIPOS

Lecture 3. Introduction digital logic. Notes. Notes. Notes. Representations. February Bern University of Applied Sciences.

1 ELEMENTARY ALGEBRA and GEOMETRY READINESS DIAGNOSTIC TEST PRACTICE

Math 426: Probability Final Exam Practice

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

Read section 3.3, 3.4 Announcements:

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

Fall 2017 Exam 1 MARK BOX HAND IN PART PIN: 17

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Bridging the gap: GCSE AS Level

4 7x =250; 5 3x =500; Read section 3.3, 3.4 Announcements: Bell Ringer: Use your calculator to solve

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem.

Exercise 3 Logic Control

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

CS241 Week 6 Tutorial Solutions

8 THREE PHASE A.C. CIRCUITS

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

CSE396 Prelim I Answer Key Spring 2017

Overview of Today s Lecture:

Regular expressions, Finite Automata, transition graphs are all the same!!

CS 330 Formal Methods and Models

A BRIEF INTRODUCTION TO UNIFORM CONVERGENCE. In the study of Fourier series, several questions arise naturally, such as: c n e int

Markscheme May 2016 Mathematics Standard level Paper 1

Worked out examples Finite Automata

Minnesota State University, Mankato 44 th Annual High School Mathematics Contest April 12, 2017

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Transcription:

ID: B CSE 2021 Computer Orgniztion Midterm Test (Fll 2009) Instrutions This is losed ook, 80 minutes exm. The MIPS referene sheet my e used s n id for this test. An 8.5 x 11 Chet Sheet my lso e used s n id for this test. MUST e originl hndwriting. This is question/nswer ooklet: Write your nswers in the spe provided nd s indited in eh question. Use the kside for srth work. Do not hnd in nything other thn this ooklet. Fill in your personl dt in the ox elow efore the strt of the exm nd then wit until the instrutor hs distriuted the exms to ll students. Do not turn this pge over until the instrutor hs nnouned tht you my do so. Keep your York photo ID (or ny other eptle photo ID) on the desk in front of you so tht the instrutor my inspet it without disturing you. You my use ONLY those instrutions tht pper in the MIPS sheet. Whenever needed, ssume tht the mhine is little endin. No questions during the exm. Write your finl nswer with pen. LAST NAME: FIRST NAME: STUDENT NUMBER: PRISM LOGIN: Setion Points Mrk A 20 B 20 C 10 TOTAL 50 Pge 1 of 8

Nme: Setion A <5 questions x 4 points eh = 20 points> For questions in this setion, speify the ontent of the required register(s), in the required rdix fter the A B. speified ode is exeuted. Note the following lrifitions: We speify the hexdeiml nottion with the prefix of 0x suh tht representtion15 ten = F hex is equivlent to 0x0000000F or 0xF in short. Assume dt speified in MIPS instrution is stored s ontiguous lok. 1. ddi $t1, $0, 64 ddi $t2, $t1, -45 div $t1, $t2 mfhi $t3 mflo $t4 $t3 (in deiml) = $t4 (in deiml) = 2. ddi $t0, $0, 0x7 ddi $t1, $t0, 0x ddi $t2, $0, 40 mult $t1, $t2 mflo $t1 $t1 (in hex) = $t2 (in hex) = Pge 2 of 8

Nme: 3. l $t0, hr l $t2, 5($t0) ddi $t2, $t2, -43 dd $t0, $t0, $t2 l $t3, 0($t0).dt hr:.siiz 123d4e5 $t2 (in deiml) = $t3 (in deiml) = 4..dt n:.word 19, 59, -13 n:.word 15, 9, -2, -7.text min: ddi $t2, $0, 24 l $t3, n($t2) l $t2, n($0) $t2 (in deiml) = $t3 (in deiml) = 5. strt: ddi $0, $0, 15 ddi $t0, $0, 0 ddi $t1, $0, 3 gin: slt $t2, $0, $t1 ne $t2, $0, end dd $t0, $t0, $t1 ddi $t1, $t1, 3 j gin end: dd $v0, $t0, $0 $v0 (in deiml) = Pge 3 of 8

Nme: Setion B <2 questions x 10 points eh = 20 points> For eh question, write your nswer in the ox provided. 6. A inry-to-seven segment deoder is logi iruit tht onverts numer expressed in inry to n pproprite ode for the seletion of segments in disply inditor illustrted in fig. 1. f e g d Fig. 1: Segment designtion in seven segment deoder The inry-to-seven segment deoder hs three input its, sy x, y, nd z tht hold the 3-it inry representtion of the numer to e displyed. The seven outputs of the deoder (,,, d, e, f, nd g) selet the orresponding segments in the disply re shown in fig. 2 to highlight the numeri digits eing displyed. f g g f g e d e d d f g f g d e d Fig. 2: Numeril designtion for disply of numer (from 0 to 7) As n exmple, if inry numer 001 is to e displyed, the inry inputs to the deoder re x = y = 0 nd z = 1 with the outputs = = 1. The remining five outputs, d, e, f, nd g re ll 0. For the inry-to-seven segment deoder, shown in figs. 1 nd 2: ) Drw the truth tle with three inputs (x, y, nd z) nd ONLY the first three outputs (,, ). Pge 4 of 8

Nme: Inputs Outputs x y z 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 ) Bsed on the truth tle drwn in ), derive Boolen expressions for eh of the first three outputs (,, ). ) Provide simplified Boolen expressions for eh of the outputs in prt (). Pge 5 of 8

Nme: ) Using AND, OR, nd NOT gtes, drw digitl iruits tht implement the first 3 outputs (,, ) from the inputs (x, y, nd z).. Pge 6 of 8

Nme: 7. Fig. 1 shows the shemti digrm of NOR gte Fig.1: Shemti digrm of the NOR gte whih hs the following truth tle = NOR 0 0 1 0 1 0 1 0 0 1 1 0 A NOR gte is universl gte euse ny digitl omponent n e implemented using NOR gtes only. Implement () NOT gte, () n AND gte nd () n OR gte using only NOR gtes. You my use more thn one NOR gte ut no other type of gte my e used. ) NOT gte () n AND gte Pge 7 of 8

Nme: () n OR gte. Setion C <1 question x 10 points eh =10 points> Write your nswer in the ox provided. You hve to follow the MIPS stndrd onventions of using the registers, i.e. registers $0 - $4 re used for pssing rguments to proedure, registers $v0 - $v1 for returning results, et. 8. Write miniml sequene of MIPS instrutions tht swps the ontents of registers $s1 nd $s2 if the vlue in $s1 is greter thn or equl to the vlue stored in $s2. Otherwise, it leves the ontents of the registers unhnged. Pge 8 of 8

ID: B CSE 2021 Computer Orgniztion Midterm Test (Fll 2009) Answer Setion SHORT ANSWER 1. ANS: $t3 (in deiml) = 7 $t4 (in deiml) = 3 2. ANS: OBJ: Setion A $t1 (in hex) = 760 10 = 0x2F8 $t2 (in hex) = 40 10 = 0x28 3. ANS: OBJ: Setion A $t2 (in deiml) = 8 $t3 (in deiml) = 101 4. ANS: OBJ: Setion A $t2 (in deiml) = 19 $t3 (in deiml) = -7 OBJ: Setion A Pge 1 of 5

ID: B 5. ANS: $v0 (in deiml) = 45 OBJ: Setion A Pge 2 of 5

ID: B PROBLEM 6. ANS: () The truth tle for the inry-to-seven segment deoder is shown elow (ll 7 outputs re shown only,, required for this question): () Inputs Outputs x y z d e f g 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 The Boolen expressions (for ll 7, only,, required) re given elow = x y yz + x z + xy + xyz, = x z y yz + x + xyz, = x z yz + x + x z + xy + xyz, d = x y yz + x z + xy, e = x y + xy, f = x + x + x z + xy, nd g = x y yz + x + x z + xy. () The expressions for,, n e simplified firly onsiderly: = x + (x y + x )z + xy = x' z' + (x + y)(xy)' z + xy = x' z' + xz + yz + xy = (x + z)' + xz + y(x + z) = y + x' z' + xz = x + yz + (x z + x )y' = x' z' + yz + (x + z)(xz)' y' = (x + z)' + yz + (x + z)(xz)' y' = x' z' + yz + x' y' + z' y' = x'(z' + y') + yz + y' z' = x'(yz)' + yz + y' z' = x' + yz + y' z' = x + yz + x + xy = y' + y( z + xz') = y' + y( z + x) = x + y' + z (d)the digitl iruits n e drwn from the ove Boolen expressions. Pge 3 of 5

ID: B OBJ: Setion B.2 Pge 4 of 5

ID: B 7. ANS: () NOT gte () AND gte () OR gte 8. ANS: slt $t0, $s1, $s2 ddi $t1, $0, 1 eq $t0, $t1, exit ddi $t2, $s1, 0 ddi $s1, $s2, 0 ddi $s2, $t2, 0 exit: OBJ: Setion C Pge 5 of 5