Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Similar documents
SAMPLE ANSWERS MARKER COPY

Sample Marking Scheme

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

Lecture 2 Review on Digital Logic (Part 1)

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

CHAPTER1: Digital Logic Circuits Combination Circuits

Cs302 Quiz for MID TERM Exam Solved

MC9211 Computer Organization

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Systems I: Computer Organization and Architecture

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Signals and Systems Digital Logic System

CHAPTER III BOOLEAN ALGEBRA

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Number System conversions

Logic Design. Chapter 2: Introduction to Logic Circuits

Unit 2 Boolean Algebra

Boolean Algebra & Logic Gates. By : Ali Mustafa

Midterm1 Review. Jan 24 Armita

EEE130 Digital Electronics I Lecture #4

CprE 281: Digital Logic

Total Time = 90 Minutes, Total Marks = 100. Total /10 /25 /20 /10 /15 /20

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Digital Logic (2) Boolean Algebra

Chapter 2 : Boolean Algebra and Logic Gates

Binary logic consists of binary variables and logical operations. The variables are

CHAPTER 2 BOOLEAN ALGEBRA

CHAPTER 7. Solutions for Exercises

Week-I. Combinational Logic & Circuits

Chapter 2 Combinational Logic Circuits

CHAPTER III BOOLEAN ALGEBRA

CHAPTER 7. Exercises 17/ / /2 2 0

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Chapter 2. Boolean Algebra and Logic Gates

Fundamentals of Digital Design

Chapter 2 Combinational Logic Circuits

Chapter 2: Boolean Algebra and Logic Gates

ECE 238L Boolean Algebra - Part I

Boolean Algebra, Gates and Circuits

ELCT201: DIGITAL LOGIC DESIGN

Chapter 4: Combinational Logic Solutions to Problems: [1, 5, 9, 12, 19, 23, 30, 33]

Boolean Algebra and Logic Gates

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A

Chapter 7 Logic Circuits

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Computer Organization I Test 1/Version 1 CMSC 2833 Autumn 2007

Chapter 2. Digital Logic Basics

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Review for Test 1 : Ch1 5

CPE100: Digital Logic Design I

ELCT201: DIGITAL LOGIC DESIGN


CSE 140 Midterm I - Solution

Chap 2. Combinational Logic Circuits

Gate-Level Minimization

Boolean Algebra and Digital Logic

ENGG 1203 Tutorial - 2 Recall Lab 2 - e.g. 4 input XOR. Parity checking (for interest) Recall : Simplification methods. Recall : Time Delay

Circuits & Boolean algebra.

Combinational Logic. Course Instructor Mohammed Abdul kader

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

Chapter 2 Combinational Logic Circuits

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

ELECTRONICS & COMMUNICATION ENGINEERING PROFESSIONAL ETHICS AND HUMAN VALUES

1 Boolean Algebra Simplification

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

Combinational Logic Fundamentals

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Philadelphia University Student Name: Student Number:

Fundamentals of Computer Systems

Philadelphia University Student Name: Student Number:

Binary addition example worked out

BOOLEAN ALGEBRA TRUTH TABLE

Lecture 7: Karnaugh Map, Don t Cares

CSCI 220: Computer Architecture-I Instructor: Pranava K. Jha. BCD Codes

Written exam for IE1204/5 Digital Design with solutions Thursday 29/

Contents. Chapter 2 Digital Circuits Page 1 of 30

MODULAR CIRCUITS CHAPTER 7

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Combinational Logic. Review of Combinational Logic 1

Digital Logic Design. Combinational Logic

University of Florida EEL 3701 Fall 1996 Dr. Eric M. Schwartz

Optimizations and Tradeoffs. Combinational Logic Optimization

Class Website:

Computer Science Final Examination Friday December 14 th 2001

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #2 Nov 22, 2006

Boolean Algebra and Logic Gates Chapter 2. Topics. Boolean Algebra 9/21/10. EECE 256 Dr. Sidney Fels Steven Oldridge

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Chapter 2: Switching Algebra and Logic Circuits

Combinatorial Logic Design Principles

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Karnaugh Map & Boolean Expression Simplification

Transcription:

Page 1 of 10 School of Computer Science 60-265-01 Computer Architecture and Digital Design Winter 2009 Semester Midterm Examination # 1 Wednesday, February 25, 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: 44

Page 2 of 10 Question 1. [ 5 marks ] Answer each multiple choice question below by circling or underlining the single, most correct choice of answer. A. The word bit is derived from. a. a tiny piece of a computer memory b. a positional value c. a binary digit d. none of these B. The word digital implies that the information in the computer is represented by variables that. a. Take an arbitrary number of values b. Take an arbitrary number of discrete values c. Take a limited number of values d. Take a limited number of discrete values C. Computer is concerned with the way the hardware components operate and the way they are connected together to form the computer system. a. Organization b. Design c. Architecture d. Networking D. Computer is concerned with the structure and behavior of the computer as seen by the user. a. Organization b. Design c. Architecture d. Networking E. The combination of a limited number of fundamental gates to form a functional circuit is called. a. Boolean logic b. Small-scale integration c. Medium-scale integration d. Large-scale integration

Page 3 of 10 Question 2. [ 6 marks ] Using Boolean algebra, prove the following theorems. For each step in the proofs state the specific axiom that is used. Each part is worth 3 marks. [NOTE: The full list of all axioms is provided for each student on the last page of this examination.] (a) X.X = X Proof: X.X = (X.X)+0 Identity = (X.X) + (X.X ) Complementation = X.(X+X ) Distributivity = X.1 Complementation = X Identity (b) X + XY = X + Y Proof: Collapse Theorem (see lecture notes) X + XY = (X + X).(X + Y) Distributivity = 1.(X + Y) Complementation = X + Y Identity

Page 4 of 10 Question 3. [ 8 marks ] Answer each question below. Each part is worth 2 marks. Show your work to earn partial marks if your answer is not completely correct. A. Convert the decimal number -374 to a signed-binary number using 2 s complemention and a 16-bit representation. Start by converting the absolute value: 374 / 2 = 187 rem 0 least significant (rightmost) bit 187 / 2 = 93 rem 1 93 / 2 = 46 rem 1 46 / 2 = 23 rem 0 23 / 2 = 11 rem 1 11 / 2 = 5 rem 1 5 / 2 = 2 rem 1 2 / 2 = 1 rem 0 1 / 2 = 0 rem 1 most significant (leftmost) bit Gathering bits yields the 12-bit result: 101110110 Now convert to 16-bit signed binary form. First add seven 0-bits to the left side. 0000000101110110 1111111010001001 Complement 1111111010001010 Add 1 Final answer B. Convert the octal number 525375 8 to a hexadecimal number. Write octal digits as binary groups of 3 bits per octal digit = 101 010 101 011 111 101 Rearrange bits (from right) in groups of 4 bits = 0010 1010 1010 1111 1101 Convert each 4-bit group to a hex-digit (forget the left 0 s) = 2AAFD

Page 5 of 10 C. Convert the positive decimal real number 21.6 to an unsigned binary number. Separate the number 21.6 into its integer and fractional parts and convert each separately. First, convert the integer: 21 / 2 = 10 rem 1 10 / 2 = 5 rem 0 5 / 2 = 2 rem 1 2 / 2 = 1 rem 0 1 / 2 = 0 rem 1 10101 Next, convert the fraction: 0.6 x 2 = 1.2 integer 1 0.2 x 2 = 0.4 integer 0 0.4 x 2 = 0.8 integer 0 0.8 x 2 = 1.6 integer 1 And this repeats. 0.[1001] Where the bits within braces repeat. D. State the exact values of the largest positive value and the smallest negative value that can be defined in an L-bit representation using signed-binary (ie. 2 s complement) notation. Largest positive value: 2 L-1-1 Smallest negative value: -2 L-1

Page 6 of 10 Question 4. [ 6 marks ] State the six (6) fundamental logic gates (excluding the inverter) and, for each gate, provide a complete truth table that fully defines the logic of each gate. Each correctly identified gate and truth table is worth 1 mark. AND OR X/Y 0 1 X/Y 0 1 0 0 0 0 0 1 1 0 1 1 1 1 NAND NOR X/Y 0 1 X/Y 0 1 0 1 1 0 1 0 1 1 0 1 0 0 XOR NXOR X/Y 0 1 X/Y 0 1 0 0 1 0 1 0 1 1 0 1 0 1

Page 7 of 10 Question 5. [ 6 marks ] Answer all parts of this question. Each part is worth 2 marks. Part A. Simplify the following Boolean expression using Boolean algebra. A B + ABC + ABC ANSWER: A B + ABC + ABC = A B + AB(C +C) = A B + AB = (A +A)B = B Final Answer Part B. Simplify the following Boolean expression using Boolean algebra. (BC + A D)(AB + CD ) ANSWER: (BC + A D)(AB + CD ) = BC AB + BC CD + A DAB + A DCD = 0 + 0 + 0 + 0 = 0 Final Answer Part C. Using De Morgan s theorem, show that: (A + B) (A + B ) = 0 ANSWER: (A + B) (A + B ) = A B AB = A AB B = 0.0 = 0 Final Answer

Page 8 of 10 Question 6. [ 8 marks ] Part A. [ 4 marks ] Simplify the following Boolean SOP expression using the Karnaugh map technique. Express your answer in SOP form. ANSWER: F(A,B,C) = m(3,5,6,7) Kmap BC/00 01 11 10 0 1 A/1 1 1 1 The resulting SOP form is: F = AC + AB + BC Part B. [ 4 marks ] Simplify the following Boolean SOP expression, with don t care conditions, using the Karnaugh map technique. Express your answer in POS form. F(W,X,Y,Z) = m(2,5,7,8,9,12,15) dc(w,x,y,z) = m(0,1,10,14) ANSWER: (D is used for don t care values) Kmap YZ/00 01 11 10 WX/00 D D 0 1 01 0 1 1 0 11 1 0 1 D 10 1 1 0 D NOTE: Remember the D values can be chosen arbitrarily. In this example, there is no benefit gained by setting any D to 0. To form the POS expression, all D values are considered as 1 s and only the 0-cells are encircled. The resulting POS form is: F = ( W + X + Z ) ( X + Y + Z ) ( W + X + Y + Z )

Page 9 of 10 Question 7. [ 5 marks ] Design a combinational circuit that detects an error in the representation of a decimal digit in BCD notation. In other words, obtain a logic diagram whose output is 1 when the inputs contain any one of the six unused bit combinations in the BCD code. Assume the input is a 4-bit BCD code called X (or the tuple { X 3 X 2 X 1 X 0 }) and the output bit is E (for Error bit). ANSWER: The truth table below contains all six entries for which E=1. Note that these correspond to the unused bit combinations in the BCD code. X 3 X 2 X 1 X 0 E 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 Hence, from the table we have the SOP expression: E = X 3 ( X 2 X 1 X 0 + X 2 X 1 X 0 + X 2 X 1 X 0 + X 2 X 1 X 0 + X 2 X 1 X 0 + X 2 X 1 X 0 ) This can be simplified further, either algebraically, or using a K-map: E = X 3 X 2 + X 3 X 1

Page 10 of 10 This page contains information provided freely for each student to use for the examination, if required. You may detach this page. 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