DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED Experiment 2 - Arithmetic Elements

Similar documents
ECE Lab 5. MSI Circuits - Four-Bit Adder/Subtractor with Decimal Output

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

ENGG2410: Digital Design Lab 5: Modular Designs and Hierarchy Using VHDL

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 2200

gate symbols will appear in schematic Dierent of a circuit. Standard gate symbols have been diagram Figures 5-3 and 5-4 show standard shapes introduce

EXPERIMENT 13 ITERATIVE CIRCUITS

Combinational Logic Design

Department of CSIT. Class: B.SC Semester: II Year: 2013 Paper Title: Introduction to logics of Computer Max Marks: 30

CHAPTER 4 RESULTS & DISCUSSION

ELEC 204 Digital System Design LABORATORY MANUAL

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

MODULE 3. Combinational & Sequential logic

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

Contents Circuits... 1

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

EC6302-DIGITAL ELECTRONICS II YEAR /III SEMESTER ECE ACADEMIC YEAR

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Altera s Max+plus II Tutorial

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

ECT 224: Digital Computer Fundamentals Digital Circuit Simulation & Timing Analysis

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

6.3 Sequential Circuits (plus a few Combinational)

General: Catalog Description: Grading Policy: Course Code: COE 203 Title: Digital Logic Laboratory Co-requisite(s): COE 202 (Digital Logic Design)

LAB 3 Verilog for Combinational Circuits

1. True/False Questions (10 x 1p each = 10p) (a) I forgot to write down my name and student ID number.

LAB 3 Verilog for Combinatorial Circuits

Cascadable 4-Bit Comparator

Encoders and Decoders: Details and Design Issues

SA4NCCP 4-BIT FULL SERIAL ADDER

QUICK GUIDE COMPUTER LOGICAL ORGANIZATION - OVERVIEW

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

Programmable Logic Design Techniques II

B2 Spice A/D Tutorial Author: B. Mealy revised: July 27, 2006

Engineering College. Electrical Engineering Department. Digital Electronics Lab

Laboratory Objectives and outcomes for Digital Design Lab

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

Analogue Versus Digital [5 M]

Programmable Logic Design I

University of Victoria Electrical and Computer Engineering CENG 241 Digital Design I Laboratory Manual

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

4.1* Combinational logic circuits implement logic functions using a combination of logic gates. Recall

MECE336 Microprocessors I

Table of Contents Introduction

Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

EE 210. LOGIC DESIGN LAB.

2. Logic Elements and Logic Array Blocks in the Cyclone III Device Family

EEE130 Digital Electronics I Lecture #1_2. Dr. Shahrel A. Suandi

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

ET398 LAB 4. Concurrent Statements, Selection and Process

Microprocessor Design

Laboratory Exercise 7

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

Logic Design Viva Question Bank Compiled By Channveer Patil

Cyclone II EPC35. M4K = memory IOE = Input Output Elements PLL = Phase Locked Loop

Introduction to Digital Electronics

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

Lab #12: 4-Bit Arithmetic Logic Unit (ALU)

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

EECS 270 Homework the Last Winter 2017

The Nexys 4 Number Cruncher. Electrical and Computer Engineering Department

Digital Circuits. Electrical & Computer Engineering Department (ECED) Course Notes ECED2200. ECED2200 Digital Circuits Notes 2012 Dalhousie University

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Logisim: A graphical system for logic circuit design and simulation

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

A Combined Combinational-Sequential System

Registers and Counters

Reaction Game Kit MitchElectronics 2019

CMOS VLSI Design. Lab 3: Datapath and Zipper Assembly

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Main Design Project. The Counter. Introduction. Macros. Procedure

Department of Electrical Engineering University of Hail Ha il - Saudi Arabia

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

Palestine Technical College. Engineering Professions Department. EEE Digital Logic Fundamentals. Experiment 2.

Fundamentals of Digital Electronics

WELCOME. ECE 2030: Introduction to Computer Engineering* Richard M. Dansereau Copyright by R.M. Dansereau,

Main Design Project. The Counter. Introduction. Macros. Procedure

Sequential Design Basics

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

Lab #11: Register Files

Lab 13: FPGA Circuit Realization Ian Callahan

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

DepartmentofElectronicEngineering NEDUniversity ofengineering &Technology LABORATORY WORKBOOK DIGITAL LOGIC DESIGN (TC-201)

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

WINTER 15 EXAMINATION Model Answer

Multiplexor (aka MUX) An example, yet VERY useful circuit!

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

An automatic synchronous to asynchronous circuit convertor

CSE221- Logic Design, Spring 2003

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

4:1 Mux Symbol 4:1 Mux Circuit

EXPERIMENT #6 DIGITAL BASICS

Digital Electronics Lab #4 February 12, 2008

Digital Networks and Systems Laboratory 2 Basic Digital Building Blocks Time 4 hours

