Data Manipulation CSCI130 Instructor: Dr. Imad Rahal.

Slides:



Advertisements
Similar presentations
L14: Boolean Logic and Basic Gates
Advertisements

1 CS/COE0447 Computer Organization & Assembly Language Logic Design.
CENTRAL PROCESSING UNIT
Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, NOT AND OR XOR NAND NOR Truth Tables Boolean.
Hardware Devices and Their Uses Modified excerpt from: GO! with Microsoft ® Office 2003 Brief, 2 nd Edition.
Chapter 4 Gates and Circuits.
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
Digital Fundamentals Floyd Chapter 4 Tenth Edition
Digital Fundamentals with PLD Programming Floyd Chapter 4
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
Chapter 3: Boolean Algebra
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
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.
Chapter 4 Gates and Circuits.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Quiz # 2 Chapters 4, 5, & 6.
Computer Science 1000 Digital Circuits. Digital Information computers store and process information using binary as we’ve seen, binary affords us similar.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Binary Numbers.
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
Boolean Algebra and Digital Circuits
Lecture 7 Topics –Boolean Algebra 1. Logic and Bits Operation Computers represent information by bit A bit has two possible values, namely zero and one.
© Paradigm Publishing Inc. 2-1 Chapter 2 Input and Processing.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /05/2013 Lecture 4: Basics of Logic Design Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Why? What’s Boolean algebra used for? –“The purpose of Boolean algebra is to facilitate the analysis and design of digital circuits.” Express a truth table.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
CSCI-100 Introduction to Computing Hardware Design Part I.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
CSC 110 – Intro to Computing Lecture 9: Computing Components.
Parts of the Computer System
1 BOOLEAN ALGEBRA Basic mathematics for the study of logic design is Boolean Algebra Basic laws of Boolean Algebra will be implemented as switching devices.
Electronic Analog Computer Dr. Amin Danial Asham by.
CS/COE0447 Computer Organization & Assembly Language
5 - Digital Logic with Boolean Algebra
CSC Intro. to Computing Lecture 7: Circuits & Boolean Properties.
Introduction to Computing Systems and Programming 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?
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
 A computer is an electronic device that receives data (input), processes data, stores data, and produces a result (output).  It performs only three.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
1 Binary Signals Logic gate circuits are designed to input and output only two types of signals: “high” (1) and “low” (0), as represented by a variable.
Computer Architecture and Number Systems
Computer Systems Nat 4/5 Computing Science Computer Structure:
CSIS-110 Introduction to Computer Science
Basics of Logic gates - Part 2
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Morgan Kaufmann Publishers
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
CHAPTER 2 Boolean Algebra
CHAPTER 1 : INTRODUCTION
Component 1 – 2A, B, C Binary Logic
Chapter 4 Gates and Circuits.
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Computer Science 210 Computer Organization
Basic Logic Gates 1.
CS/COE0447 Computer Organization & Assembly Language
Fundamentals of Computer Systems
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
Logic Gates.
CS/COE0447 Computer Organization & Assembly Language
Digital Fundamentals Floyd Chapter 4 Tenth Edition
Laws & Rules of Boolean Algebra
COMPUTER ORGANIZATION
Presentation transcript:

Data Manipulation CSCI130 Instructor: Dr. Imad Rahal

Layered Architecture LAYEROrder Application SW: Excel & Access2 High-order P.L.: Visual Basic1 Low-order P.L.: Assembly3 System SW: O.S.3 Machine Language4 Data Representation5 HW: Circuit Design6

0 clock MHz (~3.0 GHz)

Overview of Computer Hardware “necessary” components of a computer CPU, Main memory components needed for convenience computer won’t be very practical to use otherwise Secondary/Auxiliary storage, I/O devices Main memory Connects to the motherboard Divided into two major parts

Overview of Computer Hardware RAM --- Random Access Memory memory registers which store data before/after CPU processing Available for users and programs so store data in and read data from Volatile --- does not persist when no electric power is supplied to its circuits ROM --- Read Only Memory Permanent Holds programs that are vital for the operation of the computer As the name indicates, can be read but never altered CPU Central Processing Unit Single silicon chip with circuits attached to it Known as microprocessor Sits on a circuit board known as the motherboard

Data Manipulation Computing an answer to an equation: 5* – 7 Assume our computer can’t directly multiply, subtract, or raise to power Multiplication task: 1: Get 1 st number, Number_1 2: Get 2 nd number, Number_2 3: Answer = 0 4: Add Number_1 to Answer 5: Subtract 1 from Number_2 6: if Number_2>0, go to step 4 7: Stop

