Computer organization

Similar documents
XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Fundamentals of Digital Design

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

ECE/CS 250 Computer Architecture

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

Chapter 2 Combinational Logic Circuits

Unit 8A Computer Organization. Boolean Logic and Gates

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

CSC9R6 Computer Design. Practical Digital Logic

Floating Point Representation and Digital Logic. Lecture 11 CS301

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

EGC221: Digital Logic Lab

Gates and Flip-Flops

Review: Additional Boolean operations

Chapter 2 Combinational Logic Circuits

Computer Organization: Boolean Logic

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Implementation of Boolean Logic by Digital Circuits

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Intro To Digital Logic

Chapter 3 Combinational Logic Design

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

Boolean Algebra, Gates and Circuits

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

Digital Logic (2) Boolean Algebra

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Combinational Logic. By : Ali Mustafa

Boolean Logic Prof. James L. Frankel Harvard University. Version of 3:20 PM 29-Aug-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved.

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

COMBINATIONAL LOGIC FUNCTIONS

CPE100: Digital Logic Design I

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Exclusive OR/ Exclusive NOR

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

MC9211 Computer Organization

CHAPTER1: Digital Logic Circuits Combination Circuits

Building a Computer Adder

Chapter 2. Digital Logic Basics

ELCT201: DIGITAL LOGIC DESIGN

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

CS61c: Representations of Combinational Logic Circuits

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Systems I: Computer Organization and Architecture

Why digital? Overview. Number Systems. Binary to Decimal conversion

Digital Electronics H H

Chapter 2: Switching Algebra and Logic Circuits

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Experiment 7: Magnitude comparators

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

Logic. Combinational. inputs. outputs. the result. system can

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

COMP2611: Computer Organization. Introduction to Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Lecture 7: Logic design. Combinational logic circuits

A crash course in Digital Logic

Chapter 7 Logic Circuits

Switches: basic element of physical implementations

New Students Day Activity

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

Binary addition example worked out

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Lecture 22 Chapters 3 Logic Circuits Part 1

ELCT201: DIGITAL LOGIC DESIGN

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

EECS Variable Logic Functions

Chap 2. Combinational Logic Circuits

COSC3330 Computer Architecture Lecture 2. Combinational Logic

Chapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction

Sample Marking Scheme

Introduction to Computer Engineering ECE 203

Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker

Sample Test Paper - I

Combinatorial Logic Design Principles

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

211: Computer Architecture Summer 2016

CS/COE0447: Computer Organization

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Logic Design. Chapter 2: Introduction to Logic Circuits

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

Chapter 2 Boolean Algebra and Logic Gates

Cs302 Quiz for MID TERM Exam Solved

Digital System Design Combinational Logic. Assoc. Prof. Pradondet Nilagupta

Transcription:

Computer organization Levels of abstraction Assembler Simulator Applications C C++ Java High-level language SOFTWARE add lw ori Assembly language Goal 0000 0001 0000 1001 0101 Machine instructions/data HARDWARE CPU Memory I/O Functional units CMSC311 Multiplexor Decoder Adder Components Combinational Sequential Circuits You are here AND OR XOR Gates Transistors Wires Electrons Electronics Atomic units

Gates Gates: NOT Mr. Bill! Basic building blocks for circuits Implement boolean functions in hardware Computer engineering: how to build it physically Computer organization: how to design it logically Combinational circuits Output depends only on input Sequential circuits Output depends on input AND current state

Gates: truth tables NOT AND OR XOR NOR NAND XNOR a b ~a ~b a & b a b a ^ b ~(a b) ~(a & b) ~(a ^ b) 0 0 1 1 0 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 0 0 1 How many possible boolean functions of 2 variables? Depends on number of outputs 4 possible inputs --> 16 possible outputs of 1 bit each

Gates: truth tables Unsigned Function Binary Name Gates Inputs a 0 0 1 1 b 0 1 0 1 Outputs 0 0 0 0 0 FALSE 1 0 0 0 1 AND 2 0 0 1 0 a & ~b 3 0 0 1 1 a 4 0 1 0 0 ~a & b 5 0 1 0 1 b 6 0 1 1 0 XOR 7 0 1 1 1 OR 8 1 0 0 0 NOR 9 1 0 0 1 XNOR 10 1 0 1 0 ~b 11 1 0 1 1 a ~b 12 1 1 0 0 ~a 13 1 1 0 1 ~a b 14 1 1 1 0 NAND 15 1 1 1 1 TRUE

Gates: Inverter Inverter: implements NOT function Also known as "negation" or "complement" Input: 1 bit Output: 1 bit Truth table: Input x Output z 0 1 1 0 z = ~x Other notation: z = x' Symbol: Circle indicates negation z = x z = \x

Gates: AND AND gate: implements AND function Input: 2 bits Output: 1 bit Truth table: Input Output x 0 x 1 z 0 0 0 0 1 0 1 0 0 1 1 1 Symbol: z = x 0 & x 1 Other notation: Properties: z = AND (x 0, x 1 ) symmetric: x * y = y * x z = x 0 * x 1 associative: (x * y) * z = x * (y * z) z = x 0 x 1 n inputs: AND n (x 0, x 1,..., x n ) = x 0 * x 1 *... x n

