How computers calculate How binary operations yield complex capabilities.

Slides:



Advertisements
Similar presentations
(CSC 102) Discrete Structures Lecture 5.
Advertisements

ADDER, HALF ADDER & FULL ADDER
EET 1131 Unit 7 Arithmetic Operations and Circuits
Arithmetic Operations and Circuits
Chapter 4 Operations on Bits
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
IT Systems Number Operations EN230-1 Justin Champion C208 –
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
Arithmetic Operations and Circuits Lecture 5. Binary Arithmetic let’s look at the procedures for performing the four basic arithmetic functions: addition,
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Boolean math is the cornerstone of digital communications, whether you are talking computers, PLC, or Cisco Routers on the Internet. ©Emil Decker, 2009.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
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.
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.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Basic Arithmetic (adding and subtracting)
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
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.
1 CMSC 250 Chapter 1, con't., Combinatorial circuits.
1 Adders & Subtractors Adders –An adder is a combinational logic circuit that performs the addition of 2 binary numbers (A & B) to generate the sum (S)
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
Arithmetic Logic Unit (ALU) Anna Kurek CS 147 Spring 2008.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
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.
Boolean Algebra and Logic Gates CSE-1108 Ahsanullah University of Science and Technology (AUST)
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Number Systems and Circuits for Addition – Binary Adders Lecture 6 Section 1.5 Fri, Jan 26, 2007.
CO5023 Introduction to Digital Circuits. What do we know so far? How to represent numbers (integers and floating point) in binary How to convert between.
CPS120: Introduction to Computer Science Computer Math: Addition and Subtraction.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Winter 2016CISC101 - Prof. McLeod1 Today How transistors can carry out commands in a CPU. For example, how to add two integers in an integrated circuit.
Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 1.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic.
Electrical Engineering Engineering the Future Digital Circuits Fundamentals Hands-on Full-Adder Simulation (afternoon)
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.
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.
1 Review of Boolean algebra Not is a horizontal bar above the number –0 = 1 –1 = 0 Or is a plus –0+0 = 0 –0+1 = 1 –1+0 = 1 –1+1 = 1 And is multiplication.
Half-Adder:  A combinational circuit which adds two one-bit binary numbers is called a half-adder. oThe sum column resembles like an output of the XOR.
1 CMSC 250 Circuits. 2 CMSC 250 Find Boolean formula for: p, q & r are the variables. pqroutput
Invitation to Computer Science, C++ Version, Fourth Edition
Dr.Ahmed Bayoumi Dr.Shady Elmashad
CHAPTER 1 : INTRODUCTION
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
CS105 Introduction to Computer Concepts GATES and CIRCUITS
CISC101 Reminders Your group name in onQ is your grader’s name.
Week 7: Gates and Circuits: PART II
Number Systems and Circuits for Addition
Logic Gates.
Logic Gates.
Number Systems Lecture 2.
Logic Circuits I Lecture 3.
XOR Function Logic Symbol  Description  Truth Table 
Presentation transcript:

How computers calculate How binary operations yield complex capabilities

Activity Part 1 Answer the questions in the Before You Start section

Why Digital Not Analog?  What is difference?  Digital is discrete number; analog varies continuously  Analog signals prone to distortion because of large range  Analog signals lose information with every replication and over time

Discussion Question: What are some applications for which you would prefer an analog device? When would a digital device be preferable?

Why Binary not Decimal?  Two options is a lot easier to manage than 10  Switch can be on/off  Less confusion between different settings  Faster

What is Binary?  Only uses digits 1 and 0  So 1+1=10(1+1=2) 10+1=11(2+1=3) 11+1=100(3+1=4) =?([1+8]+[2+8]=19) 10011(1+2+16)

Activity Part 2 Hook up the equipment as shown by your instructor, and answer the first 3 questions in the What type of signal is it? section

What Good is Binary?  Can use numbers to represent letters  Standard code ASCII has 7 binary digits (bits) per character:  e=  !=  Del=  E=

Activity Part 3 Answer questions 4-8 in the What are the properties of the signal? section

Activity Part 4 Answer questions 9-15 in the How do signals from different keys compare? section

Boolean Logic  NOT – the simplest: outputs the opposite of the input.  AND – outputs a 1 only if both of its two inputs are 1.  NAND – outputs a 1 unless both of its two inputs are 1.  OR – outputs 1 if either input is 1.  XOR – outputs 1 if only one input is 1

So how do these do math?  Can create a half-adder and a full adder  Half-adders add two digits and output the unit output and the carry digit  Full -adders add two digits and a carried digit and give the two outputs

Creating a half-adder  An XOR gate can give the unit output:   0   1   1   0  An AND gate can give the carry digit:   0   0   0   1

Creating a full-adder  Combine 2 half-adders and 1 OR:  First half-adder adds two input digits, giving unit and carry digit  Second adds new unit digit with carry input, giving final unit output and carry digit  OR gives carry digit if either half-adder has a carry digit (you will never have carry digits from both)

Adding Ones (2 0 )Twos (2 1 ) So answer is 110, or 6 in decimal representation 1 0 1

Adding large numbers  Start with right-most digits and work left  Number of gates needed grows quickly

An exercise  How many gates needed to add any possible 2-digit decimal integers?  99=1*64+1*32+0*16+0*8+0*4+1*2+1*1  So need to add 2 7-digit binary numbers  Need one half-adder and 6 full-adders  Half-adder has 1 XOR and 1 AND  Full-adders have 2 XOR, 2 AND, 1 OR  Total is 13 XOR, 13 AND, 6 OR

Discussion Question: Think about different mathematical functions you are familiar with. Could you perform each of them using only adders and half-adders? How would you do it?

The Rest of Mathematics  Subtraction, Multiplication, and Division can be performed by combos of Addition and data shifting  Mathematical features such as Taylor sums can be used to express complicated functions using addition.  Data processing boils down to nothing but addition (and storage and shifting).

So what have we learned today?  Computers use digital binary numbers to communicate and calculate  One convention for expressing text as binary numbers is ASCII  Keyboards do not use ASCII, but use a quite different format  Boolean operators can process binary information  AND, NAND, and XOR can be used to create half- adders and full-adders  All mathematical functions can be performed by a series of addition and data shifting

Evaluation Log on to WebCT and answer the 6 questions in the Act02eval quiz