Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #2 Standard combinational modules: decoders, encoders and Multiplexers 1/3/2005.

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

Modular Combinational Logic
Combinational Circuits
Documentation Standards
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
Fall 2005 L15: Combinational Circuits Lecture 15: Combinational Circuits Complete logic functions Some combinational logic functions –Half adders –Adders.
1 Designing with MSI Documentation Standards  Block diagrams first step in hierarchical design  Schematic diagrams  Timing diagrams  Circuit descriptions.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Operations on data CHAPTER 4.
CS 105 Digital Logic Design
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Computers Organization & Assembly Language
Top-down modular design
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational and Sequential Logic Circuits.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 3.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Digital Electronics and Computer Interfacing Tim Mewes 3. Digital Electronics.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
Combinational Design, Part 3: Functional Blocks
Kuliah Rangkaian Digital Kuliah 6: Blok Pembangun Logika Kombinasional Teknik Komputer Universitas Gunadarma.
Operations on Bits Arithmetic Operations Logic Operations
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
CO UNIT-I. 2 Multiplexers: A multiplexer selects information from an input line and directs the information to an output line A typical multiplexer has.
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 7 Dr. Shi Dept. of Electrical and Computer Engineering.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
CPS3340 Computer Architecture Fall Semester, 2013
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Decoders. A decoder is multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs. Input code with fewer bits than the.
1 Fundamentals of Computer Science Combinational Circuits.
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
ECE 2110: Introduction to Digital Systems
In decimal we are quite familiar with placing a “-” sign in front of a number to denote that it is negative The same is true for binary numbers a computer.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
Integer Operations Computer Organization and Assembly Language: Module 5.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
Computer Organization 1 Data Representation Negative Integers.
Number Representation 1 Lecture 2. Outcomes By the end of the session you should: – Understand what bits/bytes/words are. – Understanding conversion between.
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Decoders.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Computer Architecture & Operations I
Prof. Sin-Min Lee Department of Computer Science
CS221: Digital Logic Design Combinational Circuits 3
Homework Reading Machine Projects Labs
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Decoders.
King Fahd University of Petroleum and Minerals
CSE 370 – Winter 2002 – Comb. Logic building blocks - 1
Programmable Configurations
COE 202: Digital Logic Design Combinational Circuits Part 3
Homework Reading Machine Projects Labs
Digital System Design Combinational Logic
Presentation transcript:

cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #2 Standard combinational modules: decoders, encoders and Multiplexers 1/3/2005

cpe 252: Computer Organization2 Decoders General decoder structure Typically n inputs, 2 n outputs –2-to-4, 3-to-8, 4-to-16, etc.

cpe 252: Computer Organization3 Binary 2-to-4 decoder Note: “x” = (don’t care) cases.

cpe 252: Computer Organization4 Decoder Use – Operation Decoding Microprocessor instruction decoding other fields opcode field instruction 4-input binary decoder En ………. 15 jump load store add decoded instructions

cpe 252: Computer Organization5 2-to-4-decoder logic diagram

cpe 252: Computer Organization6 3-input Binary Decoder E x 2 x 1 x 0 x y 7 y 6 y 5 y 4 y 3 y 2 y 1 y Inputs: x = (x 2, x 1, x 0 ), with x i in {0,1} and E in {0,1} Outputs: y = (y 7,y 6,y 5,…,y 1,y 0 ) with y i in {0,1} Function: yi = E. m i (x), i = 0,1,…,7

cpe 252: Computer Organization7 Implementing functions using a Binary Decoder and OR Gates x 2 x 1 x 0 z 2 z 1 z Function Binary Decoder E 1 x2x1x0x2x1x0 z2z2 z1z1 z0z0 Remember that any function can be represented as a sum of minterms

cpe 252: Computer Organization8 Binary Encoders Only one input I j has value 1 at any given time Output Y corresponds to the binary code of j when I j = 1

cpe 252: Computer Organization9 8-to-3 Binary Encoders Y0 = I1 + I3 + I5 + I7 (odd input indices) Y1 = I2 + I3 + I6 + I7 Y2 = I4 + I5 + I6 + I7 (indices > 3)

cpe 252: Computer Organization10 Multiplexers MUX selection inputs data inputs

cpe 252: Computer Organization11 4-input Multiplexer

cpe 252: Computer Organization12 Typical Multiplexer use selection between multiple paths to a functional unit

cpe 252: Computer Organization13 Multiplexers as universal modules Universal module: using only this module you are able to implement ANY logic function. NAND and NOR gates for example are universal gates. Question: how do you assign inputs for the multiplexer in order to implement a given function?

cpe 252: Computer Organization14 Exercise Implement the following function using: a) 8-input multiplexer. b) 4-input multiplexer. F=  x,y,z (1,2,6,7)

cpe 252: Computer Organization15 Lo’ai Tawalbeh Lecture #2 Signed and Unsigned Numbers

cpe 252: Computer Organization16 4-bit Unsigned Numbers Range of values for n-bit vector is: 0 ≤ x ≤ (2^n-1)

cpe 252: Computer Organization17 Representation of Signed Integers and Basic Operations Two common representations –Sign and Magnitude (SM) –True and Complement (TC) In both cases there is a mapping from signed values to positive values.

cpe 252: Computer Organization18 Sign and Magnitude x represented by a pair (s,m) where – s is the sign: 0 for positive and 1 for negative – m is the magnitude –example: (-23)10 = -(10111) = (1,10111) Range of values for n-bit vector ( n-1 bits for m ) – - (2 n-1 – 1) ≤ x ≤ (2 n-1 – 1) Two representations for zero

cpe 252: Computer Organization19 2’s complement No separation between sign and magnitude Signed integer x represented by positive integer x R such that: Example: n=4, 2^4=16. To represent x = -7; x R = 9 Range of values for n-bit vector ( 2’s comlement) – - (2 n-1 ) ≤ x ≤ (2 n-1 – 1)

cpe 252: Computer Organization20 4-bit Two’s Complement Numbers

cpe 252: Computer Organization21 Change of Sign 1.complement each bit of x 2.add 1 Example: n = 4 x = (0011) 2 = 3 x’ =  representation of -3

cpe 252: Computer Organization22 Positive integer addition/subtraction

cpe 252: Computer Organization23 Two’s complement addition/subtraction Addition: same as positive integer addition –just discard carry out Subtraction: x - y –step 1: change the sign of y to obtain -y –step 2: add x and -y Example: x = 8, y = 5, 5- bit vectors y = y = <<< change sign x - y = << carry out discarded