COSC 3330/6308 First Review Session

Slides:



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

Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Computer Organization and Architecture Tutorial 6 Kenneth Lee.
التصميم المنطقي Second Course
Registers and Counters. Register Register is built with gates, but has memory. The only type of flip-flop required in this class – the D flip-flop – Has.
Chapter 2 : Number System
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
1 Digital Logic
10/26/2004Comp 120 Fall October Only 11 to go! Questions? Today Exam Review and Instruction Execution.
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
Operations on data CHAPTER 4.
Topic 4 Computer Mathematics and Logic
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
CS 105 Digital Logic Design
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
Computer Architecture
Lesson 8.4 Multiplication Properties of Exponents
Monday, December 6 Assignment(s) due:Assignments #11(original or redo), #12 and #EC2 are due tonight Tonight is the last chance to turn in Quizzes #13.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
Chapter 2 Section 5 Multiplying Integers. Multiplying Two Integers with Different Signs Words: The product of two integers with different signs. Numbers:
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
1 Lecture 10: Floating Point, Digital Design Today’s topics:  FP arithmetic  Intro to Boolean functions.
CPS3340 Computer Architecture Fall Semester, 2013
Ellen Spertus MCS 111 October 16, 2001 Review. 2 What you will learn this semester Given devices that implement simple boolean functions… Understand how.
Short Cuts for Multiply and Divide For Positive Numbers 1. Multiply by 2 k is the same as shift k to the left, 0 fill 2. Divide by 2 k is the same as.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Software Design and Development Storing Data Computing Science.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
10/25/2005Comp 120 Fall October 25 Review for 2 nd Exam on Tuesday 27 October MUL not MULI Ask Questions!
Floating Point Representations
Computer System Design Lecture 3
Invitation to Computer Science, C++ Version, Fourth Edition
Recitation3: CS 3843 Computer Organization 4th week
Prof. Sin-Min Lee Department of Computer Science
Array multiplier TU/e Processor Design 5Z032.
Chapter 4 Operations on Bits.
Negative Binary Numbers
DIGITAL LOGIC CIRCUITS
ELECTRONICS AND COMMUNICATION ENGINEERING
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Bell Ringer Simplify by combining like terms: 1. 2x – 6 + 5x + 9 = y – 7y + 5 = 3. 4x – 6y – 2x + 9y = 7x y + 8 2x + 3y.
Numbers in a Computer Unsigned integers Signed magnitude
Microprocessor Systems Design I
Negative Binary Numbers
Jehan-François Pâris FIRST MIDTERM ANSWERS Jehan-François Pâris
Data Structures Mohammed Thajeel To the second year students
TAO1221 COMPUTER ARCHITECTURE AND ORGANIZATION LAB 6
Invitation to Computer Science, Java Version, Third Edition
MIPS ALU.
Lecture 10: Floating Point, Digital Design
Data Representation – Instructions
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Recent from Dr. Dan Lo regarding 12/11/17 Dept Exam
Data Representation Data Types Complements Fixed Point Representation
MISP Assembly.
Example Question: Consider the expressions: (a) F = XY + XY'
The Processor Lecture 3.1: Introduction & Logic Design Conventions
October 24 Programming problems? Read Section 6.1 for November 5
Introduction to Microprocessor Programming
Recent from Dr. Dan Lo regarding 12/11/17 Dept Exam
October 29 Review for 2nd Exam Ask Questions! 4/26/2019
Review In last lecture, done with unsigned and signed number representation. Introduced how to represent real numbers in float format.
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
1.6) Storing Integer: 1.7) storing fraction:
Presentation transcript:

COSC 3330/6308 First Review Session Fall 2012

First Question Simplify the following Boolean expression. 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

Answer v'w' v'w vw vw' x'y' x'y xy xy' v w x y + w y + w' y + v w x + y

Answer v'w' v'w vw vw' x'y' x'y 1 xy xy' x'y 1 xy xy' v w x y + w y + w' y + v w x + y

Answer v'w' v'w vw vw' x'y' x'y 1 xy xy' x'y 1 xy xy' v w x y + w y + w' y + v w x + y

