EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Similar documents
Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points)

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Arithmetic Logic Unit. Digital Computer Design

Computer Architecture and Organization: L04: Micro-operations

Arithmetic-logic units

COMBINATIONAL LOGIC CIRCUITS

Chapter 3: part 3 Binary Subtraction

Code No: R Set No. 1

REGISTER TRANSFER LANGUAGE

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

QUESTION BANK FOR TEST

11.1. Unit 11. Adders & Arithmetic Circuits

Experiment 7 Arithmetic Circuits Design and Implementation

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

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

Chapter 4. Combinational Logic

ECE 341 Midterm Exam

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Lab 3: Standard Combinational Components

END-TERM EXAMINATION

ALU Design. 1-bit Full Adder 4-bit Arithmetic circuits. Arithmetic and Logic Unit Flags. Add/Subtract/Increament/Decrement Circuit

5 Arithmetic Logic Unit

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Logic Design Exercises. Assignment 1

Real Digital Problem Set #6

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

Injntu.com Injntu.com Injntu.com R16

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Combinational Logic Circuits

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.


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

EKT 422/4 COMPUTER ARCHITECTURE. MINI PROJECT : Design of an Arithmetic Logic Unit

To design a 4-bit ALU To experimentally check the operation of the ALU

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

EXPERIMENT NUMBER 11 REGISTERED ALU DESIGN

CURIE Academy, Summer 2014 Lab 1: Computer Engineering Hardware Perspective Sign-Off Sheet

CS 261 Fall Mike Lam, Professor. Combinational Circuits

VHDL Examples Mohamed Zaky

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

An instruction set processor consist of two important units: Data Processing Unit (DataPath) Program Control Unit

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

ENEE245 Digital Circuits and Systems Lab Manual

Microcomputers. Outline. Number Systems and Digital Logic Review

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

CO Computer Architecture and Programming Languages CAPL. Lecture 9

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

CMPE 413/ CMSC 711. Project Specification: 16 bit 2 s complement Adder and 8 bit 2 s complement multiplier. GND. Input bus. Latches I[8]-I[15]

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

Register Transfer Language and Microoperations (Part 2)

EE 109L Review. Name: Solutions

Chapter 4. Combinational Logic. Dr. Abu-Arqoub

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

ENEE245 Digital Circuits and Systems Lab Manual

DIGITAL ELECTRONICS. P41l 3 HOURS

Register Transfer and Micro-operations

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Basic Arithmetic (adding and subtracting)

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Scheme G. Sample Test Paper-I

Code No: R Set No. 1

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Computer Organization and Levels of Abstraction

Fundamentals of Computer Systems

CHAPTER 4: Register Transfer Language and Microoperations

Binary Adders: Half Adders and Full Adders

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

Lab Manual for COE 203: Digital Design Lab

EE 109L Final Review

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

How a Digital Binary Adder Operates

Course Project Part 1

Question Total Possible Test Score Total 100

Chapter 4 Arithmetic Functions

Submitted by 1

Number Systems. Readings: , Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

REGISTER TRANSFER AND MICROOPERATIONS

Chapter 2 Basic Logic Circuits and VHDL Description

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

Introduction to LogicWorks (Version 5) by: Kevin Su

Combinational Circuits

Parallel logic circuits

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

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

Introduction to Boole algebra. Binary algebra

REGISTER TRANSFER AND MICROOPERATIONS

GC03 Boolean Algebra

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

CSE140 L. Instructor: Thomas Y. P. Lee January 18,2006. CSE140L Course Info

Combinational Logic with MSI and LSI

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

CS101 Lecture 25: The Machinery of Computation: Computer Architecture. John Magee 29 July 2013 Some material copyright Jones and Bartlett

Verilog Lab. Two s Complement Add/Sub Unit. TA: Xin-Yu Shi

Transcription:

EE 2 Lab Manual, EE Department, KFUPM EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS OBJECTIVES: Design and implement a circuit that performs basic binary arithmetic operations such as addition, subtraction, increment, and decrement. Use a multiplexer as a data selector. Equipment and ICs: Mini-Lab ML-2 lab station 2 - IC 7493 4-bit ripple counter 2 - IC 748 uad 2-input AND gates - IC 744 Hex Inverter gates 2 - IC 7432 uad 2-input OR gates 2 - IC 7483 4-bit Full Adder - IC 7486 uad 2-input XOR gates 2 - IC 7453 Dual 4 x Multiplexer 8 extra LEDs Introduction: A full-adder is a very important digital circuit that can be used to perform all binary arithmetic operations such as addition, subtraction, multiplication, increment, decrement, etc. A full-adder can be constructed using two half-adders. The half-adder (HA) and fulladder (FA) circuits constructed using XOR, AND, and OR gates are shown below:

EE 2 Lab Manual, EE Department, KFUPM A full-adder can be used to construct a 4-bit binary adder as shown below: Part : Binary Adder Circuits Pre-lab Work: (All Pre-lab work must be shown in the Pre-lab report). Construct a 4-bit binary adder using four full-adders as shown in Figure 2 above. 2. Draw and simulate your circuit in LogicWorks. Include your LogicWorks drawing in the pre-lab report. 3. Verify the 4-bit binary adder operation for the following values: A3 A2 A A B3 B2 B B Sum Carry out Lab Work: (All Lab work must be shown in the Lab report). Implement the full-adder circuit shown in Figure on the proto-board. a. Connect inputs A, B, and C to three switches. b. Connect outputs S and C to one LED each. 2. Flip the switches On/Off, and check the output for all 8 possible combinations of inputs A, B, and C. 3. Tabulate output values for all inputs in a truth table. 2

Part 2: Binary Arithmetic Circuit EE 2 Lab Manual, EE Department, KFUPM You will design and implement a circuit that performs binary operations on two 4-bit numbers as described in the table below: Selection Code Function Function Description F = A + B Add F = A - B Subtract F = A + Increment F = A - Decrement This circuit has two 4-bit values (A and B) and a 2-bit selector (S) as inputs. The circuit has two outputs: a 4-bit function result (F), and a carry-out (C out ). The circuit should be implemented using only a 4-bit adder (IC 7483), 4x multiplexers and one external gate. You may use inverters to generate the complement of an input. The increment and decrement operations are basically addition and subtraction operations, respectively. The increment operation adds to a number (A+) whereas the decrement operation subtracts from a number (A-). The following describes how the other three operations namely Subtraction, Increment, and Decrement can be performed using only the addition operation: A i ± B i = A i + X i + C in where C in = Carry In A i + B i = A i + X i + where X i = B i & C in = A i B i = A i + X i + where X i = B i & C in = A i + = A i + X i + where X i = & C in = A i - = A i + X i + where X i = & C in = S S Function X i C in Add B i Subtract B i Increment Decrement A multiplexer can be used to select one of four operations as shown in Figure 3. The output Xi of the multiplexer will be applied to input B of the 4-bit adder. S and S are the selection inputs of the multiplexer. C in can be generated using a single XOR gate. 3

EE 2 Lab Manual, EE Department, KFUPM The block diagram of the arithmetic circuit that performs the above operations is shown below: Selection lines S S +5V +5V +5V +5V B B' B B' B2 B2' B3 B3' D D S S D D S S D D S S D D S S 4x MUX 4x MUX 4x MUX 4x MUX B3 B2 B B A3 A2 A A CO CI S3 S2 S S Carry out Function result is ground for logic Selection lines S S +5V is +5v for logic Using only one 4-bit adder (IC 7483), we can perform all the above operations with the help of 4x multiplexers (IC 7453) and external gates. Pre-lab Work:. Draw the complete logic diagram of the arithmetic circuit shown above in LogicWorks. a. Connect binary switches to all inputs A 3 A 2 A A, B 3 B 2 B B, and S, S. b. Use inverters to generate B i. c. Connect the outputs Co and F to binary probes. 2. Verify all four arithmetic operations in LogicWorks. 3. Include your LogicWorks drawing in the pre-lab report. 4

Lab Work: EE 2 Lab Manual, EE Department, KFUPM. Implement the logic diagram of the arithmetic circuit on the proto-board using available ICs (7483, 7353 (2), 744, 7486). Use your pre-lab LogicWorks diagram as a reference. a. Connect input A (A 3 A 2 A A ) to four DIP switches and input B (B 3 B 2 B B ) to the other four DIP switches. b. Connect two selection lines S and S to one SPDT switch each. c. Connect the output F to four LEDs or indicator lamps. d. Connect output Co to one indicator lamp. 2. Toggle switches connected to S and S to select one of the four operations as shown in the table below: Selection Code Function F = A + B F = A - B F = A + F = A - 3. Verify all the four operations of the arithmetic circuit by applying several sets of inputs A and B to the circuit. 4. Demonstrate the operation of your circuit to your lab instructor. 5. Record your results and observations for the lab report. 5