Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO 0101 1010 IO GNDI O Vcc Resister (limits conductivity) Truth Table.

Slides:



Advertisements
Similar presentations
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Advertisements

Digital Circuits.
Hardware Implementations Gates and Circuits. Three Main Gates  AND  OR  NOT.
Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Binary Addition. Binary Addition (1) Binary Addition (2)
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Lecture 3. Boolean Algebra, Logic Gates
Propositional Calculus Math Foundations of Computer Science.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
22C:19 Discrete Math Boolean Algebra & Digital Logic Fall 2010 Sukumar Ghosh.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Chapter 4 Gates and Circuits. 4–2 Chapter Goals Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors.
Gates and Circuits Monday/Wednesday Week 7. Electronic Circuits  Two types of circuit diagrams See pp. 238 in The Analytical Engine by Decker and Hirshfield.
Binary Numbers.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Binary Addition CSC 103 September 17, 2007.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Basic Arithmetic (adding and subtracting)
Binary Addition Section 4.5. Binary Addition Example.
ECE 3130 – Digital Electronics and Design
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Digital Components and Combinational Circuits Sachin Kharady.
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
Basic Arithmetic (adding and subtracting)
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
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.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
1 Arithmetic Logic Unit ALU. 2 The Bus Concept 3 CPU Building Blocks  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Gates & Logic Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens Logic Design Goal:to become literate in most common concepts.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Chapter 3 Digital Logic Structures
LECTURE 4 Logic Design. LOGIC DESIGN We already know that the language of the machine is binary – that is, sequences of 1’s and 0’s. But why is this?
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
WORKING PRINCIPLE OF DIGITAL LOGIC
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
Explain Half Adder and Full Adder with Truth Table.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
L OGIC G ATES Computer Organization – week 3. W HAT ’ S ALU? 1. ALU stands for: Arithmetic Logic Unit 2. ALU is a digital circuit that performs Arithmetic.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Dr.Ahmed Bayoumi Dr.Shady Elmashad
ECE 3130 Digital Electronics and Design
Systems Architecture Lab: Introduction to VHDL
Logic Gates.
Combinational Circuits
Digital Circuits.
Week 7: Gates and Circuits: PART II
Logic Gates.
Digital Logic.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Logic Gates.
Digital Logic.
DIGITAL ELECTRONICS B.SC FY
XOR Function Logic Symbol  Description  Truth Table 
Digital Circuits.
Carryout bit? Carryout bit is ‘1’ also on four cases. When a, b and carryin are 110, 101, 011, 111. Does it mean that we need a similar circuit as sum?
Digital Circuits.
Digital Circuits.
Presentation transcript:

Digital Logic

2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table

3 Abstractions in CS (gates) IO IO Truth Table

4 Abstractions in CS (gates) Basic Gate: NAND (Negated AND) AB Y ABAB Y GNDABY Vcc Truth Table

5 Abstractions in CS (gates) Basic Gate: AND AB Y ABAB Y Truth Table

6 Abstractions in CS (gates) Other Basic Gates: OR gate AB Y ABAB Y Truth Table

7 Abstractions in CS (gates) Other Basic Gates: XOR gate AB Y ABAB Y Truth Table

8 Logic Blocks Logic blocks are built from gates that implement basic logic functions – Any logical function can be constructed using AND gates, OR gates, and inversion.

Adder In computers, the most common task is add. In MIPS, we write “ add $t0, $t1, $t2.” The hardware will get the values of $t1 and $t2, feed them to an adder, and store the result back to $t0. So how the adder is implemented?

Half-adder How to implement a half-adder with logic gates? A half adder takes two inputs, a and b, and generates two outputs, sum and carry. The inputs and outputs are all one-bit values. a bcarry sum

Half-adder First, how many possible combinations of inputs?

Half-adder Four combinations. absumcarry

Half-adder The value of sum should be? Carry? absumcarry

Half-adder Okay. We have two outputs. But let’s implement them one by one. First, how to get sum? Hint: look at the truth table. absum

Half-adder Sum a b sum

How about carry? The truth table is abcarry

Carry So, the circuit for carry is a b carry

Half-adder Put them together, we get a b sum carry

19 1-Bit Adder 1-bit full adder – Also called a (3, 2) adder

20 Constructing Truth Table for 1-Bit Adder

21 Truth Table for a 1-Bit Adder

Sum? Sum is `1’ when one of the following four cases is true: – a=1, b=0, c=0 – a=0, b=1, c=0 – a=0, b=0, c=1 – a=1, b=1, c=1

Sum The idea is that we will build a circuit made of and gates and or gate faithfully according to the truth table. – Each and gate corresponds to one ``true’’ row in the truth table. The and gate should output a ```1’’ if and only if the input combination is the same as this row. If all other cases, the output is ``0.’’ – So, whenever the input combination falls in one of the ``true’’ rows, one of the and gates is ``1’’, so the output of the or gate is 1. – If the input combination does not fall into any of the ``true’’ rows, none of the and gates will output a ``1’’, so the output of the or gate is 0.

24 Boolean Algebra We express logic functions using logic equations using Boolean algebra – The OR operator is written as +, as in A + B. – The AND operator is written as ·, as A · B. – The unary operator NOT is written as. or A’. Remember: This is not the binary field. Here 0+0=0, 0+1=1+0=1, 1+1=1.

Sum

Carryout bit? Carryout bit is ‘1’ also on four cases. When a, b and carryin are 110, 101, 011, 111. Does it mean that we need a similar circuit as sum?

Carryout bit Actually, it can be simpler

Delay Hardware has delays. Delay is defined as the time since the input is stable to the time when the output is stable. How much delay do you think the one-bit half adder is and the one-bit full adder is?

29 1-Bit Adder

32-bit adder How to get the 32-bit adder used in MIPS?

32-bit adder