North Shore Community College

Transcription:

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 2200 Experiment 2 - Arithmetic Elements Objectives: 1. To implement a Half subtractor circuit 2. To implement a Full subtractor circuit 3. To implement a circuit using Chained subtractors Theory: How to add and subtract in binary: Binary addition and subtraction is very similar to decimal addition and subtraction. For instance, in decimal addition and subtraction carries and borrows are used: 14 24 + 8 Carry has occurred (4+8=12-8 Borrow has occurred 22 The tens place in 12 is 16 (4 must borrow carried over to next column) 10 from tens place giving 14-8=6) Similarly, binary addition and subtraction involves carries and borrows: 01 10 +01 Carry has occurred (1+1=2 so -01 Borrow has occurred 10 The 1 is carried to the 01 (0 must borrow 2 twos place giving 10) from twos place giving 2-1=1) Note that these operations involve two numbers with two places each. (The numbers being operated on are each 2-places). Our goal in this lab is to implement subtraction using logic gates. In the half subtractor, the inputs (switch 1 & 2) represent the two numbers we are subtracting. The output LEDs show the resulting difference and whether a borrow has occurred. Procedure: Part 1. Half Subtractor In the half subtractor we have two single place inputs, S1 and S2 that are subtracted from each other (S1-S2). The outputs (LED1 & 2) show the result (difference) and whether or not a borrow occurred (borrow). a) Construct the Half Subtractor as shown on the attached schematic. b) Simulate the Half Subtractor: vary the inputs and construct a truth table showing your results. c) Implement the Half Subtractor on your Digital Explorer Board. Test your circuit. d) What effect does a negative result have on the outputs? (0 1 = -1) 1

Part 2. Full Subtractor The full subtractor is composed of two half subtractors chained together. The difference output of the first half subtractor becomes one of the inputs for the second half subtractor. Again, note the third switch, S3. This switch is used to tell the logic that a borrow occurred from the previous stage when chaining many full subtractors together. The final borrow output of the previous stage is tied to S3 of the next stage. We will look at this in more detail in part six of the lab. a) Construct the Full Subtractor as shown on the attached schematic. b) Simulate the Full Subtractor: vary the inputs and construct a truth table showing your results. c) Implement the Full Subtractor on your Digital Explorer Board. Test your circuit. d) What effect does the borrow input (S3) have on the circuit? Part 3. Chained Subtractors On their own, single full/half subtractors are very limited. They can only subtract two single-place numbers together. Chaining (also called cascading) half and full subtractors together allow larger numbers to be subtracted. The number of subtractors used is the maximum number of places that the circuit can handle (e.g. two subtractors allow subtraction of two-place numbers, six subtractors allow subtraction of six-place numbers, etc.) a) Construct a chained Subtractor using one Half subtractor and one Full subtractor. Please see Appendix A on how to create symbols and using them as components in hierarchical design. b) Vary the inputs and construct a truth table showing your results. c) Implement the Chained Subtractors on your Digital Explorer Board. Test your circuit. d) What happens when the result is a negative number? (S3)(S1) First number - (S4)(S2) Second number (X1)(X2)(X3) Result Hint: in the case of a negative number, try this: 1 0 0 0 binary for 8 decimal -(X1)(X2)(X3) result of subtraction giving ve #??? explain why you get this result Some Useful Terms: You might find these terms handy when you are writing your report: Minuend: The first number in a subtraction Subtrahend: The second number in a subtraction Difference: The result of the Minuend Subtrahend 2

3

4

Appendix A: How to create a Half Adder symbol, and use it to built a Full Adder circuit? 1. Right-click in the Hierarchy area and hit New Source : 2. Select schematic as type of source and name it half_adder or similar, then hit next, then finish. NOTE: ONLY Use A-Z, 0-9, and underscores in the name. Do not use dashes or spaces, it will result in errors. For example half-adder and half adder are all INVALID names that may be initially accepted but will later cause problems. 3. We are going to draw a half adder. Add the AND2 and XOR2 gates: 4. Click the Add I/O Marker button: 5

5. Click on or drag a rectangle around the inputs and the outputs of each gate: 6. Wire up as a half-adder again: 7. Hit Esc to exit wire mode, or click on the pointer. Right-click on each port, hit Rename Port : 8. Give ports appropriate name: 9. Under Tools select Symbol Wizard : 6

10. Change the pin name source to Using Schematic. Then change the schematic to half_adder, or whatever you named yours: 11. Keep hitting Next until you get to finish, then hit that too: 12. Open io_connections.sch again (you can close the half_adder schematic & symbol file). Under symbols you should have a new Category, which is your personal library. Add the half_adder symbol twice: 13. Wire up as a full adder by using an OR gate to combine the two carry outputs, and feeding one half adder to another half adder: Now you have a Full adder circuit built with two Half adders as components. 7