Assignment # 3 - CSI 2111(Solutions)

Similar documents
MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

COE 328 Final Exam 2008

7 Multipliers and their VHDL representation

Problem Set 6 Solutions

Pin Details of Digital Logic Gates:

ECE 448 Lecture 6. Finite State Machines. State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code. George Mason University

CHAPTER * 2-2.* Pearson Education Limited Problem Solutions, Global Edition Chapter 2. Verification of DeMorgan s Theorem

Acknowledgment. DLD Lab. This set of slides on VHDL are due to Brown and Vranesic.

Chapter 9. Counters and Shift Registers. Counters and Shift Registers

Preparation of Examination Questions and Exercises: Solutions

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

Experiment 4 Decoder Encoder Design using VHDL


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

UNIVERSITY OF CALIFORNIA, RIVERSIDE

Unit 16 Problem Solutions

Written exam with solutions IE1204/5 Digital Design Friday 13/

The Design Procedure. Output Equation Determination - Derive output equations from the state table

Chapter 4. Sequential Logic Circuits

Sequential Logic Circuits

University of Guelph School of Engineering ENG 2410 Digital Design Fall There are 7 questions, answer all questions.

Lecture 10: Synchronous Sequential Circuits Design

Written exam with solutions IE1204/5 Digital Design Monday 23/

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

EXAMINATION in Hardware Description and Verification

Design of Sequential Circuits

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Introduction to Digital Logic

Luleå Tekniska Universitet Kurskod SMD098 Tentamensdatum

RAO PAHALD SINGH GROUP OF INSTITUTIONS BALANA(MOHINDER GARH)123029

FSM model for sequential circuits

EE 209 Spiral 1 Exam Solutions Name:

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Review for Test 1 : Ch1 5

ECE 3401 Lecture 23. Pipeline Design. State Table for 2-Cycle Instructions. Control Unit. ISA: Instruction Specifications (for reference)

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

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

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Systems I: Computer Organization and Architecture

Written exam with solutions IE Digital Design Friday 21/


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

Digital Circuits and Systems

Save from: cs. Logic design 1 st Class أستاذ المادة: د. عماد

Chapter 5 Synchronous Sequential Logic

ECE223. R eouven Elbaz Office room: DC3576

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner

Fundamentals of Digital Design

Digital Control of Electric Drives

Design at the Register Transfer Level

CSE370 HW6 Solutions (Winter 2010)

ECE 407 Computer Aided Design for Electronic Systems. Simulation. Instructor: Maria K. Michael. Overview

Sequential Circuit Analysis

Chapter 7. Synchronous Sequential Networks. Excitation for

Unit 7 Sequential Circuits (Flip Flop, Registers)

Shannon decomposition

Chapter 7. Sequential Circuits Registers, Counters, RAM

Fundamentals of Boolean Algebra

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

ELEN Electronique numérique

Sample Test Paper - I

ELECTRONICS & COMMUNICATION ENGINEERING PROFESSIONAL ETHICS AND HUMAN VALUES

ELCT201: DIGITAL LOGIC DESIGN

Errata for Fundamentals of Logic Design, 5th ed, hardcover (1st printing)

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

Chapter 3 Digital Logic Structures

Shannon decomposition

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Introduction to the Xilinx Spartan-3E

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

ELCT201: DIGITAL LOGIC DESIGN

Boolean Algebra, Gates and Circuits

A B D 1 Y D 2 D 3. Truth table for 4 to 1 MUX: A B Y 0 0 D D D D 3

Logic Design II (17.342) Spring Lecture Outline

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Chapter 9. Counters and Shift Registers. Counters and Shift Registers

Chapter 9. Counters and Shift Registers. Counters and Shift Registers. Counter Terminology 1. Counter Terminology 2. Counter Modulus.

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Sequential Synchronous Circuit Analysis

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

Logic and Boolean algebra

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

CprE 281: Digital Logic

INSTITUTEOFAERONAUTICALENGINEERING (Autonomous) Dundigal, Hyderabad

Analysis of clocked sequential networks

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

CMPT-150-e1: Introduction to Computer Design Final Exam

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Philadelphia University Student Name: Student Number:

Electronics. Overview. Introducction to Synthetic Biology

Transcription:

Assignment # 3 - CSI 2111(Solutions) Q1. Realize, using a suitable PLA, the following functions : [10 marks] f 1 (x,y,z) = Σm(0,1,5,7) f 2 (x,y,z) = Σm(2,5,6) f 3 (x,y,z) = Σm(1,4,5,7) f 4 (x,y,z) = Σm(0,3,6) Minimize the number of product terms and show all connections. f 1 = x y + xz f 1 = x y + xz f 2 = yz + xy z f 2 = x y + y z + yz (or x z + y z + yz) f 3 = y z + xy + xz f 3 = x z + x y + yz f 4 = xyz + x yz + x y z f 4 = xy + xz + y z + x yz Two options give minimum (7) product terms: { f 1, f 2, f 3, f 4 } or { f 1, f 2, f 3, f 4 } PLA programming table for { f 1, f 2, f 3, f 4 }: Term Number Inputs Outputs of terms x y z f1 f2 f3 f4 1 x y 0 0 -- 1 1 -- -- 2 xz 1 -- 1 1 -- 1 1 3 y z -- 0 0 -- 1 -- -- 4 yz -- 1 1 -- 1 -- -- 5 y z -- 0 1 -- -- 1 1 6 xy 1 0 -- -- -- 1 1 7 x yz 0 1 0 -- -- -- 1 T C T C T/C

