Midterm Examination # 2 Wednesday, March 18, Duration of examination: 75 minutes

Similar documents
COMPUTER ARCHITECTURE AND DIGITAL DESIGN

Basic Computer Organization and Design Part 2/3

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

Computer Organization (Autonomous)

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

Computer Architecture and Organization: L06: Instruction Cycle

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

COMPUTER ORGANIZATION

BASIC COMPUTER ORGANIZATION AND DESIGN

UNIT:2 BASIC COMPUTER ORGANIZATION AND DESIGN

BASIC COMPUTER ORGANIZATION AND DESIGN

csitnepal Unit 3 Basic Computer Organization and Design

BASIC COMPUTER ORGANIZATION AND DESIGN

Basic Computer Organization - Designing your first computer. Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon s slides.

5-1 Instruction Codes

Computer Organization and Design

Computer architecture Assignment 3

Unit II Basic Computer Organization

Programming Level A.R. Hurson Department of Computer Science Missouri University of Science & Technology Rolla, Missouri

Introduction. Machine Language. Assembly Language. Assembler. Program Loops. Programming Arithmetic and Logic Operations.

Blog -

Register Transfer and Micro-operations

Computer Organization and Architecture

Computer Architecture

جامعة بنها - كمية العموم قسم الرياضيات المستوي الرابع )علوم حاسب( يوم االمتحان: االحد تاريخ االمتحان: 1024 / 21 / 12 المادة :

CHAPTER SEVEN PROGRAMMING THE BASIC COMPUTER

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Register Transfer Language and Microoperations (Part 2)

REGISTER TRANSFER LANGUAGE

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

CHAPTER 4: Register Transfer Language and Microoperations

REGISTER TRANSFER AND MICROOPERATIONS

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

Computer Architecture

REGISTER TRANSFER AND MICROOPERATIONS

Darshan Institute of Engineering & Technology for Diploma Studies Unit - 1

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

PSIM: Processor SIMulator (version 4.2)

Arab Open University. Computer Organization and Architecture - T103

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

Computer Organization (Autonomous)

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Roll No TCS 402/TIT 402

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

Code No: R Set No. 1

Code No: R Set No. 1

CPU Design John D. Carpinelli, All Rights Reserved 1

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Effective Approach for Teaching Computer System Architecture

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

QUESTION BANK FOR TEST

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Chapter 16. Control Unit Operation. Yonsei University

Code No: R Set No. 1

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Computer Architecture and Organization: L04: Micro-operations

CC312: Computer Organization

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

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

END-TERM EXAMINATION

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Credit Based Choice Based Curriculum for. Bachelor of Computer Applications (BCA) Programme 2016 Onwards

Assembly Language Programming of 8085

ELCT 501: Digital System Design

Parallel logic circuits

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

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

MARIE: An Introduction to a Simple Computer

William Stallings Computer Organization and Architecture

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

Magdy Saeb, Samy Salamah Arab Academy for Science, Technology & Maritime Transport School of Engineering, Computer Department Alexandria, Egypt

R10. II B. Tech I Semester, Supplementary Examinations, May

Variable, Complement, and Literal are terms used in Boolean Algebra.

Last Name Student Number. Last Name Student Number

Chapter 3 : Control Unit

CHAPTER 8: Central Processing Unit (CPU)

Chapter 4. MARIE: An Introduction to a Simple Computer

Computer Organization II CMSC 3833 Lecture 33

Introduction to Boolean logic and Logical Gates

THE MICROPROCESSOR Von Neumann s Architecture Model

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

Mini-Computer PDP-8 ISA Simulator Design and Verification

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Logic Gates and Boolean Algebra ENT263

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

MARIE: An Introduction to a Simple Computer

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

Computer Architecture Programming the Basic Computer

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

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Code No: 07A3EC03 Set No. 1

Injntu.com Injntu.com Injntu.com R16

SCRAM Introduction. Philipp Koehn. 19 February 2018

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Transcription:

Page 1 of 8 School of Computer Science 60-265-01 Computer Architecture and Digital Design Winter 2009 Midterm Examination # 2 Wednesday, March 18, 2009 Student Name: First Name Family Name Student ID Number: Duration of examination: 75 minutes 1. Answer all questions on this examination paper in the space provided. 2. This is a closed-book examination no notes or books or electronic computing or storage devices may be used. 3. Do not copy from other students or communicate in any way. All questions will be answered only by the attending proctors. 4. All students must remain seated during the last 5 minutes of the examination. 5. The examination must be surrendered immediately when the instructor announces the end of the test period. 6. Each student must sign the examination list before leaving the classroom. Total mark obtained: Maximum mark: 41

Page 2 of 8 Question 1. [ 10 marks ] Answer all parts of this question. A. State briefly what is wrong with the following register transfer statement. [ 1 mark ] Q : R1 = R2, R1 = R3 Buses cannot be enabled to permit two different sources of data to be transferred to a single location at the same time. B. State briefly what is wrong with the following register transfer statement. [ 1 mark ] Q : PC = AR, PC = PC + 1 You cannot enable both the LOAD and INC inputs on the PC register at the same time. C. Register R1 contains the 8-bit binary value 11011001. Determine the binary value that must be in a register R2, plus determine the logic operation op to be performed, such that the value in R1 is changed to 01101101 after the operation is performed. [2 marks] R1 = R1 op R2 11011001 XOR 10110100 = 01101101 Op is XOR, R2 = 10110100 (Check for alternatives) D. Register R1 contains the 8-bit binary value 11011001. Determine the binary value that must be in a register R2, plus determine the logic operation op to be performed, such that the value in R1 is changed to 11111101 after the operation is performed. [2 marks] R1 = R1 op R2 11011001 XOR 00100100 = 11111101 Op is XOR, R2 = 00100100 (Check for alternatives) E. Starting from an initial value of R = 11011101, determine the sequence of binary values in R after a logical shift-left, followed by a circular shift-right, followed by a logical shift-right, and followed, finally, by a circular shift-left. Show all your work. [4 marks] Lshl(11011101) leads to 10111010 Cshr(10111010) leads to 01011101 Lshr(01011101) leads to 00101110 Cshl(00101110) leads to 01011100

Page 3 of 8 Question 2. [ 11 marks ] A. State how many 128 x 8 memory chips (number of addresses times number of bits at each address) are needed to provide a memory capacity of 4096 x 16. [ 2 marks ] Break into two sub-questions: How many 128 s go into 4096? Answer: 32 How many 8 s go into 16? Answer: 2 Thus, we need 32x2=64 memory chips. Added comment: In most cases of manufacturing, these chips are aligned in tabular arrangements. Noting that two chips are needed to define the 16-bit storage at a given address (that spans both chips), access to each chip requires both decoders and MUXes and enable logic. B. Design a digital circuit that performs the four logic operations of exclusive-or, exclusive-nor, NOR and NAND. Use two selection variables. Show the block diagram assuming two 1-bit inputs A and B. The output from the circuit is F. [ 5 marks ] The circuit block diagram is shown below. Note how each logic gate is applied to A and B, in parallel, but the MUX serves to select one of these to pass through to the output F.

Page 4 of 8 C. Construct a 5-to-32 line decoder with four 3-to-8 decoders, with enable, and one 2- to-4 line decoder, with enable. Use block diagrams. Number the inputs as S 0, S 1, up to S 5. Similarly, label the outputs as D 0, D 1, up to D 31. You may use abbreviations in your answer (ie. you do not need to state every line and every label). [4 marks] A similar problem was posed in previous exercises check your notes and website sources. The circuit is shown below. Note how the outputs from the 2-to4 DEC are attached to the Enable inputs on the 3-to8 DECs.

Page 5 of 8 Question 3. [ 10 marks ] Design and draw the block logic diagram for a digital circuit for a 2-bit register R, with LOAD, CLEAR, INCREMENT and COMPLEMENT enable inputs. You may use any flip-flop that you wish to represent each bit of R. Show all other elements of the circuit logic. You must make sure that all block elements used are properly labeled and identified. This is answered in various ways. The one shown below is based on an example developed in the lecture notes (and in Mano). I have used a D-flip-flop, hence I must always assert the loading value, but I depend on the fact that the D-ff is Enabled, so that when E=0 a refresh automatically happens, while when E=1, another of the input options is performed. The circuit provided below is not complete. I have shown all details for the R0 bit, but I have left the handling of the R1 bit as an exercise. Most of the circuit for R1 is similar or identical to that of R0, since LOAD, CLEAR and COMPLEMENT are the same. Only for INCREMENT, must an additional interface logic circuit be inserted, namely, the circuit (R0 XOR R1) which is obtained from truth-tables.

Page 6 of 8 Question 4. [ 10 marks ] A. Using register transfer language, state precisely what control conditions and microoperations are required to fully specify the complete instruction cycle for the instruction whose machine code is the 16-bit value, stated in hexadecimal: B2E4. [5 marks] From the attached page, obtain the opcode from the leading hex digit, B or binary 1011. This implies that the I-bit of the instruction is 1, for indirect addressing, and the opcode is STA, or Store the Accumulator to memory. This is what we need in order to express the full instruction cycle. Using the timing logic supplied by the Sequence Counter register and Decoder, together with the I-bit to specify the addressing mode and the instruction opcode decoder output D3 (STA=3), we have the following control logic and microoperations: T0 : AR = PC, SC = SC + 1 T1 : IR = M[AR], PC = PC + 1, SC = SC + 1 T2 : { D7,.. D3,.. D0 } = DEC( IR(12-14) ), AR = IR(0-11), I = IR(15), SC = SC + 1 D3.I.T3 : DR = M[AR], SC = SC + 1 D3.I.T4 : AR = DR(0-11), SC = SC + 1 D3.I.T5 : AC = M[AR], SC = 0 Recalling from the lecture discussion that Mano s description is vague on the use of the DR register (ie. how is the data transferred from the memory, M, to either IR, or AC, or AR, etc), I have included it above with some liberties. I have tried to be consistent with Mano s description for steps 0, 1, 2 and 5, but I have referred to DR in steps 3 and 4.

Page 7 of 8 B. Using register transfer language, state precisely what control conditions and microoperations are required to fully specify the complete instruction cycle for the instruction whose machine code is the 16-bit value, stated in hexadecimal: 6320. [5 marks] From the attached page, obtain the opcode from the leading hex digit, 6 or binary 0110. This implies that the I-bit of the instruction is 0, for direct addressing, and the opcode is ISZ, or Increment and Skip if Zero. This is what we need in order to express the full instruction cycle. Using the timing logic supplied by the Sequence Counter register and Decoder, together with the I-bit to specify the addressing mode and the instruction opcode decoder output D6 (ISZ=6), we have the following control logic and microoperations: T0 : AR = PC, SC = SC + 1 T1 : IR = M[AR], PC = PC + 1, SC = SC + 1 T2 : { D7, D6,... D0 } = DEC( IR(12-14) ), AR = IR(0-11), I = IR(15), SC = SC + 1 D6.I.T3 : AC = M[AR], SC = SC + 1 D6.I.T4 : AC = AC + 1, SC = SC + 1 D6.I.T5 : M[AR] = AC, SC = SC + 1 (AC).D6.I.T6 : PC = PC + 1, SC = 0 (AC).D6.I.T6 : SC = 0 Check over this logic carefully ask WHY? is it necessary to do it this way. (Note that it still permits some alternatives, including the matter of how to include the DR register).

Page 8 of 8 This page contains various definitions and information provided freely for each student to use for the examination, if required. You may detach this page. Operation Codes and Mnemonics for Mano s machine: Memory Access Opcodes (4 bits) Direct (Indirect) 0 (8) AND 1 (9) ADD 2 (A) LDA 3 (B) STA 4 (C) BUN 5 (D) BSA 6 (E) ISZ CPU based Opcodes (16 bits) 7800 CLA 7400 CLE 7200 CMA 7100 CME 7080 CIR 7040 CIL 7020 INC 7010 SPA 7008 SNA 7004 SZA 7002 SZE 7001 HLT I/O based Opcodes (16 bits) F800 INP F400 OUT F200 SKI F100 SKO F080 ION F040 IOF Boolean Postulates: P0: Existence: There exist at least two elements x,y in B such that x y P1: Closure: For every x,y in B there exist two combinational operators + and. where x+y is in B and x.y is in B P2: Identity: There exist identity elements 0,1 in B relative to the operations + and., such that for every x in B: 0+x = x+0 = x and 1.x = x.1 = x. P3: Commutativity: The operations + and. are commutative for all x,y in B: x+y = y+x and x.y = y.x P4: Distributivity: Each operation + and. is distributive over the other; that is, for all x,y,z in B: x.(y+z) = x.y+x.z and x+(y.z) = (x+y).(x+z) P5: Complementation: For every element x in B there exists an element ~x, called the complement of x, satisfying: x+~x = 1 and x.~x = 0 Fundamental Logic Micro-operations: F = 0 F = AB F = AB F = A F = A B F = B F = AB +A B F = A+B F = A B F = AB+A B F = B F = A+B F = A F = A +B F = A +B F = 1