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

Similar documents
1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Lecture 8: Synchronous Digital Systems

Gates, Circuits, and Boolean Algebra

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

CHAPTER 3 Boolean Algebra and Digital Logic

Counters and Decoders

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Upon completion of unit 1.1, students will be able to

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

CHAPTER 11: Flip Flops

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Lecture 5: Gate Logic Logic Optimization

EE360: Digital Design I Course Syllabus

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Basic Logic Gates Richard E. Haskell

The components. E3: Digital electronics. Goals:

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

CS311 Lecture: Sequential Circuits

Binary Adders: Half Adders and Full Adders

ENGI 241 Experiment 5 Basic Logic Gates

Sequential Logic Design Principles.Latches and Flip-Flops

COMBINATIONAL CIRCUITS

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

BOOLEAN ALGEBRA & LOGIC GATES

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Digital Systems. Syllabus 8/18/2010 1

Let s put together a Manual Processor

Understanding Logic Design

Logic in Computer Science: Logic Gates

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Decimal Number (base 10) Binary Number (base 2)

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Module 3: Floyd, Digital Fundamental

2.0 Chapter Overview. 2.1 Boolean Algebra

DEPARTMENT OF INFORMATION TECHNLOGY

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Digital Electronics Detailed Outline

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

Copyright Peter R. Rony All rights reserved.

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

Theory of Logic Circuits. Laboratory manual. Exercise 3

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Asynchronous Counters. Asynchronous Counters

Two-level logic using NAND gates

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

6.080/6.089 GITCS Feb 12, Lecture 3

Systems I: Computer Organization and Architecture

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1

CHAPTER 11 LATCHES AND FLIP-FLOPS

Contents COUNTER. Unit III- Counters

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

ASYNCHRONOUS COUNTERS

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

Circuits and Boolean Expressions

Memory Elements. Combinational logic cannot remember

Module 4 : Propagation Delays in MOS Lecture 22 : Logical Effort Calculation of few Basic Logic Circuits

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Chapter 2 Logic Gates and Introduction to Computer Architecture

(Refer Slide Time: 00:01:16 min)

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

Sequential Logic: Clocks, Registers, etc.

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

Chapter 5. Sequential Logic

Modeling Latches and Flip-flops

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Systems I: Computer Organization and Architecture

Chapter 5 Instructor's Manual

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Digital Logic Elements, Clock, and Memory Elements

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

7. Latches and Flip-Flops

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

CMOS Binary Full Adder

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

CSE140 Homework #7 - Solution

Digital Controller for Pedestrian Crossing and Traffic Lights

CSE140: Midterm 1 Solution and Rubric

Combinational Logic Design

Figure 8-1 Four Possible Results of Adding Two Bits

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Elementary Logic Gates

Transcription:

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Instructor: Andy Phelps TAs: Newsha Ardalani, Peter Ohmann, and Jai Menon Midterm Examination 2 In Class (50 minutes) Wednesday, March 9 Weight: 15% NO BOOK(S), NOTE(S), CALCULATOR(S) OF ANY SORT This exam has 6 front-and-back pages, including a blank page at the end. Plan your time carefully, since some problems are longer than others. You must turn in pages 1 to 5. LAST NAME: FIRST NAME: SECTION: ID #:

Question Maximum Points Points 1 4 2 4 3 8 4 8 5 4 6 4 7 8 Total 40

Problem 1 (4 points) Use the truth table to answer the following questions. A B C Z 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 a) Write the boolean expression which corresponds to the truth table. Do not simplify the expression. Hint: Format your answer like: Z = + + Z = A B C + A B C + A B C b) Draw the logic gate-level circuit which corresponds to the truth table. Do not simplify the expression.

Problem 2 (4 points) Use the CMOS circuit below to answer the following questions. Inputs with the same name are assumed to be connected to each other. Names with a bar indicate the inversion of that input. a) Does the circuit above have any flaw? (Yes or No) Hint: Evaluate the circuit for all sets of inputs NO b) If it does, identify it. If not, identify the logic function the circuit implements. XOR