Answer By Karnaugh maps: v w x + y By algebra: w (v x y + y) +w' y + v w x + y = v w x y + w y + w' y + v w x + y = y (v w x + w + w' + 1) + v w x = y + v w x

Second Question Give a simplified implementation for the following expression using only NAND gates. 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'

Answer x'y' x'y xy xy' w' 1 w w' x' y + w x y' + w' x y' + x' y' w

Answer Using algebra: 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' = w' x' y + x y' (w' + w) + x' y' = w' x' y + x y' + x' y' = w' x' y + y' = w' x' y + w' x' y' + y' = w' x'( y + y') + y' = w'x' + y'

Reminder A NAND B = (A B)' = A' + B' (NOT A) NAND(NOT B) ( A' B')' = A+ B NOT(A NAND B) = (A B)'' = A B (A NAND B) NAND (C NAND D) = ((AB)' (CD)')' = AB + CD

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

Third Question (I) What is the main reason for using a base plus displacement representation of memory addresses in an instructions set?

Answer What is the main reason for using a base plus displacement representation of memory addresses in an instructions set? To be able to access a very large address space with as few bits as possible in order to keep instructions as short as possible MIPS IS uses 5 bits to specify which register and 16 bits for the displacement

Third Question (II) What is the main reason for requiring all instructions to have the same length? To allow the CPU to fetch the next instruction before the current instruction is decoded Would not work if we had 16-bit and 32-bit instructions

Fourth Question Assume we have a very basic microprocessor doing 4-bit arithmetic. How would you represent the decimal value – 8 in signed arithmetic?

Answer How would you represent the decimal value – 8 in signed arithmetic? 1000

Fourth question (II) What would be its result of adding 0100 to 0101 assuming that the numbers being added were Unsigned integers? Signed integers?

Answer What would be its result of adding 0100 to 0101 assuming that the numbers being added were Unsigned integers? Signed integers? 0100 + 0101 = 1001 1001 represents 9 in unsigned arithmetic 1001 represents -7 in signed arithmetic

Explanation We use two complement's arithmetic To change the sign of a positive value Negate all its bits then add 1 For 1001 we do not(1001) + 1 = 0110 + 1 = 0111 = 7

Fifth question Implement a two-bit counter going to the cycle 00, 01, 10, 11, 00, … when its input is on. You may use the flip-flops and the gates of your choice.

Answer Implement a two-bit counter going to the cycle 00, 01, 10, 11, 00, … when its input is on. You may use the flip-flops and the gates of your choice. How many flip-flops do we need?

Answer Implement a two-bit counter going to the cycle 00, 01, 10, 11, 00, … when its input is on. You may use the flip-flops and the gates of your choice. How many flip-flops do we need? Two because we have 22 =4 states

Answer Implement a two-bit counter going to the cycle 00, 01, 10, 11, 00, … when its input is on. You may use the flip-flops and the gates of your choice. How many flip-flops do we need? Two because we have 22 =4 states

Answer Draw the Karnaugh maps for these flip-flops: Least significant bit y x'y' x'y xy xy' i i'

Answer Draw the Karnaugh maps for these flip-flops: Least significant bit y x'y' x'y xy xy' i' 1 i

Answer Draw the Karnaugh maps for these flip-flops: Most significant bit x x'y' x'y xy xy' i' i

Answer Draw the Karnaugh maps for these flip-flops: Most significant bit x x'y' x'y xy xy' i' 1 i

Answer The system equations are y = y  i x = x  iy = x(i' + y') + x' iy

Answer We will use T flip-flops for x and y y will be triggered by input i x will be triggered by input iy

Answer

Sixth Question (I) Which decimal values are stored in the following single precision floating point numbers? 1 129 010000000000000000000000000… 124 10000000000000000000000000…

Sixth Question (II) 1 129 0100000000000000000000000000… Sign is negative Exponent is 129 -127 = 2 Coefficient is 1.01two = 1 + ¼ - (1 + ¼) 22 = -5

Sixth Question (III) 124 10000000000000000000000000… Sign is positive 124 10000000000000000000000000… Sign is positive Exponent is 124 – 127 = -3 Coefficient is 1.1two = 1+ ½ = 1.5 1.5 2-3 =1.5/8 = 3/16

Seventh Question Multiply the two following floating-point numbers: 1 129ten 000000000000000000000 …

Answer Multiply the two following floating-point numbers: Compute the new sign Add the exponents Multiply the coefficients 1 129ten 000000000000000000000 …

Answer Multiply the two following floating-point numbers: Compute the new sign: Negative Add exponents: (129 – 127) + (129- 127) Multiply the coefficients: 11 1 129ten 000000000000000000000 …

Answer Result is -1 24 Sign bit is 1 Biased exponent is 127 + 4 =131 Coefficient is 1 1 131ten 0000000000000000000000…