CDS130 Mid-term exam: Sample

Similar documents
ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

ENEL 353: Digital Circuits Midterm Examination

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

CDS Computing for Scientists. Midterm Exam Review. Midterm Exam on October 22, 2013

ENEL Digital Circuits Midterm Examination

UNCA CSCI 255 Exam 1 Spring February, This is a closed book and closed notes exam. It is to be turned in by 1:45 PM.

Question Total Possible Test Score Total 100

CSE-1520R Test #1. The exam is closed book, closed notes, and no aids such as calculators, cellphones, etc.

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

1. Mark the correct statement(s)

CSE-1520R Test #1. The exam is closed book, closed notes, and no aids such as calculators, cellphones, etc.

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

Read this before starting!

QUESTION BANK FOR TEST

Read this before starting!

CS/COE 0447 Example Problems for Exam 2 Spring 2011

CDS Computing for Scientists. Final Exam Review. Final Exam on December 17, 2013

EECS 140/141 Introduction to Digital Logic Design Fall Semester 2016 Exam #1 Date: 3 October 2016

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

Read this before starting!

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Code No: 07A3EC03 Set No. 1

Birkbeck (University of London) Department of Computer Science and Information Systems. Introduction to Computer Systems (BUCI008H4)

Midterm Exam 2B Answer key

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

Section 001. Read this before starting! You may use one sheet of scrap paper that you will turn in with your test.

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

Digital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand

Code No: R Set No. 1

Combinational Circuits

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

Introduction to Computer Science. Homework 1

EE292: Fundamentals of ECE

END-TERM EXAMINATION

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

Binary Adders: Half Adders and Full Adders

DIGITAL ELECTRONICS. P41l 3 HOURS

The LC3's micro-coded controller ("useq") is nothing more than a finite-state machine (FSM). It has these inputs:

INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR Stamp / Signature of the Invigilator

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

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

Chapter 4. Operations on Data

CS 105 Review Questions #3

UNIVERSITY OF WISCONSIN MADISON

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

CONCORDIA UNIVERSITY Department of Computer Science and Software Engineering COMP 228/4 Section PP Midterm Exam

R07

Arab Open University. Computer Organization and Architecture - T103

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation

Combinational Logic Circuits

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

Midterm Exam 2A Principles of Computing Fall November 10, 2014

Birkbeck (University of London) Department of Computer Science and Information Systems. Introduction to Computer Systems (BUCI008H4)

Arithmetic Operations

CS1800 Discrete Structures Final Version A

ECE 341 Midterm Exam

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

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

Experiment 4 Boolean Functions Implementation

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Experimental Methods I

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

Digital Logic Design Exercises. Assignment 1

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Chapter 4. Combinational Logic

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

1 /10 2 /12 3 /16 4 /30 5 /12 6 /20

Read this before starting!

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

Simplification of Boolean Functions

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates. Invitation to Computer Science, C++ Version, Third Edition

that system. weighted value associated with it. numbers. a number. the absence of a signal. MECH 1500 Quiz 2 Review Name: Class: Date:

Boolean Analysis of Logic Circuits

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

Electronic Engineering Part 1 Laboratory Experiment. Digital Circuit Design 1 Combinational Logic. (3 hours)

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Digital Logic. Copyright By NODIA & COMPANY

CE161-4-AU UNIVERSITY OF ESSEX. Undergraduate Examinations 2014 DIGITAL SYSTEMS ARCHITECTURE. Time allowed: TWO hours

Advanced Computer Architecture-CS501

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

Dr. S. Shirani COE2DI4 Midterm Test #1 Oct. 14, 2010


Basic Arithmetic (adding and subtracting)

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

OCR H446 A-Level Computer Science

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

Last Name Student Number. Last Name Student Number

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

Final Examination Semester 2 / Year 2011

CMPSCI 145 MIDTERM #1 Solution Key. SPRING 2017 March 3, 2017 Professor William T. Verts

CS1800 Discrete Structures Fall 2017 October 25, CS1800 Discrete Structures Midterm Version B

Transcription:

CDS130 : Sample Be sure your exam booklet has 6 pages. Write your name at the top of the front page. This is a closed book exam. You may not use a calculator. You may not use MATLAB during exam except the last two problems. Absolutely no interaction between students is allowed. Each prolem is worth 5 points unless indicated otherwise. Partial credit may be awarded ONLY if work is shown. Duration for this exam: 75 minutes. Q1. (?) 10 =(01110011) 2 (using the excess-127 method). 01110011 = (115) 10 unsigned in excess-127 (-12) 10 =(01110011) 2 Q2. Convert decimal -62 to 8-bit binary using the Sign-and-magnitude method. 1011 111 0 Q3. Convert decimal 31.875 into binary. 1111.111 Q4. ( 2D3 ) 16 =(1011010011) 2 Page 1

Q5. What is the minimum number of bits needed for multiplying a 5-bit integer and a 8-bit integer without overflow? State your reasoning. 13 bits. The largerst decimal number of 8 bits is (2 8-1), and the largerst number of 5 bits is (2 5-1) 2 12 1 2 8 1 2 5 1 2 13 1 Q6. In two's complement method, what is the largest decimal number that 8-bit bit pattern can rerespent? 127 0111 1111 is the largest possitive number in the two's complement method. This is equal to 12 7 in decimal. Q7. How many bits are required to reprsent the sum of : 2 13 2 13 2 12 2 12 10? 2 13 2 13 2 12 2 12 =2 14 2 13 15 bits are needed to write this. Q8. A forensic computer scientist is able to examine a file at the low-level of bytes for analyzing malware. A snippet of the document with the binary format reads: 0111 0000 0111 0101 0111 0011 0110 1000 0010 0000 0100 0001 0110 1101 0110 1111 0111 0110 0110 0101 0010 0000 0110 0010 Suppose the text is encoded with the ASCII code (see the encoding table attached to this exam). (1) what is the content of the document displayed above? (2) How many bytes are used for the text shown above? push a Page 2

move b (2) 12 bytes Q9. What is the 8-bit result of dividing the following two binary numbers? 1 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 1000R10001 Q10. Using the two's completement method, adding the following two 8-bit numbers. Convert the result to its decimal equivalent 1 0 0 0 1 0 1 0 + 0 0 0 0 1 0 1 1 the sum is 1001 0 10 1 using the two's complement method, (1) flip all bits: 0110 1010 (1) add 1: 0110 1011 The corresponding decimal number is: - 107 Q11. Water flows into one, both, or none of the two white tubes at the top. What logic gate does it produce from the output indicated? Page 3

A) AND B) OR C) NAND D) NOR E) XOR the truth table: A B out 0 0 0 1 0 0 0 1 0 1 1 1 This is an AND gate. Q12. What one logic gate is equivalent to the logic circuit shown below? Draw the logic gate. C E The boolean algebra this is circuit is: A B = A B= A B this is an NAND gate Page 4

Q13. (10 points) Using only NAND gates, draw a circuit equivalent to the given circuit. Replace the AND gate and OR gate with the universal NAND gates. Q14. (10 points) Without running matlab, provide answer to the following matlab build in functions (1) floor(pi) (2) ceil (-3.02) (3) sqrt(round(3.5)) (4) 2.0\4.0/2.0^2.0 (5) mod (7, 4) (1) 3 (2) -3 (3) 2 (4) 0.5 (5) 3 Page 5

Q15. (10 points) An anonymous function defined in matlab is a function that is not stored in a program file, but associated with a variable. f x, y =sin 2 x 2 cos 2 y 2 e x y Now, define an anonymous function for f(x,y), and calculate the values of f f 1,2, f 2,1 using the defined anonymous function in Matlab. (1) How to write the anonymous function in Matlab? (2) What is the value of f f 1,2, f 2,1? (1) the anonymous function: f=@(x,y) sin(x^2)^2 + cos(y^2)^2 + exp(x-y) (2) f(f(1,2),f(2,1)) = 1.6492 Q16. (10 points) Write a script that asks the user to (a) write a user-defined function (not an anonymous function) power(x,y,z) to evaluate the value of x y x z (b) use the user-provided values to test the results of power(3,4,5). Answer the following quesitons: (1) What is the file name you saved for this user-defined function? (2) Write the script in the following blank (3) what is your value for power(3,4,5)? (1) my_power.m (2) function f=my_power(x,y,z) f = x^y x^z end (3) my_power(3,4,5) = -162 Page 6

Encoding Table Page 7