CS/EE 260 Homework 5 Solutions Spring 2000

Similar documents
Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Sistemas Digitais I LESI - 2º ano

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

Let s put together a Manual Processor

CSE140 Homework #7 - Solution

Binary Adders: Half Adders and Full Adders

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Understanding Logic Design

Gates, Circuits, and Boolean Algebra

Lab 1: Full Adder 0.0

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

ENGI 241 Experiment 5 Basic Logic Gates

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

3.Basic Gate Combinations

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic


Decimal Number (base 10) Binary Number (base 2)

Systems I: Computer Organization and Architecture

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

COMBINATIONAL CIRCUITS

6.004 Computation Structures Spring 2009

Two's Complement Adder/Subtractor Lab L03

5 Combinatorial Components. 5.0 Full adder. Full subtractor

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

VHDL Test Bench Tutorial

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Gates, Plexers, Decoders, Registers, Addition and Comparison

Xilinx ISE. <Release Version: 10.1i> Tutorial. Department of Electrical and Computer Engineering State University of New York New Paltz

(1) /30 (2) /30 (3) /40 TOTAL /100

Method for Multiplier Verication Employing Boolean Equivalence Checking and Arithmetic Bit Level Description

(Refer Slide Time: 00:01:16 min)

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

Combinational Logic Design

EE360: Digital Design I Course Syllabus

RUTGERS UNIVERSITY Department of Electrical and Computer Engineering 14:332:233 DIGITAL LOGIC DESIGN LABORATORY

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Counters are sequential circuits which "count" through a specific state sequence.

DEPARTMENT OF INFORMATION TECHNLOGY

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

Memory Elements. Combinational logic cannot remember

Counters and Decoders

Two-level logic using NAND gates

Figure 8-1 Four Possible Results of Adding Two Bits

Verification & Design Techniques Used in a Graduate Level VHDL Course

Karnaugh Maps (K-map) Alternate representation of a truth table

Systems I: Computer Organization and Architecture

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

ASYNCHRONOUS COUNTERS

LFSR BASED COUNTERS AVINASH AJANE, B.E. A technical report submitted to the Graduate School. in partial fulfillment of the requirements

Using Logic to Design Computer Components

DESIGN OF GATE NETWORKS

Multipliers. Introduction

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576


Arithmetic Coding: Introduction

Asynchronous counters, except for the first block, work independently from a system clock.

CSE140: Components and Design Techniques for Digital Systems

Chapter 2 Logic Gates and Introduction to Computer Architecture

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Designing Digital Circuits a modern approach. Jonathan Turner

Digital Electronics Detailed Outline

Design: a mod-8 Counter

The string of digits in the binary number system represents the quantity

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

Lecture 8: Synchronous Digital Systems

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

Registers & Counters

Factoring. Factoring Polynomial Equations. Special Factoring Patterns. Factoring. Special Factoring Patterns. Special Factoring Patterns

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

BINARY CODED DECIMAL: B.C.D.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

DB19. 4-Bit Parallel Adder/ Subtractor. Digital Lab Experiment Board Ver. 1.0

Circuits and Boolean Expressions

Combinational circuits

A Comparison of Student Learning in an Introductory Logic Circuits Course: Traditional Face-to-Face vs. Fully Online

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

Quartus II Introduction for VHDL Users

Module 3: Floyd, Digital Fundamental

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

Combinational Logic Design Process

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

DEGREE: Bachelor in Biomedical Engineering YEAR: 2 TERM: 2 WEEKLY PLANNING

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Math 115 Spring 2011 Written Homework 5 Solutions

CHAPTER 3 Boolean Algebra and Digital Logic

Transcription:

CS/EE 6 Homework 5 Solutions Spring (MK -) Construct a -to- line multiplexer with three 4-to- line multiplexers The multiplexers should be interconnected and inputs labeled so that the selection codes through can be directly applied to the multiplexer selections inputs without added logic : d d X d 9 9 S S S S Implementation using 4: es d d d 4 d 6 S S d 8 X d 9 d d d 5 d 7 S S S S

(MK -7) Implement a binary full adder with a dual 4-to- line multiplexer and a single inverter AB C i S C o C i C i C i C i C i C i C i 4: S S S A B 4: Co S S

