1 Boolean Logic & Number Systems Today: Some Announcements First Hour: Introduction to Logic –Section 1.2, 1.3 of Katz’s Textbook –In-class Activity #1.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

EET 1131 Unit 7 Arithmetic Operations and Circuits
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
DATA REPRESENTATION CONVERSION.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Assembly Language and Computer Architecture Using C++ and Java
Assembly Language and Computer Architecture Using C++ and Java
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
Canonical Forms and Logic Miniminization
1 CSE-221 Digital Logic Design (DLD) Lecture-1: Digital Systems & Number Systems.
Binary, Decimal, & Hexadecimal Numbers
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
Dr. Bernard Chen Ph.D. University of Central Arkansas
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
CS231 Fundamentals1 Fundamentals What kind of data do computers work with? – Deep down inside, it’s all 1s and 0s What can you do with 1s and 0s? – Boolean.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Numeral Systems Subjects: Numeral System Positional systems Decimal
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Binary Numbers.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
Basic Arithmetic (adding and subtracting)
Logic and Digital System Design - CS 303
Fundamentals of IT UNIT-I OnlyforIPMCA. DIGITAL SIGNALS & LOGIC GATES Signals and data are classified as analog or digital. Analog refers to something.
CS1Q Computer Systems Lecture 9 Simon Gay. Lecture 9CS1Q Computer Systems - Simon Gay2 Addition We want to be able to do arithmetic on computers and therefore.
1 DLD Lecture 18 Recap. 2 Recap °Number System/Inter-conversion, Complements °Boolean Algebra °More Logic Functions: NAND, NOR, XOR °Minimization with.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Number systems, Operations, and Codes
Digital Logic Lecture 2 Number Systems
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.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
ITEC 1011 Introduction to Information Technologies 1. Number Systems Chapt. 2 Location in course textbook.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Binary Numbers For digital systems, the.
Number Representation and Arithmetic Circuits
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
Binary Arithmetic, ASCII, & Boolean Algebra
Number Representation (Part 2) Computer Architecture (Fall 2006)
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 1.
1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
©2010 Cengage Learning SLIDES FOR CHAPTER 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use.
UNIT 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Digital Logic and Computer Organization
Octal to Decimal Decimal Octal Binary Hexadecimal.
Digital Systems and Number Systems
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
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.
ELL100: INTRODUCTION TO ELECTRICAL ENGG.
Number Systems Decimal (base 10) { }
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
ECE 301 – Digital Electronics
CMSC250 Fall 2018 Circuits 1 1.
Copyright © Cengage Learning. All rights reserved.
XOR Function Logic Symbol  Description  Truth Table 
Presentation transcript:

1 Boolean Logic & Number Systems Today: Some Announcements First Hour: Introduction to Logic –Section 1.2, 1.3 of Katz’s Textbook –In-class Activity #1 Second Hour: Number Systems –Appendix A.1 and A.2 of Katz’s Textbook –In-class Activity #2

2 Some Announcements An electronic copy of Katz’s textbook is on the website! Wait-listed students can now login –User name = ecse2610_stu –Password = ecse2610_stu

3 Truth Tables XYX ORY X NOTX XY X ANDY Z = X Y = X Y Z = X + Y Z = X Boolean Equations Inverter ZX OR XYXY Z AND XYXY ZGates

4 Example Truth Tables Half adder adds two binary digits to form Sum and Carry AB SumCarry Sum equals A plus B (modulo 2) Carry equals (A plus B minus Sum)/2 Sum equals A plus B (modulo 2) Carry equals (A plus B minus Sum)/2 Full adder adds two binary digits and Carry in (Cin) to form Sum and Carry Out (Cout) A B Cin Sum Cout Sum equals A plus B plus Cin (modulo 2) Carry equals (A plus B plus Cin minus Sum)/2 Sum equals A plus B plus Cin (modulo 2) Carry equals (A plus B plus Cin minus Sum)/2

5 Truth Tables to Equations Carry 0 1 A0011A0011 B0101B0101 Sum Sum = A B + A B Carry = A B Step 1: Identify each truth table row where the function value is 1 Step 2: Construct (ANDed) product terms of the inputs for these rows If input variable is 0, it appears in complemented form If 1, it appears un-complemented Step3: “OR” together these product terms Half adder

6 Full Adder Example Cout A A B B Cin Sum Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin + A B Cin + A B Cin

7 1 1 Equations to Truth Tables Consider: Consider: Cout = A Cin + B Cin + A B Verify the equivalence of this Boolean equation: compare this Cout with the original Cout truth table Verify the equivalence of this Boolean equation: compare this Cout with the original Cout truth table Notice This row is covered 3 times Each product term in the equation covers exactly two rows in the truth table Put a 1 in each row where product term is true Fill in rest of Cout with 0s CoutA Cin B

8 Equations to Circuits Carry = A B Half Adder A B Sum Carry A BA B Sum = A B + A B A BA B B A A BA B

9 Full Adder Cout = A B Cin + A B Cin + A B Cin + A B Cin Sum = A B Cin + A B Cin + A B Cin + A B Cin Notation: \A = A, etc.

10 Equivalent Circuits Cout = A Cin + B Cin + A BCout = A B Cin + A B Cin + A B Cin + A B Cin 

11 Some Practicalities "Rules of Composition" place limits on fan-in/fan-out Fan-out number of inputs a gate output is connected to Fan-in number of inputs available on a gate

12 Do Activity #1 Now Reference: –Section 1.2, 1.3 of Katz Textbook

13 Most modern computers use logic circuits that exhibit two states (binary digital) Large binary numbers are unwieldy, so alternative representations are used. Hexadecimal numbers are a compromise between efficient representation and conversion to a more natural (to most humans) decimal system. It is important to understand these other bases when designing hardware and software. Computers and Numbers

