1 Fundamentals of Computer Science Combinational Circuits.

Slides:



Advertisements
Similar presentations
Modular Combinational Logic
Advertisements

Logical Design.
Combinational Circuits
Functions and Functional Blocks
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
التصميم المنطقي Second Course
Arithmetic Operations and Circuits
ECE 331 – Digital System Design
Fall 2005 L15: Combinational Circuits Lecture 15: Combinational Circuits Complete logic functions Some combinational logic functions –Half adders –Adders.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Computer Arithmetic, Multiplexers Prof. Sin-Min Lee Department of Computer Science.
Lecture 8 Arithmetic Logic Circuits
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
CS 105 Digital Logic Design
CS 151: Digital Design Chapter 3 3-8: Encoding. CS 151 Encoding Encoding - the opposite of decoding - the conversion of a maximum of 2 n input code to.
Combinational Logic Design
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
Chap 3. Chap 3. Combinational Logic Design. Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Digital Arithmetic and Arithmetic Circuits
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
CHAPTER 4 Combinational Logic
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Combinational Circuits
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
CS151 Introduction to Digital Design
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Addition, Subtraction, Logic Operations and ALU Design
CEC 220 Digital Circuit Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
Combinational Circuit Design. Digital Circuits Combinational CircuitsSequential Circuits Output is determined by current values of inputs only. Output.
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
Number Representation (Part 2) Computer Architecture (Fall 2006)
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Mu.com.lec 11.  Used not only to perform addition but also to perform subtraction, multiplication and division  The most basic of the adders is the.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Chap 3. Combinational Logic Design
Combinational Circuits
Prof. Sin-Min Lee Department of Computer Science
CS221: Digital Logic Design Combinational Circuits 3
Combinational Logic Circuits
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Chapter 4 Combinational Logic
FIGURE 4.1 Block diagram of combinational circuit
Programmable Configurations
COMS 361 Computer Organization
Logic Circuits I Lecture 3.
ECE 352 Digital System Fundamentals
Combinational Circuits
Chapter-4 Combinational Logic
Digital System Design Combinational Logic
Arithmetic Circuits.
Presentation transcript:

1 Fundamentals of Computer Science Combinational Circuits

2 What is a Combinational Circuit? Logic circuits for digital systems may be classified as either combinational or sequential. A combinational circuit consists of logic gates whose output(s) at any time are based exclusively on the values of external inputs. Combinational Circuit inputs outputs

3 What is a Sequential Circuit? A sequential circuit consists of logic gates whose output(s) at any time are based on the values of external input(s) and internally generated input(s). Sequential circuits are used to implement memory elements. Sequential Circuit inputs outputs

4 Predefined Circuits In programming there are certain functions that are so commonly used across different software systems that they are packaged in libraries of routines that are included with program translators. In this way programmers do not constantly have to “reinvent the wheel”. In hardware design there are certain circuits that are so commonly used across different hardware systems that they are manufactured in advanced and used as needed as building blocks in larger hardware systems. We will look at several of these circuits in this section.

5 Multiplexors A multiplexor is a combinational circuit that selects binary information from one of many lines (D) and directs the information to a single output line. The signal selected is determined by a set of input variables called selectors (S). 4-to-1 Multiplexor D0D0 Y D1D1 D2D2 D3D3 S1S1 S0S0

6 Implementation of 4-to-1 Line Multiplexor

7 Demultiplexors A demultiplexor is a combinational circuit that routs binary information from a single data line and directs the information to one of several output lines. The output line is determined by a set of input variables called selectors (S). A demultiplexor doubles as a decoder with enable. 1-to-4 Demultiplexor D0D0 Enable / Data D1D1 D2D2 D3D3 S1S1 S0S0

8 Implementation of 1-to-4 Line Demultiplexor S 1 S 0 D 3 D 2 D 1 D E E E E 0 0 0

9 Decoder A decoder is a combinational circuit that converts binary information from n coded inputs to a maximum of 2 n unique outputs. 3-to-8 Decoder D0D0 D1D1 D2D2 D3D3 A0A0 D4D4 D5D5 D6D6 D7D7 A1A1 A2A2

10 Implementation of 3-to-8 Line Decoder

11 Encoder A encoder is a combinational circuit that performs the inverse operation of a decoder. It will have 2 n or fewer input lines and n outputs. At any given time only one of the input lines will be high. If multiple inputs are high, the circuit will perform improperly. 8-to-3 Encoder D0D0 D1D1 D2D2 D3D3 A0A0 A1A1 D4D4 D5D5 D6D6 D7D7 A2A2

12 Octal to Binary Encoder Truth table for an octal to binary encoder.

13 Priority Encoder A priority encoder allows for the possibility that multiple inputs will be high simultaneously. –Each input is assigned a fixed priority, if multiple inputs are high simultaneously the one with the highest priority will determine the output of the encoder Truth table for an base four to binary encoder with a valid output indicator, V. –This is an example of a condensed truth table.

14 Priority Encoder Simplification of a base four to binary priority encoder.

15 Full Adder A full adder is a combinational circuit that sums three 1-bit binary numbers. Full adders are typically connected in series via their C IN and C OUT lines in order to sum two multi- digit binary numbers. –C stands for carry. Full Adder A0A0 C IN B0B0 S0S0 C OUT

16 Simplification of Carry Out Function in Full Adder

17 Simplification of Significant Digit Function in Full Adder

18 4-Bit Ripple Carry Adder Ripple Carry Adders suffer from propagation delay. This is a major problem if the adder is large.

19 Propagation Delay for an Inverter Gate

20 4-Bit Carry Lookahead Adder Carry Lookahead Adders are used to reduce the amount of propagation delay during addition of large values.

21 2’s Complement Representation Most modern computers use 2’s complement representation to store signed integers. The high-order bit of an integer stored in 2’s complement representation will contain a 0 if the number is positive and a 1 if the number is negative. By taking the 2’s complement of an integer you are effectively multiplying the number by -1. –The 2’s complement of a positive integer results in its negative representation. –The 2’s complement of a negative integer results in its absolute value.

22 2’s Complement Representation Taking the 2’s complement of an integer is a 2-step process. –Step 1 - Flip all the bits in the number (0’s become 1’s and 1’s become 0’s). This is also known as taking the 1’s complement of the number. –Step 2 - Add 1 to the 1’s complement representation of the number). In the process of adding 1, any carry out of the high-order position is lost. This is normal and not a problem in the world of computer arithmetic.

23 2’s Complement Representation Assume we are storing a positive 9 in a one-byte (8- bit field) using 2’s complement representation. In binary it would appear as Now, take the 2’s complement of the number. –Step 1 - flip the bits –Step 2 - add The result, , is the 2’s complement representation of -9. If we were to take the 2’s complement of (-9), we would get (+9).

24 2’s Complement Arithmetic To confirm that really does represent -9, we should be able to add it to +9 and get a result of 0. Remember we are doing binary addition: = (-9) (+9) (0) As pointed out earlier, a carry out of the high-order position is lost.

25 Adder-Subtractor Circuit Most ALUs do not have a separate set of integer subtraction circuitry. Instead, subtraction is performed in terms of addition. For example, A - B would be performed as A + (-B). If S is high B is subtracted from A. If S is low B is added to A.

26 Carry-Overflow Detection If the carry out of the high-order bit (C n ) is different from the carry into the high-order bit (C n-1 ) then overflow (V) has occurred. –Overflow detection is significant when doing arithmetic on signed numbers. C is equal to the value of C n. –Carry detection is significant when doing arithmetic on unsigned numbers.