Gates: OR OR gate: implements OR function Input: 2 bits Output: 1 bit Truth table: Input Output x 0 x 1 z 0 0 0 0 1 1 1 0 1 1 1 1 Symbol: z = x 0 x 1 Other notation: Properties: z = OR (x 0, x 1 ) symmetric: x + y = y + x z = x 0 + x 1 associative: (x + y) + z = x + (y + z) n inputs: OR n (x 0, x 1,..., x n ) = x 0 + x 1 +... x n

Gates: NAND NAND gate: implements NAND (negated AND) function Input: 2 bits Output: 1 bit Truth table: Input Output x 0 x 1 z 0 0 1 0 1 1 1 0 1 1 1 0 Symbol: z = x 0 NAND x 1 Properties: symmetric: x NAND y = y NAND x not associative n inputs: NAND n (x 0, x 1,..., x n ) = NOT (x 0 * x 1 *... x n)

Gates: NOR NOR gate: implements NOR (negated OR) function Input: 2 bits Output: 1 bit Truth table: Input Output x 0 x 1 z 0 0 1 0 1 0 1 0 0 1 1 0 Symbol: z = x 0 NOR x 1 Properties: symmetric: x NOR y = y NOR x not associative n inputs: NOR n (x 0, x 1,..., x n ) = NOT (x 0 + x 1 +... x n)

Gates: XOR XOR gate: implements exclusive-or function Input: 2 bits Output: 1 bit Truth table: Input Output x 0 x 1 z 0 0 0 0 1 1 1 0 1 1 1 0 Symbol: z = x 0 ^ x 1 Properties: symmetric: x ^ y = y ^ x associative: (x ^ y) ^ z = x ^ (y ^ z) n inputs: XOR n (x 0, x 1,..., x n ) = x 0 ^ x 1 ^... x n

Gates: XOR properties Truth table: Input Output x 0 x 1 z 0 0 0 0 1 1 1 0 1 1 1 0 Symbol: XOR can be expressed in terms of AND, OR, NOT: x XOR y == ( x AND (NOT y) ) OR ( (NOT x) AND y ) (If x is true, y must be false, and vice versa.) x 0 ^ x 1 ^... x n is true if the number of true values is odd, and false if the number of true values is even. Why? x 0 ^ x 1 ^... x n == (x 0 + x 1 +... x n ) % 2 XOR is the same as the sum modulo 2 x ^ 0 = x XORing with 0 gives you back the same number (identity) x ^ 1 = ~x XORing with 1 gives you the complement x ^ x = 0 XORing a number with itself gives 0

Gates: XOR properties More XOR tricks (amaze your friends!): Classic swap problem (early CMSC 106) temp = x; x = y; y = temp; Using XOR: x = x ^ y ; y = x ^ y ; x = x ^ y ; Let x0 be the original value of x, y0 be the original value of y: x = x ^ y = x0 ^ y0 y = x ^ y = (x0 ^ y0) ^ y0 Substitute for x = x0 ^ (y0 ^ y0) Associative property = x0 ^ 0 x ^ x = 0 = x0 Identity x = x ^ y = (x0 ^ y0) ^ x0 Substitute for x and y = (x0 ^ x0) ^ y0 Associative, symmetric properties = 0 ^ y0 x ^ x = 0 = y0 Identity What other operator is a less-safe way of doing this?

Gates: XNOR XNOR gate: implements XNOR (negated exclusive-or) function Input: 2 bits Output: 1 bit Truth table: Input Output x 0 x 1 z 0 0 1 0 1 0 1 0 0 1 1 1 Symbol: z = x 0 XNOR x 1 = ~(x 0 ^ x 1 ) Properties: symmetric: x XNOR y = y XNOR x associative: (x XNOR y) XNOR z = x XNOR (y XNOR z) n inputs: XNOR n (x 0, x 1,..., x n ) = x 0 XNOR x 1 XNOR... x n

Gates: Buffer Buffer: implements equality function Input: 1 bit Output: 1 bit Symbol: Truth table: Input Output x z 0 0 1 1 This doesn't look very interesting at all! There is a practical reason for it, however: Circuits use electrical signals: 0 and 1 are represented by voltage. If current is too low, it's hard to measure voltage accurately. "Fan out" (number of devices) reduces amount of current. If the current from the AND gate is distributed equally, then each device gets 1/4 the current.

A buffer can be used to "boost" the current back to the right level: The buffer (like all other gates) is an active device; it requires power input to maintain current and voltage. That's all EE stuff, and we're programmers. Why should we care about that?

Gates: Tri-State Buffer A tri-state buffer acts like a valve: controls flow of current. Input: 2 bits Output: 1 bit simplified: active-high Truth table: Input Output Input Output c x z c z 0 0 Z no current 0 Z 0 1 Z 1 x 1 0 0 1 1 1 active-low Input Output When c = 1, the output is equal to x, otherwise there is no output. c z Active-low: Output is x when c = 0. 0 x 1 Z

Circuits Gates may be connected to build circuits Valid combinational circuits The output of a gate may only be attached to the input of another gate. Think of this as a directed edge from output to input. There must be no cycles in the circuit (directed graph). Although the output of a gate may be attached to more than one input, an input may not have two different outputs attached to it (This would create conflicting input signals.) Each input of a gate must come from either the output of another gate or a source. Source: something which generates either a constant 0 or 1. Gate delay Output takes some small amount of time before it changes. Information can travel at most, at the speed of light. Gate delay limits how fast the inputs can change and the output can still have meaningful values.

This document was created with Win2PDF available at http://www.daneprairie.com. The unregistered version of Win2PDF is for evaluation or non-commercial use only.