EEL-3705 TPS QUIZZES Chapter 4. Quiz 4-1 Using the 2x4 Decoder shown below and two-input OR gates, design a logic circuit which implements.

Slides:



Advertisements
Similar presentations
Modular Combinational Logic
Advertisements

Combinational Circuits
Chapter 4 -- Modular Combinational Logic. Decoders.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Comparator.
Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.
Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Arithmetic See: P&H Chapter 3.1-3, C.5-6.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
1 COMP541 Arithmetic Circuits Montek Singh Mar 20, 2007.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
ECE 301 – Digital Electronics
Chapter 3 Combinational Logic Design
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
CS 105 Digital Logic Design
EEL-3705 TPS QUIZZES. Think - Pair - Share (TPS) Quizzes Think – Pair – Share –Think individually for one time units –Pair with partner for two time units.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Combinational and Sequential Logic Circuits.
Sahar Mosleh PageCalifornia State University San Marcos 1 Multiplexer, Decoder and Circuit Designing.
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Basic Arithmetic (adding and subtracting)
Digital Arithmetic and Arithmetic Circuits
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Chapter 6-1 ALU, Adder and Subtractor
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
ES 244: Digital Logic Design Chapter 4 Chapter 4: Combinational Logic Uchechukwu Ofoegbu Temple University.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Combinational Circuits
EEL-3705 TPS QUIZZES Chapters 6,7,8. Quiz 1 Quiz Design a FSM which implements the state equations given below.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative.
COMP541 Arithmetic Circuits
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Computer Architecture
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
1 IKI20210 Pengantar Organisasi Komputer Kuliah No. 23: Aritmatika 18 Desember 2002 Bobby Nazief Johny Moningka
Digital Electronics Tutorial: Number System & Arithmetic Circuits Solutions.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
Number Representation (Part 2) Computer Architecture (Fall 2006)
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Combinational Circuits
Prof. Sin-Min Lee Department of Computer Science
Digital Systems Section 8 Multiplexers. Digital Systems Section 8 Multiplexers.
Combinational Logic Circuits
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
EEL 3705 / 3705L Digital Logic Design
Chapter 6 Functions of Combinational Logic
FIGURE 4.1 Block diagram of combinational circuit
EEL 3705 / 3705L Digital Logic Design
Programmable Configurations
Digital Systems Section 12 Binary Adders. Digital Systems Section 12 Binary Adders.
Digital Logic.
Combinational Circuits
Arithmetic Circuits.
Presentation transcript:

EEL-3705 TPS QUIZZES Chapter 4

Quiz 4-1

Using the 2x4 Decoder shown below and two-input OR gates, design a logic circuit which implements

Solution

Quiz 4-2

Using the 3x8 Decoder shown below and two-input OR gates, design a logic circuit which implements

Solution

Quiz 4-3

Using the 3x8 Decoder shown below and two-input OR gates, design a logic circuit which implements

Solution

Quiz 4-4a

Using 3x8 Decoders with Active LOW Enables and NOT gates, design a logic circuit which implements a 4x16 decoder

Solution

Quiz 4-4b

Using standard two-input and three- input logic gates, design an encoder circuit that implements the following truth table abcy1y0 1d101 d d11

Solution 111 1

Y1

Solution

Y0

Quiz 4-5

Using standard two-input logic gates, design a 2X1 MUX which implements Your circuit should have three inputs, Data inputs D0 and D1, and control input S. Hint: Develop the truth table first

Solution D1D0SF d 0 D1d1

Solution

Demonstrations

1 bit deep 2x1 MUX 2 Logical Data Inputs 1 bit deep 1 Control Input 1 Logical Output 1 bit deep

1 bit deep 4x1 MUX 4 Logical Data Inputs 1 bit deep 2 Control Inputs 1 Logical Output 1 bit deep

2 bits deep 2x1 MUX 2 Logical Data Inputs 2 bits deep 1 Control Input 1 Logical Output 2 bits deep

2 bits deep 4x1 MUX 4 Logical Data Inputs 2 bits deep 2 Control Inputs 1 Logical Output 2 bits deep

4 bits deep 2x1 MUX 2 Logical Data Inputs 4 bits deep 1 Control Input 1 Logical Output 4 bits deep

Quiz 4-6

Using the 2X1 MUX shown below and NOT gates, design a logic circuit which implements:

Solution We need We have Let a=s, D0=b, D1=b

Quiz 4-7

Using standard two-input logic gates, design a 2X1 MUX with Enable which implements Your circuit should have four inputs, Data inputs D0 and D1, and control inputs E and S.

Solution D1D0ESF dd0d0 d 10 D1d11

Solution

Quiz 4-8

Design a 4x1 MUX using the 2x1 MUX with enable shown below, NOT, and OR gates Your design should implement this equation

Solution

Quiz 4-9

Using the 4x1 MUX shown below and NOT gates, design a logic circuit which implements

Solution

Quiz 4-10

Using the 4x1 MUX shown below and NOT gates, design a logic circuit which implements

Solution c c c c a b F

Class Design Project

Quiz 4-11 Module A

Design a logic circuit (let’s call this module A) which converts a three bit signed magnitude input into its equivalent three bit two’s complement output. Let X 2 =0 indicate a positive number and X 2 =1 indicate a negative number. X 1 and X 0 represent the magnitude of the number. For example Hint: Really this is a hint !!!, Develop the truth table for all possible input combinations INPUT: X[2..0] OUTPUT: A[2..0] Module A

Solution X2X1X0A2A1A

Solution

11 1 1

Quiz 4-12 Module B