Q2. Design a 4-bits arithmetic unit with two input selection lines (S 1 and S 0 ) which generates the following arithmetic operations: [10 marks] S 1 S o C in = 0 C in = 1 00 G = B (complement) G = B + 1 (negation 2CF) 01 G = A - 1 (decrement) G = A (transfer) 10 G = bbbb (invalid operation) G = A + B + 1 (subtraction) 11 G = A + B (addition) G = bbbb (invalid operation) Suppose A = A 3 A 2 A 1 A 0, B = B 3 B 2 B 1 B 0, and G = G 3 G 2 G 1 G 0. G = bbbb is an unspecified combination of bits which cannot be used as valid result. Use elementary adders and multiplexers in your realization. Add also the logical circuits necessary for the calculation of the bits of state N, Z, V, C, and W (bit indicating invalid operation when W=true)

Q3. Consider the following sequential circuit: [10 marks] J A = [(AX')'(A'X)']' J B = (B'+ X')' K A = AX' K B = (A'+ X')' Z = (A + B)' a) Construct the transition table for this circuit b) Construct the transition diagram for this circuit c) Determine the state equations of the circuit

d) What is the output sequence when one applies the input sequence 01100 to X (the circuit is initially with state AB=00) a) J A = AX + A X, J B = BX, K A = AX K B = AX b) Present Next State Output State x=0 x=1 x=0 x=1 A B A B A B z z --- --- --- --- --- 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0/1 1/1 00 0/0 01 1/0 1/0 0/0 0/0 10 11 c) 1/0 A(t+1) = X B(t+1) = A B + BX d) 11001 Q4. The following transition table describes a sequential circuit: [10 marks] Present Next State Output State x=0 x=1 x=0 x=1 A B A B A B z z --- --- --- --- --- 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 a) Determine the state equations and output of this circuit.

b) Realize this using D flip-flops. c) Realize this using RS flip-flops. Present State Input Next State Outpu t FF Inputs for b) FF Inputs for c) A B X A B Z D A D B S A R A S B R B 0 0 0 0 0 1 0 0 0 X 0 X 0 0 1 0 1 0 0 1 0 X 1 X 0 1 0 0 1 0 0 1 0 X X 0 0 1 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 X 0 0 X 1 0 1 1 1 0 1 1 X 0 1 0 1 1 0 1 1 0 1 1 X 0 X 0 1 1 1 1 1 1 1 1 X 0 X 0 a) A(t+1) = A + BX B(t+1) = B X + BX + AB Z = B X + BX or B X + BX + AX b) D A = A + BX D B = B X + BX + AB

c) S A = BX, R A = 0 S B = B X, R B = A BX

Q5. (a) Implement in VHDL, a sequential circuit that takes three signals (Load, ShiftLeft, ShiftRight) and a 8-bit InputValue. Additionally, the circuit has an input Clock signal. The circuit output is a 8-bit OutputValue. The circuit operates on the rising edge of the clock, according to the following rules: [15 marks] If Load == 1, then it remembers the 8-bit InputValue. The remembered value is output as a 8-bit value OutputValue. ELSE If ShiftLeft == 1, then it updates the remembered value to be its previous value shifted to the left by one bit. The remembered value is output as a 8-bit value OutputValue. ELSE If ShiftRight == 1, then it updates the remembered value to be its previous value shifted to the right by one bit. The remembered value is output as a 8-bit value OutputValue. ELSE OutputValue is unchanged. (b) Simulate the circuit that you implemented and test it for the following inputs (in the order as they appear): [5 marks] 1. When LOAD = 1, ShiftLeft = 0, ShiftRight = 0, InputValue = 01100101 2. When LOAD = 0, ShiftLeft = 1, ShiftRight = 0, InputValue = 00000000 3. When LOAD = 0, ShiftLeft = 0, ShiftRight = 1, InputValue = 11111111 4. When LOAD = 1, ShiftLeft = 0, ShiftRight = 1, InputValue = 11110000 5. When LOAD = 0, ShiftLeft = 0, ShiftRight = 1, InputValue = 00000001

Submit the timing diagram showing all the above test cases. (Note that for each test case, you need to show what happens on a rising edge of the Clock.) (a) VHDL Code: -- CSI2111 Assignment-3 Question-5 -- Load-&-Shift Register -- If LOAD = 1, loads the InputValue -- Else if SHIFTLEFT = 1, shifts left the stored value -- Else if SHIFTRIGHT = 1, shifts right the stored value -- (operates on rising edge of clock) LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY circuit_a3_q5 IS PORT( Clock, Load : IN STD_LOGIC; ShiftLeft, ShiftRight : IN STD_LOGIC; InputValue : IN STD_LOGIC_VECTOR( 7 DOWNTO 0 ); OutputValue : OUT STD_LOGIC_VECTOR( 7 DOWNTO 0 ) ); END circuit_a3_q5; ARCHITECTURE behavioral OF circuit_a3_q5 IS SIGNAL SavedValue : STD_LOGIC_VECTOR( 7 DOWNTO 0 ); remembered value --saves the BEGIN OutputValue <= SavedValue; update: PROCESS( Clock ) -- this process is executed whenever CLOCK changes BEGIN IF( Clock'EVENT AND Clock= '1' ) THEN IF Load = '1' THEN SavedValue <= InputValue; -- loads the input value ELSIF ShiftLeft = '1' THEN SavedValue(7 downto 1) <= SavedValue(6 downto 0); -- shift left SavedValue(0) <= '0'; ELSIF ShiftRight = '1' THEN SavedValue(6 downto 0) <= SavedValue(7 downto 1); -- shift right SavedValue(7) <= '0'; ELSE SavedValue <= SavedValue; -- no change END IF; -- IF load = '1' END IF; -- IF( clock'event AND clock = '1' ) END PROCESS update; END behavioral;

(b) Timing diagram: