CMPUT 101 with Solutions Quiz 2 (50 minutes) November 7, 2003

Similar documents
CMPUT 101 with Solutions Quiz 2 (50 minutes) August 7, 2002

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000

Computer Architecture (part 2)

The Von Neumann Architecture Odds and Ends. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

CMPUT101 Introduction to Computing - Summer 2002

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture

CMPUT101 Introduction to Computing - Summer 2002

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

Chapter 5: Computer Systems Organization

CS1004: Intro to CS in Java, Spring 2005

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

A B C ((NOT A) AND B) OR C

Von Neumann Architecture

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

SECONDARY SCHOOL, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2016/2017

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Memory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Introduction to Computer Science. Homework 1

Intro. to Computer Architecture Homework 4 CSE 240 Autumn 2005 DUE: Mon. 10 October 2005

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

5 Computer Organization

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates. Invitation to Computer Science, C++ Version, Third Edition

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

Computer Architecture

Midterm Exam 2B Answer key

CS 140 Introduction to Computing & Computer Technology. Computing Components

Computer Organization

Machine Architecture. or what s in the box? Lectures 2 & 3. Prof Leslie Smith. ITNP23 - Autumn 2014 Lectures 2&3, Slide 1

Solution printed. Do not start the test until instructed to do so! CS 2504 Intro Computer Organization Test 2 Spring 2006.

IB Computer Science Topic.2-

Basic Computer Architecture

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Information Science 1

Year 10 OCR GCSE Computer Science (9-1)

Diskrečioji matematika

CE161-4-AU UNIVERSITY OF ESSEX. Undergraduate Examinations 2014 DIGITAL SYSTEMS ARCHITECTURE. Time allowed: TWO hours

Midterm spring. CSC228H University of Toronto

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

CS433 Homework 6. Problem 1 [15 points] Assigned on 11/28/2017 Due in class on 12/12/2017

Register Transfer and Micro-operations

AS/A Level Computing Syllabus 2011

1. True or False? For tasks like Web surfing, sufficient memory can make up for a slow processor.

What Are The Main Differences Between Program Counter Pc And Instruction Register Ir

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Concept of Memory. The memory of computer is broadly categories into two categories:

Question 1: What criteria define Von Neumann architecture? Identify clearly and coherently. Solution

Basic Von Neumann Designs

CC411: Introduction To Microprocessors

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

GIRLS SECONDARY, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2015/2016

Chapter 2 Data Manipulation

Computer Architecture 2/26/01 Lecture #

Overview of Storage & Indexing (i)

Software and Hardware

Question Total Possible Test Score Total 100

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

UNIT 1 USING LOGIC. UPGRADE 8 Write a detailed report on how logic gates would be used to add up two nibbles using examples and explanations

1. Which of the following Boolean operations produces the output 1 for the fewest number of input patterns?

CS433 Homework 6. Problem 1 [15 points] Assigned on 11/28/2017 Due in class on 12/12/2017

Chapter One. Introduction to Computer System

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

EE 3170 Microcontroller Applications

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

Reference Sheet for C112 Hardware

9608 COMPUTER SCIENCE

CS 101, Mock Computer Architecture

Computer System. Hiroaki Kobayashi 7/25/2011. Agenda. Von Neumann Model Stored-program instructions and data are stored on memory

IS1200/IS1500. Lab 5 Processor Design v1.0

Systems Architecture

Midterm Examination - Answers October 25, 2012 In Class Instructor: Joseph Vybihal

Topic #6. Processor Design

Computer Organization and Levels of Abstraction

FACTFILE: GCE DIGITAL TECHNOLOGY

Disks and Files. Storage Structures Introduction Chapter 8 (3 rd edition) Why Not Store Everything in Main Memory?

Knowledge Organiser. Computing. Year 10 Term 1 Hardware

Quiz on Ch.4 is at the end of Ch.4 slides

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

UNIT 2 Data Center Environment

The LC3's micro-coded controller ("useq") is nothing more than a finite-state machine (FSM). It has these inputs:

