Combinational Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Similar documents
Experiment # 4. Binary Addition & Subtraction. Eng. Waleed Y. Mousa

COMBINATIONAL LOGIC CIRCUIT First Class. Dr. AMMAR ABDUL-HAMED KHADER

4:Combinational logic circuits. 3 July

Experiment # 3 Combinational Circuits (I) Binary Addition and Subtraction

Binary Adder and Subtractor circuit

UNIT III. Designing Combinatorial Circuits. Adders

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

UNIT-2: BOOLEAN EXPRESSIONS AND COMBINATIONAL LOGIC CIRCUITS

COMBINATIONAL CIRCUIT

Module 4: Design and Analysis of Combinational Circuits 1. Module-4. Design and Analysis of Combinational Circuits

UNIT-IV Combinational Logic

BCD Adder. Lecture 21 1

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

TABLE 3-2 Truth Table for Code Converter Example

Logic Circuit Design

Department of Electronics and Communication Engineering

CHAPTER 5 DESIGN OF COMBINATIONAL LOGIC CIRCUITS IN QCA

LIST OF EXPERIMENTS. KCTCET/ /Odd/3rd/ETE/CSE/LM

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

2 Building Blocks. There is often the need to compare two binary values.

Combinational Logic Circuits. Combinational Logic

EXPERIMENT NO 1 TRUTH TABLE (1)

Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

DESIGN OF 4 BIT BINARY ARITHMETIC CIRCUIT USING 1 S COMPLEMENT METHOD

University of Technology

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

Unit 3. Logic Design


Function Table of an Odd-Parity Generator Circuit

;UsetJand : Llto Record the truth. LAB EXERCISE 6.1 Binary Adders. Materials. Procedure

2 Logic Gates THE INVERTER. A logic gate is an electronic circuit which makes logic decisions. It has one output and one or more inputs.

Laboratory Manual CS (P) Digital Systems Lab

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #1 Oct 18, 2006

Linear & Digital IC Applications (BRIDGE COURSE)

LOGIC GATES AND LOGIC CIRCUITS A logic gate is an elementary building block of a Digital Circuit. Most logic gates have two inputs and one output.

Subtractor Logic Schematic

Digital. Design. R. Ananda Natarajan B C D

Serial Addition. Lecture 29 1

WEEK 4.1. ECE124 Digital Circuits and Systems Page 1

Analysis procedure. To obtain the output Boolean functions from a logic diagram, proceed as follows:

(CSC-3501) Lecture 6 (31 Jan 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

DELD MODEL ANSWER DEC 2018

CHW 261: Logic Design

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

Lecture 15 Analysis of Combinational Circuits

Adder (electronics) - Wikipedia, the free encyclopedia

MSI Design Examples. Designing a circuit that adds three 4-bit numbers

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

COLLEGE OF ENGINEERING, NASIK

Lesson: Binary Arithmetic and Arithmetic Circuits-2. Lesson Developer: Dr. Divya Haridas

Odd-Prime Number Detector The table of minterms is represented. Table 13.1

Binary Addition. Boolean Algebra & Logic Gates. Recap from Monday. CSC 103 September 12, Binary numbers ( 1.1.1) How Computers Work

UC Berkeley CS61C : Machine Structures

Subject: Analog and Digital Electronics Code:15CS32

Digital Fundamentals

Exercise 2: OR/NOR Logic Functions

Digital Applications (CETT 1415) Credit: 4 semester credit hours (3 hours lecture, 4 hours lab) Prerequisite: CETT 1403 & CETT 1405

Digital Electronics 8. Multiplexer & Demultiplexer

Government of Karnataka Department of Technical Education Board of Technical Examinations, Bengaluru

UC Berkeley CS61C : Machine Structures

Encoders. Lecture 23 5

UC Berkeley CS61C : Machine Structures

Exercise 1: AND/NAND Logic Functions

Combinational Circuits DC-IV (Part I) Notes

FPGA IMPLENTATION OF REVERSIBLE FLOATING POINT MULTIPLIER USING CSA

Gates and Circuits 1

IES Digital Mock Test

Digital Electronics. Functions of Combinational Logic

Computer Architecture: Part II. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Structural VHDL Implementation of Wallace Multiplier

FUNCTION OF COMBINATIONAL LOGIC CIRCUIT

DELD UNIT 3. Question Option A Option B Option C Option D Correct Option A B C

Spec. Instructor: Center

Sr. No. Instrument Specifications. TTL (Transistor-Transistor Logic) based on bipolar junction transistors

a b y UC Berkeley CS61C : Machine Structures Hello Helo,world!

B.C.A 2017 DIGITAL ELECTRONICS BCA104T MODULE SPECIFICATION SHEET. Course Outline

SKP Engineering College

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

Chapter 1: Digital logic

Rectifiers and Filters

Comparative Analysis of Various Adders using VHDL

Lab Report: Digital Logic

Digital Applications (CETT 1415) Credit: 4 semester credit hours (3 hours lecture, 4 hours lab) Prerequisite: CETT 1403 & CETT 1405

Digital Integrated CircuitDesign

Reinforce the categories of the numerals. Give the child the adult wording for numbers.

COMPUTER ARCHITECTURE AND ORGANIZATION

E2.11/ISE2.22 Digital Electronics II

Digital Logic and Design (Course Code: EE222) Lecture 14: Combinational Contd.. Decoders/Encoders

Logic diagram: a graphical representation of a circuit

Solutions. ICS 151 Final. Q1 Q2 Q3 Q4 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

CHAPTER 3 BASIC & COMBINATIONAL LOGIC CIRCUIT

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

Time: 3 hours Max. Marks: 70 Answer any FIVE questions All questions carry equal marks

EECS 150 Homework 4 Solutions Fall 2008

Dhanalakshmi College of Engineering

ELECTRONIC CIRCUITS. Time: Three Hours Maximum Marks: 100

Lab 2: Combinational Circuits Design

ICS 151 Final. (Last Name) (First Name)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

De Morgan s second theorem: The complement of a product is equal to the sum of the complements.

Transcription:

Combinational Logic Rab Nawaz Khan Jadoon DCS COMSATS Institute of Information Technology Lecturer COMSATS Lahore Pakistan Digital Logic and Computer Design

2

Combinational logic A combinational circuit consists of logic gates whose outputs at any time are determined directly from the present combination of inputs without regard to previous outputs. A combinational circuit performs a specific information processing operation fully specified logically by a set of Boolean functions. A Combinational circuit consists of input variables, logic gates, and output variables. 3

Combinational logic The logics gate accept signals from the inputs and generate signals to the outputs. This process transforms binary information from the given input data to the required output data.

Design Procedures Starts from the verbal outline of the problem and ends in a logic circuit diagram. The procedure involves the following step, The problem is stated. Input and required output variables are determined. Assigned the variables letter symbols. Make the truth table. The simplified Boolean functions for each output is obtained. The logic diagram is drawn. Combinational logic 5

Adders Combinational logic Adders are important in computers and also in other types of digital systems in which numerical data are processed. An understanding of the basic adder operation is fundamental to the study of digital systems. The most basic operation is no doubt is the addition of two binary digits.

Half Adder The Half Adder The combinational circuit that performs the additions of two bit is called Half adder. One that performs the addition of three bits including two digits and one previous carry is a full adder. Two half adders can be employed to form a full adder.

Half Adder It has two inputs and two outputs. Combinational logic The input variables designates the augends and addend bits; the output variables produces the sum and carry. It is necessary to specify two output variables because the result may consist of two binary digits. A and B are two inputs binary variables while C and S used for carry and Sum to the outputs. 8

Half Adder The half-adder accepts two binary digits on its inputs and produces two binary digits on its outputs, a sum bit and a carry bit. The truth table look like this, Combinational logic A B C out S 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0

Half Adder Combinational logic A half-adder is represented by the logic symbol in Figure below, 10

Half-Adder Logic Half Adder Notice that the output Carry (C out ) is a 1 only when both A and B are 1s; therefore C out can be expressed as the AND of the input variables. C out = AB Now observe that the sum output (Σ) is a 1 only if the input variables. A and B, are not equal. The sum can therefore be expressed as the exclusive-or of the input variables. 11

Half-Adder Logic Related Example The logic implementation required for the half adder function can be developed. The output carry is produced with an AND gate with A and B on the inputs. The sum output is generated with an exclusive-or gate.

Half Adder Half-Adder Logic diagram

Solutions

Full Adder Full Adder The second category of adder is the full-adder. The full-adder accepts two input bits and an input carry and generates a sum output and an output carry. The basic difference between a full-adder and a halfadder is that the full-adder accepts an input carry.

Full Adder Logical symbol for full adder is,

Truth Table Full Adder C in = input carry, sometime designated as CI C out = output carry sometimes designated as CO Σ=sum A and B = input variables (operands)

Full Adder Logic Full Adder The full-adder must add the two input bits and the input carry. From the half-adder you know that the sum of the input bits A and B is the exclusive-or of those two variables, A xor B. For the input carry (C in ) to be added to the input bits. it must be exclusive-ored with A xor B, yielding the equation for the sum output of the full-adder.

Map for Full Adder (For Sum Function) Full Adder x yz S= x y z + x yz + xy z + xyz

Full Adder For Carry Simplified Expression x yz C= xy + xz + yz

Implementation of Full Adder in SOP Logic Diagram

Implementation of Full Adder Implementation of a full adder with two half adders and an OR Gate

Adders

Problem For each of the three full-adders in Figure below, determine the outputs for the inputs shown.

Solution

Quiz

Parallel Binary Adders Two or more full-adders are connected to form parallel binary adders. a single full-adder is capable of adding two 1-bit numbers and an input carry. To add binary numbers with more than one bit, you must use additional full-adders. When one binary number is added to another, each column generates a sum bit and a 1 or 0 carry bit to the next column to the left.

Parallel Binary Adder To add two binary numbers, a full-adder is required for each bit in the numbers. So for 2-bit numbers, two adders are needed. For 4-bit numbers, four adders are used; and so on. The carry output of each adder is connected to the carry input of the next higher-order adder. Notice that either a half-adder can be used for the least significant position or the carry input of a full-adder can be made 0 (grounded) because there is no carry input to the least significant bit position.

Parallel Binary Adder

Parallel Binary Adder In Figure the least significant bits (LSB) of the two numbers are represented by A 1 and B 1. The next higher-order bits are represented by A 2 and B 2. The three sum bits are Σ 1,Σ 2 and Σ 3. Notice that the output carry from the left-most full-adder becomes the most significant bit (MSB) in the sum, Σ 3.

Example Determine the sum generated by the 3-bit parallel adder and show the intermediate carries when the binary numbers 101 and 011 are being added.

Four Bit Parallel Adder A group of four bits is called a nibble. A basic 4-bit parallel adder is implemented with four full-adder stages as shown in Figure.

Logical Symbol for 4 bit Parallel Adder

4 bit parallel adder The input labeled Co is the input carry to the least significant bit adder. C 4 in the case of four bits, is the output carry of the most significant bit adder; and Σ 1 (LSB) through Σ 4 (MSB) are the sum outputs. The 4-bit parallel adder can be expanded to handle the addition of two 8-bit numbers by using two 4-bit adders.

8 Bit Adder Cascading of two 4-bit adders to form an 8-bit adder

Subtractors Subtraction of two binary number is accomplished by taking the complement of the subtrahend and adding it to the minuend. Logically it can be done through direct method. In this method each bit of the subtrahend is subtracted from its corresponding significant minuend bit to form a difference bit. If the minuend bit is smaller then a 1 borrow is taken from the next higher pair of the bits.

Half Subtractor Subtractors It subtract two bits and produces their difference. It also has an output to specify if a 1 has been borrowed. x and y are minuend and subtrahend veriable. For subtraction we check the relative magnitude of the x and y. If x>=y then no issue. If x<y then it is necessary to take a borrow from the next higher stage.

Truth table of half subtractor is, X Y B D 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 Half subtractor D=x y + x y B=x y

Problem Draw a circuit diagram against Difference D and Borrow B.

Full Subtractor It performs a subtraction between two bits, taking in to account that a 1 may have been borrowed by a lower significant stage. It has three inputs and two outputs. Three inputs x, y and z shows the minuend, subtrahend and previous borrow respectively. B and D represents the output borrow and Difference.

Full Subtractor Truth table is as under,

Full Subtractor The function against B and D are,

Code conversion Some times the output of the one system as the input to another. If both the system uses different coding system, then code convertor is needed between them. Thus a code convertor is a circuit that makes the two system compatible. To convert from binary code A to B, Input lines supply the bit combination of elements by Code A and the output lines must generate the corresponding bit combination for code B. 46

Code conversion from BCD to Excess 3 is illustrated below, 47

Outputs Simplification 48

Circuit Diagram 49

Binary to Gray code 50

Gray to Binary 51

Q? Related Problem How many exclusive-or gates are required to convert 8-bit binary to Gray? 52

53