Data Manipulation All tasks done by a general-purpose computer can be accomplished through the following set of operations Input/output Not mentioned in book but important Store data numbers (positive, negative or fractions), text, pictures, etc … Compare data (numbers, pictures, sounds, letters) Add Move data from one storage (memory) location to another Editing a text document

Data Manipulation Adding and comparing bit patterns is sufficient to achieve an “operational” machines Hard-wired vs. programmed This is done by circuits for adding and comparing bit patterns in registers Circuits are made up of logical gates Gates and Truth Tables Gates needed are NOT, AND, and OR NOT Gate: Single input and single output Reverses input 1  0 and 0  1 If there is a strong electric current  shut it off If there is no/weak electric current  turns it on Like a power switch NOT Truth Table ANOT A (A’) 10 01

Data Manipulation AND Gate Accepts two inputs (or more) and yields one output Output is 0 when any input is 0 Requires power coming from both lines in order to give out power AND Truth Table ABA AND B (AB)

Data Manipulation OR Gate Accepts two inputs and yields one output Output is 1 when any input is 1 Requires power coming from at least one of the input lines in order to give out power OR Truth Table ABA OR B A+B

Data Manipulation These three simple gates are combined to create circuits that perform more complicated operations Circuits, in turn, might then be used (thru programs) to perform even more complicated tasks Gate combinations can be expressed in three ways (1) Through Expressions A AND B  AB A OR B  A+B NOT A  A’ A’B’ + AB

(2) Through Circuit diagrams Given an expression Draw a gate after its inputs have been drawn Try A’B’ + AB (3) Through Truth Tables Each of the representations can be derived from the other Derive truth table given expression One column for each letter Make 1 additional column for every sub-expression (order: parentheses, NOTs, ANDs, ORs) NOTANDOR ABA’B’A’B’ABA’B’+AB Enough rows to hold all input combinations 1 letter  2 1 rows 2 letters  2 2 rows 3 letters  2 3 rows n letters  2 n rows

Practice Try A + (A.B’+B.C)’ How many gates? Design circuit Parenthesis, NOT, AND, and then OR Find truth table How many rows?

Data Manipulation given a circuit diagram  expression  truth table Mark every output wire by its label

Sum of Products Method Given a truth table, how to find expression? Sum-of-product method For each row with a 1 in the final column AND letters with a 1 in their column and negation of the letters with a 0 in their column Connect the resulting AND groups with ORs AB? A’B’ A’B Ignore AB  A’B’+A’B+AB  Complicated and UGLY  !!! (requires space, and is costly and slow)

Simplification Why simplify? UGLY  Circuits supposed to be as simple as possible Save on speed (operation execution---fewest gates as possible because every gates slows the operation a bit) (in general) more gates  more time Save space (on motherboard) Notebooks! Save money (not as critical)

Simplification of Expressions Laws of Boolean Algebra Commutative Law A+B = B+A, A.B=B.A E.g. addition and multiplication Distributive Law A.(B+C) = A.B + A.C, E.g. multiplication over addition A+(B.C) = (A+B).(A+C) Idempotency Law A+A = A, A.A=A Double Negation (A’)’ = A E.g. -(-5) = +5 DeMorgan’s Law (A+B)’ = A’.B’, (A.B)’ = A’+B’ Identities A.0 = 0, A+0=A A.1 = A, A+1=1 A.A’ = 0, A+A’ = 1

Simplification of Expressions To simplify (reduce the number of gates) (1) look at two or more terms sharing one or more letters use distributive Law AB + AC = A(B+C) A’B’+A’B+AB // distributive law (#1) A’(B’+B) + AB // identities A’(1) + AB // identities A’ + AB // distributive law (#2) (A’+A)(A’+B) // identities (1)(A’+B) // identities A’+B

Simplification of Expressions A.B’+A’.B’+A’.B Distributive law Idempotency Law Distributive Law B’. (A + A’) + A’.B B’ + A’.B (B’ + A’).(B’ + B) B’ + A’ (B.A)’ Identities Distributive DeMorgans

Simplification of Expressions AB’+B+B’+AB AB’+1 + AB 1 Identities

Simplification of Expressions Distributive law Idempotency Law Distributive Law

Circuit for Equivalence We need to compare the data contents of two registers Data is in binary compare them bit by bit Start right to left Take two inputs If both 0s or 1s, output 1 Otherwise, output a zero A’B’+AB (Sum of products method) Ask yourself: when am I getting a 1?  (A+B)’ +AB (simpler) Draw circuit ABA=B

Circuit for Equivalence

Circuit for Addition