Design a logic circuit (let’s call this module B) which computes where A is a three bit two’s complement input with a domain of -3 to 3. Hint: This is really another hint!!!, Precompute B in decimal for each possible A and develop a truth table relating B to A in binary. Assume don’t care for B when |A| > 3. How many bits are you going to need for B? INPUT: A[2..0] OUTPUT: B[??..0] Module B

Solution A2A1A0BB3B2B1B Ddddd

Solution

1 1 11

Quiz 4-13 Module C

Using Half Adders and NOT gates, design a logic circuit which will compute the 2’s comp of a 4-bit signed binary number INPUT: B[3..0] OUTPUT: C[3..0] Module C Hint: Calculate the 1’s complement and add 1.

Solution

Quiz 4-14 Module D

Using Module C (i.e. 2’s comp module) and the 4-bit wide 2X1 MUX shown below, design a logic circuit which will calculate the sign magnitude of a 4-bit 2’s complement number. You may assume maximum magnitude is 7. Your design should also have an output labeled sign which is sign=1 for negative values. INPUT: B[3..0] OUTPUT: D[2..0] Sign Module D

Solution

Quiz 4-15 Class Design Project

We have the design for four modules: A: 4-bit Sign Magnitude to 2’s complement B: y=2x-1 for |X|<4 C: 4-bit 2’s complement generator D: 4-bit 2’s complement to Sign Magnitude Team with two other groups. One group (X) should implement module A One group (Y) should implement module B One group (Z) should implement module C,D Pick your groups and decide who is X,Y, and Z.

I will give a series of inputs to Group X, who should compute A =A[2..0] and give it to group Y, who then needs to compute B=B[3..0] and give it to group Z who then needs to compute D=D[2..0] and Sign. Group D should convert the result to decimal using a minus sign to represent a negative number and record it on the board. Use the index card to pass data from one module to the next.

Block Diagram ABC/D X[2..0]A[2..0]B[3..0]D[2..0] Record Results On Board From Dr. Perry Sign

X=000 1

X=100 2

X=001 3

X=101 4

X=011 5

X=111 6

Quiz 4-16

Let tgate=15ns, calculate the worst case delay for a 32-bit adder for the three circuits below. CircuitDelay Ripple Carry (2n+1)tgate Fully Parallel 2*tgate Carry Look Ahead 4*tgate

Let tgate=15ns, calculate the worst case delay for a 32-bit adder. CircuitDelay Ripple Carry (2n+1)tgate65*15ns=975ns Fully Parallel 2*tgate2*15ns=30ns Carry Look Ahead 4*tgate4*15ns=60ns

Quiz 4-17

Given the 4-bit add/sub module shown below, let A=$D, B=$F, ADD=0, what is S in ADDER module in hex and decimal?

Given the 4-bit add/sub module shown below, let A=$D, B=$F,, what is S? $D+$F=$C -3+(-1)=-4

Quiz 4-18

Given the 4-bit add/sub module shown below, let A=$D, B=$F, ADD=1, what is S in hex and decimal?

Given the 4-bit add/sub module shown below, let A=$D, B=$F, ADD=1, what is S? $D-$F=$E -3-(-1)=-2

Quiz 4-19

Overflow/Underflow Detection Recall That is, if for the MSB carry_in is not equal to carry_out, overflow or underflow has occurred.

Given a 4-bit adder, indicate whether each operation below gives an overflow(O), underflow(U), or correct (OK) answer. 1. $D+$4 2. $6 +$4 3. $7 + $A 4. $F + $F 5. $8 + $F

Given a 4-bit adder, indicate whether each operation below gives an overflow(O), underflow(U), or correct (OK) answer. 1. $D+$4 = $1 (OK) 2. $6 +$4 = $A (O) 3. $7 + $A = $1 (OK) 4. $F + $F = $E (OK) 5. $8 + $F = $7 (U)

Quiz 4-20

Given a 4-bit adder, indicate whether each operation below gives an overflow(O), underflow(U), or correct (OK) answer. 1. $D-$7 2. $6 -$4 3. $7 - $A 4. $F - $F 5. $8 - $1

Given a 4-bit adder, indicate whether each operation below gives an overflow(O), underflow(U), or correct (OK) answer. 1. $D-$7=$6 (U) 2. $6 -$4 = $2 (OK) 3. $7 - $A = $D (O) 4. $F - $F = $0 (OK) 5. $8 - $1 =$7 (U)

Quiz 4-21

Develop the truth table for a 2 bit signed comparator? Your truth table should have four inputs b1 b0 a1 a0 and three outputs F1= (A<B) F2 = (A > B) F3 = (A = B) Assume 2-bit signed (i.e. 2’s comp) values Hint: convert to decimal and compare

Solution b1b0a1a0A<BA>BA=B

Solution b1b0a1a0A<BA>BA=B

Quiz 4-22

Let A=$C and B=$7 and S[1..0]=00, what is F in hex? F[3..0]

Let A=$C and B=$7 and S[1..0]=00, what is F? F[3..0] AND Operation F=$04

Quiz 4-23

Let A=$C and B=$7 and S[1..0]=10, what is F in hex? F[3..0]

Let A=$C and B=$7 and S[1..0]=10, what is F? F[3..0] NOT A Operation F=$03

Quiz 4-24

Let A=$C and B=$7 and S[1..0]=11, what is F hex? F[3..0]

Let A=$C and B=$7 and S[1..0]=10, what is F? F[3..0] XOR Operation F=$0B

Quiz 4-25

Let A=$3 and B=$4, S[1..0]=00, What is F in hex? B A S

B A S F=A+B F=$07 0 0

Quiz 4-26

Let A=$3 and B=$4, S[1..0]=10, What is F in hex? B A S

B A S F=A+1 F=$04 0 0