14 Notation Unless otherwise noted, the default base for quantities is decimal (base 10) Subscripts following a quantity indicate the base Examples: is base 10 or decimal, so is is base 16 or hexadecimal is base 2 or binary Other notation (used later on in this course): %101 is binary $123 is hexadecimal

15 Uses 10 digits [ 0, 1, 2,... 9 ] Decimal Numbers In general: N =  N i x 10 i where N i  [0, 1, 2,...8, 9], where N i are the weights and the base of the number system is raised to the exponent i. Note: decimal fractions occur when i is negative 0.35 = 3 x x In general: N =  N i x 10 i where N i  [0, 1, 2,...8, 9], where N i are the weights and the base of the number system is raised to the exponent i. Note: decimal fractions occur when i is negative 0.35 = 3 x x Positional Number Notation Weight of digit determined by its position. Positional Number Notation Weight of digit determined by its position. Example: 246= = 2 x x x 10 0

16 Binary Numbers Uses 2 digits [ 0 & 1 ] Example: = = 1 x x x x x x 2 0 = 1 x x x x x x 1 = In general: N =  N i x 2 i where N i  [0, 1]. Note: binary fractions occur when i is negative = 1x x 2 -2 = = In general: N =  N i x 2 i where N i  [0, 1]. Note: binary fractions occur when i is negative = 1x x 2 -2 = = Positional Number Notation

17 Hexadecimal (Hex) Numbers Example: 89AB 16 = A B 16 = 8 x x A x B x 16 0 = 8 x x x x 1 = Uses 16 digits [ 0, 1, 2,... 9, A, B, C, D, E, F ] In general: N =  N i x 16 i where N i  [0, 1, 2,..., 9, A, B, C, D, E, F]. Note: hexadecimal fractions occur when i is negative 0.9A 16 = 9 x x = = In general: N =  N i x 16 i where N i  [0, 1, 2,..., 9, A, B, C, D, E, F]. Note: hexadecimal fractions occur when i is negative 0.9A 16 = 9 x x = = Note: A - F represent the decimal values of , respectively. Positional Number Notation

18 Conversion Among Bases Conversion from any base to decimal: Use positions and weights ! Eg: Decimal value =  N i x B i where N i  [0, 1, 2,... N B-1 ] (  means “sum of”) Eg: 89AB 16 = 8 x x x x 1 = Conversion among the 2 n bases (binary, hexadecimal, octal, etc.): First convert to binary (base 2) & then regroup into n bits Then convert the groups of bits into the proper digits.

19 Memorize this table!!! It makes conversions between hexadecimal and binary trivial Hexadecimal  Binary HexBinaryDecimal A B C D E F HexBinaryDecimal A B C D E F Example: convert  hexadecimal Group by 4s, starting at the right  expand into 4 bit groups  C D 16 Example: convert  hexadecimal Group by 4s, starting at the right  expand into 4 bit groups  C D 16

20 Decimal  Binary Example: 57  2 =28,remainder = 1 (binary number will end with 1) 28  2 =14,remainder = 0 14  2 =7,remainder = 0 7  2 =3,remainder = 1 3  2 =1,remainder = 1 1  2 =0,remainder = 1 (binary number will start with 1) Therefore, collecting the remainders, = (((((0x2 + 1)x2 + 1)x2 + 1)x2 +0)x2 +0)x2 +1 = 1x32 + 1x16 + 1x8 + 0x4 + 0x2 + 1x1 = 57 (check: = 57) Based on the remainders after dividing the decimal number repeatedly by 2. If the decimal number is even, the corresponding binary number will end in a 0, and if it is odd, the binary number will end in a 1, and so on. Based on the remainders after dividing the decimal number repeatedly by 2. If the decimal number is even, the corresponding binary number will end in a 0, and if it is odd, the binary number will end in a 1, and so on. Successive Division: Successive Division: an easy way to convert Decimal to Binary

21 Decimal  Hex Example: / 16=2202,remainder = 11  B(hex number will end with B) 2202 / 16=137,remainder = 10  A 137 / 16=8,remainder = 9 8 / 16 =0, remainder = 8(hex number will start with 8) Therefore, collecting the remainders, = 89AB 16 (check: 8 x x x = 35243) Successive Division: Successive Division: an easy way to convert Decimal to Hexadecimal Based on the remainders after dividing the decimal number by higher powers of 16. Notice how simple this method is

22 Hex  Decimal Example: BA89  B x A x x (CAUTION: mixed bases) = 11 x x x = = We can check by converting back to hex: / 16 = remainder, / 16 = remainder, / 16 = 11 + remainder, 10  A 11 / 16 = 0 + remainder, 11  B   BA89 16 Multiplication: Multiplication: an easy way to convert Hexadecimal to Decimal Multiply the hexadecimal weights by powers of 16.

23 Binary  Decimal Compare:  (exploiting the binary weights) = =  D6 16  13 x = = Multiplication: Multiplication: an easy way to convert Binary to Decimal We can multiple the binary weights by powers of 2. However, sometimes it is just as easy to convert the binary number to hexadecimal first and and then into decimal. We can multiple the binary weights by powers of 2. However, sometimes it is just as easy to convert the binary number to hexadecimal first and and then into decimal.

24 Do Activity #2 Now Due: End of Class Today RETAIN THE LAST PAGE (#3)!! For Next Class: Bring Randy Katz Textbook –Course website has an electronic copy available. Required Reading: – Sec A.1, A.2, 2.1, 2.2 (up to 2.2.4) of Katz This reading is necessary for getting points in the Studio Activity! Studio Session #2 Tuesday/Wednesday