CS101 Lecture 25: The Machinery of Computation: Computer Architecture. John Magee 29 July 2013 Some material copyright Jones and Bartlett

CS 261 Fall Mike Lam, Professor. CPU architecture

Review 1-- Storing Data: Disks and Files

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON. Instructor: Rahul Nayar TAs: Annie Lin, Mohit Verma

Problem Set 1 Solutions

Department of Electrical and Computer Engineering The University of Texas at Austin

Advanced Computer Architecture

Transcription:

CMUT 101 with Solutions Quiz 2 (50 minutes) November 7, 2003 Last Name: First Name: Section: Instructor: A1 I. E. Leonard Instructions: Read carefully before proceeding. No calculators, books or other aids are permitted for this test. 1. rint your name in the space provided above. 2. Turn to the next page.

Instructions (continued): Read carefully before proceeding. 3. rint your name and student ID in the space provided below (yes, your name again!). 4. Read the instructions below, and then wait until you are told to start working on the test (don t turn the pages yet). 5. Once you are told to start, write your ID number on top of all remaining pages in the test, only then start answering the questions. ut all your answers on the test paper, no additional sheets of papers can be handed it. You can use the back of the pages for your scratch notes and calculations. Do not remove staples! 6. When you are told that the time is up, stop working on the test. Good luck! Last Name: First Name: Student ID: Marks: (don t write anything below) 1 2 3 4 Total 10 15 10 15 50

CMUT101 Section A1 Quiz 2 age 3 of 7 ID#: art I (Multiple choice) There can be more than one correct choice for each question, circle ALL that apply. 1. (2 marks) Which of the following are considered main subsystems in the Von Neumann architecture? (a) Windows X (b) ALU (c) cache (d) Input/Output units (e) system software (f) memory 2. (2 marks) rior to being decoded, a machine language instruction must be stored in the: (a) C (b) IR (c) MAR (d) ALU (e) MDR (f) cache 3. (2 marks) The following properties are true for random access memory (RAM): (a) each memory cell has a unique address (b) the time it takes to fetch or store a memory cell is the same for all cells (c) a memory cell is the smallest unit of memory that can be fetched or stored (d) a part of a memory cell can be fetched or stored (e) the first bit in a memory cell always represents the sign of the number stored (f) information can only be fetched, not stored 4. (2 marks) The task of the control unit is to (a) fetch from memory the next instruction to be executed (b) store volatile data (c) perform mathematical and logical operations (d) control where information is stored on the hard-drive (e) decode and execute machine language instructions 5. (2 marks) A decoder with N input lines has how many output lines? (a) N (b) 1 (c) 2 N (d) 2 N 1 (e) N 2 (f) N 2 1

CMUT101 Section A1 Quiz 2 age 4 of 7 ID#: art II: Circuits 1. (4 Marks) The following circuit is given: a b c + x = (a b) + (b c) y = b c (a) The Boolean expression that describes the output value of y is shown above. Similarly, write above the expression that describes the output value of x. (b) For the two rows shown in the truth-table below, fill in the correct output values for x and y. Input Output a b c x y 0 1 0 1 1 1 0 1 1 1 2. (7 Marks) Use the sum-of-products circuit construction algorithm to design a circuit using AND, OR, and NOT gates that implements the following truth table. Input Output a b x y 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 0 (a) Write the expressions that describe the outputs: _ x = (a b) + (a b) y = (a b) + (a b) (b) Draw the circuit diagram.

