Jehan-François Pâris jfparis@sbcglobal.net FIRST MIDTERM ANSWERS Jehan-François Pâris jfparis@sbcglobal.net.

Slides:



Advertisements
Similar presentations
COSC 3330/6308 Solutions to Second Problem Set Jehan-François Pâris October 2012.
Advertisements

التصميم المنطقي Second Course
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit.
1 Lecture 11: Digital Design Today’s topics:  Evaluating a system  Intro to boolean functions.
Cache Memory Midterm 2 Revision 2 Prof. Sin-Min Lee Department of Computer Science.
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
Chapter 9 Counters.
CS 105 Digital Logic Design
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Computers Organization & Assembly Language
1 Bits are just bits (no inherent meaning) — conventions define relationship between bits and numbers Binary numbers (base 2)
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
Digital Circuits Design Chin-Sung Lin Eleanor Roosevelt High School.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
COSC 3330/6308 Solutions to First Problem Set Jehan-François Pâris September 2012.
CSCI 6307 Foundation of Systems Review: Midterm Exam Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
CS/COE0447 Computer Organization & Assembly Language
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Designing Combinational Logic Circuits
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
THE K-MAP.
Computer Organization Instructions Language of The Computer (MIPS) 2.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
ELECTRICAL ENGINEERING: PRINCIPLES AND APPLICATIONS, Third Edition, by Allan R. Hambley, ©2005 Pearson Education, Inc. Chapter 7 Logic Circuits.
9/23/2004Comp 120 Fall September Chapter 4 – Arithmetic and its implementation Assignments 5,6 and 7 posted to the class web page.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Computer System Design Lecture 3
CHAPTER 7 MULTI-LEVEL GATE CIRCUITS / NAND AND NOR GATES
Prof. Sin-Min Lee Department of Computer Science
Lec 3: Data Representation
Array multiplier TU/e Processor Design 5Z032.
Lecture 3: MIPS Instruction Set
A Closer Look at Instruction Set Architectures
ELECTRONICS AND COMMUNICATION ENGINEERING
COMBINED PAGING AND SEGMENTATION
EKT 124 / 3 DIGITAL ELEKTRONIC 1
COSC 3330/6308 First Review Session
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Sequential Circuit - Counter -
Fundamentals & Ethics of Information Systems IS 201
Reading: Hambley Chapters
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Digital Logic and Design
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
CS170 Computer Organization and Architecture I
MISP Assembly.
Counters and Registers
BASIC & COMBINATIONAL LOGIC CIRCUIT
EE 445S Real-Time Digital Signal Processing Lab Spring 2014
King Fahd University of Petroleum and Minerals
ECE232: Hardware Organization and Design
CH7 Multilevel Gate Network
Week 7: Gates and Circuits: PART II
Reading: Hambley Ch. 7 through 7.5
MIPS Assembly.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Analysis of Logic Circuits Example 1
MIPS assembly.
Digital Circuits and Logic
Part I Data Representation and 8086 Microprocessors
MIPS instructions.
Reading: Hambley Ch. 7 through 7.5
Presentation transcript:

Jehan-François Pâris jfparis@sbcglobal.net FIRST MIDTERM ANSWERS Jehan-François Pâris jfparis@sbcglobal.net

A Problem with the first problem set Problem 5 states Simplify the expression (ABC)’ (A + DE) (A + B’C) (B + E) and convert it into a form that can be represented using a programmable logic array. This means transforming the expression into sum of products

A Problem with the first problem set Neglecting null products, we have (ABC)’ (A + DE) (A + B’C) (B + E) = (A’ + B’ + C’) (A+ DE) (A +B’C) (B + E) = A’B’CDE +  A’B’CDE + AB’E + AB’CE + AB’DE + ABC’ + AC’E + AB’C’DE  + AC’E  = B’CDE + AB’E +  ABC’ + AC’E This is fine but we can eliminate one of the three products