(MK -4) Design a combinational circuit that forms the -bit binary sum S S of two -bit numbers A A and B B and has both input C and a carry output C Do not use half adders or full adders, but instead use a two-level circuit plus inverters for the input variables, as needed Design the circuit by starting with the following equations for each of the two bits of the adder A B A B C FA C FA C S S S = A B C + A B 'C ' + A 'B C I ' + A 'B ' C = odd (A, B, C i ) C = A B + A C + B C = majority (A, B, C ) S = odd (A, B, C ) = odd (A, B, majority (A, B, C )) = A B majority (A, B, C ) + A B ' majority (A, B, C )' + A ' B majority (A, B, C )' + A ' B ' majority (A, B, C ) = (A B + A ' B ') majority (A, B, C ) + (A B ' + A ' B ) majority(a ',B ', C ') = (A B + A ' B ') (A B + A C + B C ) + (A ' B + A B ') (A ' B ' + A ' C ' + B ' C ') = A B A B + A B A C + A B B C + A ' B ' A B + A ' B ' A C + A 'B ' B C + A 'B A ' B ' + A 'B A 'C ' + A 'B B 'C ' + A B 'A ' B ' + A B 'A 'C ' + A B ' B 'C ' C = majority (A, B, C ) = majority (A, B, majority (A, B, C )) = A B + A majority (A, B, C ) + B majority (A, B, C ) = A B + A (A B + A C + B B ) + B (A B + A C + B B )

A B C A B S S C 4 This problem is to design a simple 4 bit arithmetic unit Your circuit will have two data inputs A=a a a a and B=b b b b and a data output X=x x x x It will also have a control input C=c c c which determines what operation your circuit will perform if C= then the output X is equal to input A if C= then the output X is equal to input B if C= then the output X is equal to the s complement of input A if C= then the output X is equal to the s complement of input B if C=4 then the output X is equal to A+B where A and B are interpreted as unsigned integer values in the range 5 if C=5 then the output X is equal to A+B where A and B are interpreted as signed integer values in the range 8+7 (s complement) if C=6 then the output X is equal to A-B where A and B are interpreted as signed integer values in the range 8+7 (s complement) if C=7 then the output X is equal to B-A where A and B are interpreted as signed integer values in the range 8+7 (s complement) In addition, your circuit will have a status output V which is, if the requested operation results in an invalid result For example, negating an input whose value is 8 should cause the V output to go high An unsigned addition of values 8 and should also cause the V bit to go high 4

As a first step in designing your circuit, draw a block diagram that includes a 4 bit adder, one or more s complement circuits, incrementers and multiplexors Include a control block that the C input connects to and that generates the V output and the control signals for the other components Show each circuit component as a block labeled by its function (eg adder) and with all inputs and outputs clearly labeled Write logic equations for each output of the control block that will cause the circuit as a whole to implement the specification given above Complete your design using the schematic editor Use only AND, OR, EXOR gates and inverters On the printout of the schematic, outline in pencil the gates that correspond to the blocks in your block diagram and label them as in your block diagram Arrange your schematic so that it corresponds as closely as possible to your block diagram Simulate your design for the following inputs and verify that the results are correct C=, A=5; C=, B=; C=, A=6; C=, B=-8; C=4, A=5, B=4; C=4, A=5, B=7; C=5, A=6, B=5; C=5, A=, B=4; C=6, A=5, B=; C=6, A=4, B=6; C=6, A=4, B=-6; C=6, A=, B=; C=7, A=5, B=-6; C=7, A=-, B=6 A B C 4 4 ls comp EN ls comp EN sb sa C na + EN + S EN S nb pb pa controller carry-out adder carry-in X x cx sx 5

Table for control signals: C na pa nb pb V X X X sa sx X sb sx 4 cx 5 (sa=sb) (sa sx) 6 (sa sb) (sa sx) 7 (sa sb) (sb sx) na = (C=) + (C=7) pa = C + C nb = (C=) + (C=6) pb = C + C V = (C=) sa sx + (C=) sb sx + (C=4) cx + (C=5) (sa sb) (sa sx) + (C=6) (sa sb) (sa sx) + (C=7) (sa sb) (sb sx) 6

C + C + adder controller 7

5 Draw (by hand) a schematic diagram for a input, 4 output decoder using simple input gates Label each input, output and gate Write a structural VHDL specification that directly implements the circuit in your schematic Simulate your decoder on all possible inputs Write a dataflow VHDL specification of the decoder and simulate this version as well Hand in the schematic, the VHDL listings and the waveforms from your simulation runs S S A D A D A D A D I I S S 8

9