CMUT101 Section A1 Quiz 2 age 5 of 7 ID#: 3. (4 marks) Design a circuit that has 2 inputs and 3 outputs. The input lines represent a two-digit binary number in the range 0-3. Each output is connected to a separate light bulb that illuminates when the output signal is on (1). The input value dictates how many of the lights will be lit. For example, when the input is 2 (x 1 x 0 = 1 0) then two of the light bulbs should be lit (which two doesn t really matter, you can choose). Fill in the input-output table below (there is no need to show the Boolean expressions or draw the circuit diagram). art III: Von Neumann Architecture 1. (2 marks) Fill in the blanks. Input Output x 1 x 0 B 1 B 2 B 3 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 Disc access time consists of several components. The Latency is the time for the beginning of the desired sector to rotate under the read/write head, whereas the Seek Time is the time needed to position the read/write head over the correct track. 2. (4 marks) Assume a disk with the following characteristics: Number of sectors per track 10 Number of tracks per surface 60 Number of surfaces 1 Number of bytes per sector 150 Arm movement time 1 msec to move 1 track Number of tracks read/write head moves of average 15 Rotation speed 60 rev/min (a) How many bytes can be stored on this disk (show your work)? 150 10 60 1 = 90,000 bytes (b) What are the worst- and average-case transfer times for this disk (show your work)? 60 rev/min = 1 rev/sec: Each revolution takes 1 second 10 sectors/track: 1/10 sec to read/write a single sector Worst/best/average transfer time the same: 0.1 sec (100 msec) 3. (2 marks) The following actions show what happens when a particular machine instruction is being executed: IR addr MAR FETCH MDR ALU R ALU SUBTRACT Which machine instruction is being executed: COMARE

CMUT101 Section A1 Quiz 2 age 6 of 7 ID#: 4. (2 marks) The following figure shows one possible implementation of the ALU circuit. All the arithmetic/logic operations are done in parallel but then the result of only one of the operations is selected to be the output. a b a = b a + b a - b 0 1 2 3 Output a b 1 0 Selector lines (a) What kind of a control circuit is used to select the output? Multiplexor (b) In the blanks below the selector lines, write down the signals (0 or 1) that make the result of the addition circuit become the output. art IV: Assembly language Note: A table describing the syntax and semantics of the assembly language instructions is provided in the appendix (at the bottom of the last page). 1. (3 marks) Assuming that memory locations X and Y contain the values 8 and 5 respectively, what values will they and the register R contain after the following assembly program fragment is executed? ADD STORE DECREMENT X Y Y X Answer: X = _7_ Y = _13_ R = _13_ 2. (4 marks) What does the following assembly program output when executed?.begin A ADD Four STORE A COMARE B JUMGT Over INCREMENT B Over: INCREMENT B OUT A OUT B HALT Four:.DATA 4 A:.DATA 2 B:.DATA 6.END Answer: 6 8

CMUT101 Section A1 Quiz 2 age 7 of 7 ID#: 3. (8 marks) Write an assembly program that implements the algorithm below. Get a positive integer value for M Get a positive integer value for N Set to M Set Q to 0 While N do Subtract N from Increase Q by 1 End loop rint Q rint Stop There is no need to test for positivity of A and B.BEGIN IN IN STORE CLEAR M N M loop: N COMARE JUMLT SUBTRACT STORE INCREMENT JUM endloop: OUT Q OUT HALT M:.DATA 0 N:.DATA 0 Q:.DATA 0 :.DATA 0.END Q endloop N Q loop Appendix: Assembly Language Instructions INSTRUCTION MEANING X CON(X) R STORE X R CON(X) CLEAR X 0 CON(X) ADD X R + CON(X) R INCREMENT X CON(X) + 1 CON(X) SUBTRACT X R CON(X) R DECREMENT X CON(X) 1 CON(X) COMARE X If CON(X) > R then GT = 1 (EQ=0, LT=0) If CON(X) = R then EQ = 1 (GT=0, LT=0) If CON(X) < R then LT = 1 (GT=0, EQ=0) JUM X Transfer to memory location X JUMGT X Transfer to location X if GT = 1 JUMEQ X Transfer to location X if EQ = 1 JUMLT X Transfer to location X if LT = 1 JUMNEQ X Transfer to location X if EQ = 0 IN X Input an integer value from the standard input device and store it in memory cell X. OUT X Output, in decimal notation, the value stored in memory cell X. HALT Stop program execution.