Fall 2005 L15: Combinational Circuits Lecture 15: Combinational Circuits Complete logic functions Some combinational logic functions –Half adders –Adders.

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

Combinational Circuits
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
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
Tutorial: Wednesday Week 3 Hand in on Monday, Do the questions for tutorials 1 & 2 at the back of the course notes (answers to tutorial 3 will be published.
Arithmetic Operations and Circuits
CSE-221 Digital Logic Design (DLD)
Fall 2007 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.
Lecture 8 Arithmetic Logic Circuits
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Combinational Comparators
Homework Reading Machine Projects Labs
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
IT Systems Number Operations EN230-1 Justin Champion C208 –
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
Logic Gates Combinational Circuits
Building Adders & Sub tractors Dr Ahmed Telba. Introducing adder circuits Adder circuits are essential inside microprocessors as part of the ALU, or arithmetic.
CS 105 Digital Logic Design
Chapter 3: Boolean Algebra
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
Top-down modular design
Combinational Logic Design
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Combinational Circuit – Arithmetic Circuit
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
CS1Q Computer Systems Lecture 9 Simon Gay. Lecture 9CS1Q Computer Systems - Simon Gay2 Addition We want to be able to do arithmetic on computers and therefore.
Digital Components and Combinational Circuits Sachin Kharady.
The Digital Logic Level
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
1/8/ L3 Data Path DesignCopyright Joanne DeGroat, ECE, OSU1 ALUs and Data Paths Subtitle: How to design the data path of a processor.
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
1 CPSC3850 Adders and Simple ALUs Simple Adders Figures 10.1/10.2 Binary half-adder (HA) and full-adder (FA). Digit-set interpretation: {0, 1}
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
ES 244: Digital Logic Design Chapter 4 Chapter 4: Combinational Logic Uchechukwu Ofoegbu Temple University.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Logic and computers 2/6/12. Binary Arithmetic /6/ Only two digits: the bits 0 and 1 (Think: 0 = F, 1.
IT253: Computer Organization
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
CEC 220 Digital Circuit Design
1 Fundamentals of Computer Science Combinational Circuits.
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
1 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Addition and multiplication1 Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
1 CE 454 Computer Architecture Lecture 5 Ahmed Ezzat The Digital Logic, Ch-3.1, 3.2.
Combinational Circuits
Chapter 4 Register Transfer and Microoperations
Swamynathan.S.M AP/ECE/SNSCT
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Week 7: Gates and Circuits: PART II
Programmable Configurations
Number Systems and Circuits for Addition
Thought of the Day To be what we are, and to become
Logic Circuits I Lecture 3.
Combinational Circuits
Electronics for Physicists
Adder Circuits By: Asst Lec. Basma Nazar
Digital Circuits and Logic
Presentation transcript:

Fall 2005 L15: Combinational Circuits Lecture 15: Combinational Circuits Complete logic functions Some combinational logic functions –Half adders –Adders –Multiplexers –Decoders –Parity generators Signal propagation in combinational logic ALUs

Fall 2005 L15: Combinational Circuits Announcement ACM Movie Night 2:00 pm Saturday, Nov 12 Just show up – it’s free! Free Food if you RSVP! Send rsvp to ACM events are open to all cis and pre-cis students

Fall 2005 L15: Combinational Circuits Complete Logic Functions A logic gate is considered to be a complete logic function if we can use just that one type of gate to implement any logic function (i.e., NOT, AND, OR, NAND, and NOR) NAND and NOR functions (each by themselves) are complete logic functions Why would you be interested in complete logic functions or using just one type of logic gate in your design?

Fall 2005 L15: Combinational Circuits NOT AND NAND NAND Represents a Complete Logic Function A A B A B

Fall 2005 L15: Combinational Circuits NAND Represents a Complete Logic Function (cont.) OR NOR A B A B

Fall 2005 L15: Combinational Circuits Example A’ + B’ + C Circuit design using NOTs and ORs “Brute force” substitution of NAND gates We can make it a little simpler - how about applying DeMorgan’s Law first? A’ + B’ = (AB)’

Fall 2005 L15: Combinational Circuits Another Example AB + B’C A B C

Fall 2005 L15: Combinational Circuits Combinational Logic and Digital Devices Now that we’ve learned how to implement a logic expression in a logic-gate-level design, we can start putting those functions together to form more complex (and useful!) functions Digital logic that is designed so that the outputs are dependent only upon the current set of inputs is called COMBINATIONAL LOGIC

Fall 2005 L15: Combinational Circuits Examples of Combinational Digital Logic Functions Multiplexers Decoders Parity Generators Adders –Half adders –Full adders –32-bit adders Shifters Comparators Arithmetic Logic Units

Fall 2005 L15: Combinational Circuits Half Adder Consists of: –2 inputs –2 outputs Sum Carry Used for basic integer addition ( 1 bit) Input A Carry Input B Sum

Fall 2005 L15: Combinational Circuits Half Adder Logic Design A B Sum Carry

Fall 2005 L15: Combinational Circuits Full Adder Consists of: –3 inputs A B Carry in –2 outputs Sum Carry out Typical application: link together multiple full adders to add integers containing more than one bit Input A Sum Input B Carry In Carry Out

Fall 2005 L15: Combinational Circuits Full Adder Logic Design A B Sum Carry Out Carry In

Fall 2005 L15: Combinational Circuits Integer Addition Using Full Adder Circuits Full Adder A1A1 B1B1 Sum 1 Carry OutCarry In Full Adder A0A0 B0B0 Sum 0 Carry OutCarry In “0” Adding two binary numbers, each containing two bits C 1 C 0 A(A 1,A 0 ) +B(B 1,B 0 ) _____________ Sum(C 1,S 1,S 0 )

Fall 2005 L15: Combinational Circuits Longer Chains of Adders Add Longer Integers Full Adder A3A3 B3B3 Sum 3 Carry Full Adder A2A2 B2B2 Sum 2 Carry Full Adder A1A1 B1B1 Sum 1 Carry Full Adder A0A0 B0B0 Sum 0 Carry “0”

Fall 2005 L15: Combinational Circuits Multiplexers Consist of: –2 n data inputs –One output –n control inputs Used to control the selection of a single output from n different inputs Typical application: parallel to serial converter D0D0 D1D1 D2D2 D3D3 A B Out 4 input multiplexer

Fall 2005 L15: Combinational Circuits Decoders Consist of: –n inputs –2 n outputs Used to select a single (one) output line Typical application: selecting a memory chip D0D0 D1D1 D2D2 D3D3 A B 2 to 4 decoder

Fall 2005 L15: Combinational Circuits Parity Generator Consist of: –n inputs –1 output Used to create a parity bit for a given set of inputs A B Output C D Even parity for 4 inputs

Fall 2005 L15: Combinational Circuits Arithmetic Logic Units (ALUs) The ALU is the math engine for modern digital computers

Fall 2005 L15: Combinational Circuits A Very Simple ALU Performs four functions: A.AND. B (A & B) //bitwise AND A.OR. B (A | B) //bitwise OR NOT.B (~ B) //bitwise NOT A + B (A + B) //addition operator Operates on single bits “A” and “B”

Fall 2005 L15: Combinational Circuits Block Diagram for a Very Simple, 1-Bit ALU Logic Unit (AND, OR, NOT) A B Full Adder 2 to 4 Decoder Output Carry Out Carry In Enable A Enable B Inv A F1 F0 Sum A B En OR En AND En NOT En ADD A B

Fall 2005 L15: Combinational Circuits 1-Bit Slice ALU Example Four Functions (AND, OR, NOT B, ADDITION) for single bits A i and B i Inputs –INV A Inverse of A i –AThe single bit A i –ENAEnable the A input –BThe single bit B i –ENBEnable the B input –FOControl signal 0 –F1Control signal 1 –Carry InCarry-in signal (usually the carry out signal from the previous state) Outputs –OutputResult of ALU computation –Carry OutCarry out signal from full adder circuit

Fall 2005 L15: Combinational Circuits Control Signals F0 and F1 What do the control signals F0 and F1 do? Both signals go into the 2 to 4 decoder Between the two signals, one of the four ALU functions is selected to be the ALU’s output F0 Output Function 0 A AND B A + B 1 F1 0 A OR B NOT B

Fall 2005 L15: Combinational Circuits Putting together digital logic functions Connect “n” 1-bit ALUs to create 1 n-bit ALU 1-bit ALU slice A n-1 B n-1 Output n-1 1-bit ALU slice A1A1 B1B1 Output 1 1-bit ALU slice A0A0 B0B0 Output 0 1-bit ALU slice A n-2 B n-2 Output n-2 Carry out n-2

Fall 2005 L15: Combinational Circuits More Complex ALUs ALUs in modern CPUs can include more functions than the four we just put together For example, other functions that might be useful: –multiply –shift –compare

Fall 2005 L15: Combinational Circuits How would you get the ALU to subtract two integers? A – B Think about the two’s complement procedure 1.NOT B (take the complement of B) 2.NOTB + 1 (add one to the result of step 1) 3.(NOTB + 1) + A (add A to the result of step 2) 4.Ignore any carry out signals

Fall 2005 L15: Combinational Circuits What additional function would we need to be able to multiply and divide integers? Shifters (left shift and right shift) Multiplication and division can be thought of as “shift and add” or “shift and subtract” procedures We don’t have time to build a multiplier, but this should give you the intuition for how it could be done.