A Problem with the first problem set Let us rewrite AC’E = ABC’E + AB’C’E We would them have B’CDE + AB’E + ABC’ + ABC’E + AB’C’E = B’CDE + AB’E(1 + C’) + ABC’(1 + E) = B’CDE + AB’E + ABC’ Solution obtained using Karnaugh maps Those you have it will have 20/20.

First Question Simplify the following Boolean expression. (10 points) w (v x y + y) +w' y + v w x + y

Answer w (v x y + y) + w' y + v w x + y = v w x y + w y + w’ y + v w x + y = v w x + y

Second Question Give a simplified implementation for the following expression using only NAND gates. (20 points) w' (x  y) + w x y' + x' y'

Answer w' (x  y) + w x y' + x' y' = w' (x y' + x' y) + w x y' + x' y' = w' x y’ + w' x’ y + w x y' + x' y'= x y' + w' x' y + x' y' = w' x' y + y'

Answer (w'x'y)' w' x' y ((w'x'y)'.y)' = w'x'y + y'

Third Question Consider a huge program that consists of a purely sequential part that takes two hours and another part that takes eight hours. What is the maximum speedup we can achieve by parallelizing the second part of the program? (5 points)

Amdahl’s Law The total speedup for the whole system will be The maximum possible speedup when Ti  0

Answer The maximum speedup we can achieve is a factor of (8 + 2)/2 = 5 .

Fourth Question Server motherboard A has a SPEC CPU2006 rating of 31.4 while server B has a rating of 29.7. Which one of the two motherboards is faster? (5 points)

Answer Motherboard _ A _ is faster than the other motherboard.

Fifth Question (I) Assume we have a very basic microprocessor doing 4-bit arithmetic. (3×5 points) How would you represent the decimal value – 8 in signed arithmetic?

Answer – 8 is represented in 4-bit arithmetic by 1000

Fifth Question (II) What would be its result of adding 0100 to 0101 assuming that The numbers being added were unsigned integers? The numbers being added were signed integers?

Answer 0100 + 0101 = 1001 If the numbers being added are unsigned integers, the answer is +9 If the numbers being added are signed integers, the answer is INVALID due to an overflow condition

Sixth Question Implement a two-bit counter going to the cycle 00, 01, 10, 11, 00, … when its input is on. You may use the flipflops and the gates of your choice. (15 points)

Answer State transition diagram 00 01 11 10

Answer Four states means two flipflops One for lesser significant bit: Triggered by each transition One for more significant bit: Triggered by transition occurring when LSB = 1 Use T flipflops

Answer Q’ T X Q Clock T Q’ Q Y Clock From chapter II notes

Seventh Question Given the following MIPS instructions, lw r1, a(r2) addi r1, r2, #n addiu r1, r2, #n andi r1, r2, #n ori r1, r2, #n Clear the contents of register r1? (5 points) Copy the contents of register r2 into register r1? (5 points)

Answer Clear the contents of register r1? (5 points) ori r1, $0, 0 andi r1, $0, 0 addi r1, $0, 0 (slower?) Copy the contents of register r2 into register r1? (5 points) ori r1, r2, 0 addi r1, r2, 0 (slower?) addr 1, r2, $0

Eighth Question Unlike the IBM/360 instruction set, the MIPS instruction set has fixed-size instructions. What is the main advantage of having fixed-size instructions? (5 points) Which group of MIPS instructions takes advantage of this property and how? (5 points)

Answer What is the main advantage of having fixed-size instructions? (5 points) Can predict the exact location of an instruction before decoding the instructions that precede Allows prefetching and pipelining

Answer Which group of MIPS instructions takes advantage of this property and how? (5 points) I-format jump instructions multiply their offset by 4 because all instructions are 4-byte wide

Ninth Question Explain why the very large instruction set of the x86 family of processors is at the same time a nightmare and a blessing for both Intel and AMD. (2×5 points)

Answer A nightmare to implement A blessing because it discourages the competition