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.

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

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.
Digital Circuits.
CSE-221 Digital Logic Design (DLD)
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Gates and Circuits. Three Main Gates  AND  OR  NOT.
CK Cheng Tuesday 10/2/02 CS 140 Lecture 2. Part I. Combinational Logic I) Specification –a. Language –b. Truth Table –c. Boolean Algebra –d. Incompletely.
Lecture 1: Introduction to Digital Logic Design CK Cheng Tuesday 4/1/02.
Combinational circuits
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
XOR, XNOR, and Binary Adders
Computer Science 101 Circuit Design Algorithm. Circuit Design - The Problem The problem is to design a circuit that accomplishes a specified task. The.
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
CS 1308 – Computer Literacy and the Internet. It’s Not Magic  The goal of the next series of lectures is to show you exactly how a computer works. 
Binary Numbers.
1 Introduction to Abstract Mathematics Applications : Digital Logic Circuits 2.4 and Number Systems 2.5 Instructor: Hayk Melikya
Binary Addition CSC 103 September 17, 2007.
Chapter 4 The Building Blocks: Binary Numbers, Boolean Logic, and Gates.
Basic Arithmetic (adding and subtracting)
ECE 3130 – Digital Electronics and Design
Conversion and Coding (12) 10. Conversion and Coding (12) Conversion.
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.
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
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.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Arithmetic Circuits. Half Adder ABSumCarry
Half-Adder: A combinational circuit which adds two one-bit binary numbers is called a half-adder. The sum column resembles like an output of the XOR gate.
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.
Digital Logic Design (CSNB163)
Chapter Four Combinational Logic 1. C OMBINATIONAL C IRCUITS It consists of input variables, logic gates and output variables. Output is function of input.
CS 1308 – Computer Literacy and the Internet Building the CPU.
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
Computer Architecture
Chapter 3 Digital Logic Structures
Simple ALU  Half adder  Full adder  Constructing 4 bits adder  ALU does several operations  General ALU structure  Timing diagram of adder  Overflow.
How does a Computer Add ? Logic Gates within chips: AND Gate A B Output OR Gate A B Output A B A B
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Programming for GCSE Topic 9.2: Circuits for Adding T eaching L ondon C omputing William Marsh School of Electronic Engineering and Computer Science Queen.
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
Computer Science 210 Computer Organization
Combinational Circuits
Computer Architecture CST 250
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
Computer Science 210 Computer Organization
Boolean Algebra.
ECE 301 – Digital Electronics
Week 7: Gates and Circuits: PART II
Digital Logic.
Number Systems and Circuits for Addition
Logic Gates.
Logic Gates.
COMS 361 Computer Organization
Digital Logic.
DIGITAL ELECTRONICS B.SC FY
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Electronics for Physicists
XOR Function Logic Symbol  Description  Truth Table 
Half & Full Subtractor Half Subtractor Full Subtractor.
Chapter 11 (Part 2): Boolean Algebra
Half & Full Subtractor Half Subtractor Full Subtractor.
Presentation transcript:

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 that has a 1. For each such row For each such row – Make a product of all the input variables. – Put bar over each variable with a 0 in this row. Make a sum of all of these product terms. Make a sum of all of these product terms.

One-bit Compare for Equality We want circuit with We want circuit with – Two input lines (1 bit each) – One output line – Output is 1 if the two inputs are equal – Output is 0 if the inputs are not equal Circuit will be referred to as 1-CE for 1 bit compare for equality. Circuit will be referred to as 1-CE for 1 bit compare for equality.

1-CE Design The Boolean expression is _ _ A B + AB The Boolean expression is _ _ A B + AB A B

3-CE We want circuit with We want circuit with – Two 3-bit numbers as input (6 input lines) – One output – Output is 1 only if the two input numbers are equal Using the sum of products would require a table with 64 rows. Using the sum of products would require a table with 64 rows.

3-CE : Use abstraction A1 A2 A3 = B1 B2 B3 only if A1=B1 AND A2=B2 AND A3=B3 A1 A2 A3 = B1 B2 B3 only if A1=B1 AND A2=B2 AND A3=B3 A1 A2 A3 B1 B2 B3 1-CE

Half Adder Circuit For right hand column of binary addition. For right hand column of binary addition. Two 1-bit inputs. Two 1-bit inputs. Output for sum bit (recorded at bottom). Output for sum bit (recorded at bottom). Output for carry bit. Output for carry bit. 1 (carry bit) (sum bit) 1 (carry bit) (sum bit)

Half Adder - Continued Sum: _ _ AB+AB Sum: _ _ AB+AB Carry: AB Carry: AB A B S C

Full Adder Circuit Columns other than right hand column. Columns other than right hand column. Three 1-bit inputs. Three 1-bit inputs. Output for sum bit (recorded at bottom). Output for sum bit (recorded at bottom). Output for carry bit. Output for carry bit. 11 (carry bit) (sum bit) 11 (carry bit) (sum bit)

Full Adder - continued Sum: _ _ _ _ _ _ ABC + ABC + ABC + ABC Carry: _ _ _ ABC+ABC+ABC +ABC

A B C Full Adder - The Circuit Sum Carry

A B C Check A=1, B=1, C=0 Sum Carry

A B C Check A=1, B=1, C=1 Sum Carry

3-bit adder: Use abstraction Circuit to add two 3-bit numbers A1 A2 A3 and B1 B2 B3 Circuit to add two 3-bit numbers A1 A2 A3 and B1 B2 B3 A1 A2 A3 B1 B2 B3 FA HA S1 C S2 C S3 S4