Problem 3 (8 points) Suppse a 32-bit instruction takes the following format (not drawn to scale): OPCODE --UNUSED-- DEST SRC1 SRC2 If there are 242 opcodes and 64 registers: a) What is the minimum number of bits required to represent the opcode? 8 b) What is the minimum number of bits required to represent the SRC1, SRC2, and DEST registers? (Provide the total number of bits) 6 * 3 = 18 c) What is the maximum number of UNUSED bits in the instruction encoding? 36 18 8 = 6 d) For these questions, you may (and it is probably easier to) provide your answers as 2 n. If we decided to redesign the ISA and actually use the UNUSED bits, how many: i. opcodes could we have if we turned all the UNUSED bits into more opcode bits? OPCODE DEST SRC1 SRC2 2 8+6 = 2 14 ii. registers could we have in our computer if we turned all the UNUSED bits into more bits for the DEST, SRC1, and SRC2 fields? Remember, you must distribute the bits across SRC1, SRC2, and DST. OPCODE DEST SRC1 SRC2 18 + 6 = 24 bits. 24/3 = 8. 2 8 registers.

Problem 4 (8 points) Show that a NAND gate (by itself) is logically complete. To do so, a) Make a NOT gate from only NAND gates (use exactly 1 NAND gate) b) Make an AND gate from only NAND gates (use exactly 2 NAND gates) c) Make an OR gate from only NAND gates (use exactly 3 NAND gates) d) Make a NOR gate from only NAND gates (use exactly 4 NAND gates)

Problem 5 (4 points) With a 2:1 MUX, we can implement any two-variable function F(A,B) by appropriately connecting 0, 1, A, A, B, or B to the various inputs. a) Design a 2-input OR gate using only a 2:1 MUX (Note: No additional logic elements are to be used) b) Design a 2-input AND gate using only a 2:1 MUX (Note: No additional logic elements are to be used)

Problem 6 (4 points) The figure below is a finite state machine (FSA) diagram where the start state is S. The machine reads binary input streams from LEFT TO RIGHT. Complete the questions below according to the behavior of this machine. a) For the following input sequences, what is the ending state (i.e. what state is the machine is in after all of the input is read)? i. 1 0 0 0 0 C ii. 0 1 1 0 1 1 D iii. 0 1 0 1 0 C b) Assume the current state is B. What input sequence of length exactly 2 will get the machine to state C? 1 0

Problem 7 (1 point each 8 points total) Choose and circle the best answer for each question. Each question has exactly one correct answer. Multiple Choice 1. If the number of address bits in a memory is increased by 2 and the addressability is halved, the size of memory (i.e. the number of bits stored in the memory) a. Doubles b. Remains unchanged c. Halves d. Increases by 2^(address bits)/addressability 2. The minimum number of transistors required to implement a CMOS 3-input AND gate is a. 4 b. 6 c. 8 d. 10 3. The Decode step of the Instruction Cycle always examines which part of the instruction? a. Immediate (literal) value b. Opcode c. Offset d. Register 4. What is the difference between a Combinational logic circuit and a Sequential logic circuit? a. A change in input for a Sequential logic circuit will propagate immediately to the output, while a Combinational circuit requires a clock pulse before the output changes b. A Combinational logic circuit's output depends solely on the values that are present on the inputs now, while a Sequential logic circuit can depend on previous inputs c. Combinational logic circuits are built from logic gates (e.g. AND, OR, NOT), while Sequential logic circuits are built from their inversions (e.g. NAND, NOR) d. A Combinational logic circuit may have or implement memory, while a Sequential logic circuit operates only based on its current inputs True/False 1. The MAR is where we put the data we are about to write out to memory. a. True b. False 2. DeMorgan's Law shows that if one inverts both the inputs and output of an AND gate, one has implemented an OR gate. a. True b. False 3. A Decoder would be a standard mechanism for interpreting the opcode part of an instruction. a. True b. False 4. A Gated-D Latch (with inputs D and Write-Enable) has a restricted combination of inputs; that is, there is a set of inputs which are illegal. a. True b. False