1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2.

Slides:



Advertisements
Similar presentations
Chapter 2 Logic Circuits.
Advertisements

ECE 331 – Digital System Design
Boolean Algebra and Reduction Techniques
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
ECE 331 – Digital System Design
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 3 Dr. Shi Dept. of Electrical and Computer Engineering.
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
ECE 331 – Digital System Design
Digital Fundamentals with PLD Programming Floyd Chapter 4
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
CS 105 Digital Logic Design
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
Chapter 2: Boolean Algebra and Logic Functions
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.
In science, technology, business, and, in fact, most other fields of endeavor, we are constantly dealing with quantities. Quantities are measured, monitored,
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
Digital Electronics. Introduction to Number Systems & Codes Digital & Analog systems, Numerical representation, Digital number systems, Binary to Decimal.
Boolean Algebra and Digital Circuits
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
ECE 331 – Digital System Design
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
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.
6 - 1 Simplification Theorems Useful for simplification of expressions & therefore simplification of the logic network which results. XY + XY' = ( X +
AEEE2031 Data Representation and Numbering Systems.
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.
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
Boolean Algebra and Reduction Techniques
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd Chapter 4 © 2008 Pearson Education.
Module –I Boolean Algebra Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Binary Numbers For digital systems, the.
Chapter 1 : Introduction to Binary Systems 1.1. Introduction to Digital Systems 1.2. Binary Numbers 1.3. Number Base Conversion 1.4. Octal and Hexadecimal.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
1 CS 352 Introduction to Logic Design Lecture 4 Ahmed Ezzat Multi-level Gate Circuits and Combinational Circuit Design Ch-7 + Ch-8.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
Unit 1 Introduction Number Systems and Conversion.
Lecture 1: Introduction and Numbers
ECE 301 – Digital Electronics
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
DIGITAL LOGIC CIRCUITS
Unit 2 Boolean Algebra.
CS 105 Digital Logic Design
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Boolean Algebra – Part 1 ECEn 224.
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Lecture 3: Boolean Algebra
Boolean Algebra.
Digital Systems and Binary Numbers
Digital Fundamentals Floyd Chapter 4 Tenth Edition
Introductory Concepts
CSE 370 – Winter Number syst.; Logic functions- 1
Presentation transcript:

1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2

CS-352Ahmed Ezzat 2 Outline Introduction Number Systems and Conversion Binary Arithmetic Representation of Negative Numbers Binary Codes Basic Boolean Operations Boolean Expressions and Truth Tables Basic Theorems Commutative, Associative, and Distribitution laws Simplification Theorems Multiplying Out & Factoring DeMorgan’s Laws

CS-352Ahmed Ezzat 3 Introduction Digital Systems: works with discrete values, and can be divided into: – System Design: Breaks overall system into subsystems and specify characteristics of each subsystem – Logic Design: Determine how to interconnect basic building blocks to perform a specific function – Circuit Design: Specify interconnection of specific components, such as resistors and transistors, to form a gate, flip-flop, or other logic block

CS-352Ahmed Ezzat 4 Introduction (2) Switching Circuits: A form of digital system, and comes in 2 flavors: – Combinational Circuits: Output values depend only on the present input values and not on past values – Sequential Circuits: Output depend on both the present and past input values

CS-352Ahmed Ezzat 5 Introduction (3) Boolean Algebra describes the relationship between input and output signals mathematically. To be economic, we need to simplify the boolean algebra  Karnaugh map and Quine-McCluskey procedures. Basic memory element used in designing sequential circuit is called Flip/Flop (F/F). F/Fs are the basic building blocks for counters, registers, etc. VHDL is a hardware description language used in the design of Combinational logic, Sequential logic and digital systems. This course is devoted to the study of “Logic Design.”

CS-352Ahmed Ezzat 6 Number Systems and Conversion (1) Decimal numbers are written using positional notations: = 1 x x x x x Any positive integer R (R > 1) can be used as a Radix or base of a number system For base R, then R digits (0, 1, 2, 3, …R-1) digits are needed to represent any number in that base Numbers written in positional notation can be written in a power series of R = 1 x x x x x 2 -2 = ¼ = 5.25

CS-352Ahmed Ezzat 7 Number Systems and Conversion (2) = 1 x x x x x 8 -2 = /64 = F 16 = 3 x x 16 0 = = 63

CS-352Ahmed Ezzat 8 Number Systems and Conversion (3): Converting Decimal Number N  Base R To convert a decimal number N to a base R number: Notice that N = (a n a n-1... a 2 a 1 a 0 ) R N = a n R n + a n-1 R n a 1 R 1 + a 0 Divide N by R to get Q 1 remainder (i.e., a 0 ) N/R = Q 1 = a n R n-1 + a n-1 R n a 2 R 1 + a 1 Divide Q 1 by R to get Q 2 remainder (i.e., a 1 ) Repeat process until a n is found.

CS-352Ahmed Ezzat 9 Number Systems and Conversion (4): Converting Decimal Number N  Base R Convert 53 decimal to a binary number: Check your work!   = 53

CS-352Ahmed Ezzat 10 Number Systems and Conversion (5): Converting Decimal Number N  Base R To convert a decimal fraction F to base R: Notice that F = (.a -1 a a -m ) R Multiply F by R = F * R = a -1 + F 1 Multiply F 1 by R = F 1 * R = a -2 + F 2 Repeat process until a m is found or process repeats.

CS-352Ahmed Ezzat 11 Number Systems and Conversion (6): Converting Decimal Fraction F  Base R Convert to a binary number: = (0.101) = … 2

CS-352Ahmed Ezzat 12 Number Systems and Conversion (7): Converting Between two bases other than Decimal Best to convert source number to decimal first and then convert the decimal number to the new base: e.g., Convert to base 7

CS-352Ahmed Ezzat 13 Number Systems and Conversion (8): Converting Decimal Fraction F  Base R Converting between binary and octal and binary and hexadecimal is easily done by inspection because each octal digit corresponds to exactly three binary digits and each hexadecimal digit corresponds to exactly 4 binary digits. ( ) 2 = ( ) 8 = ( ) 16 (F C 2. 7) 16 = ( ) 2

CS-352Ahmed Ezzat 14 Binary Arithmetic (1) Arithmetic is usually done in binary in digital systems because such logic networks are easier to design. The methods for binary addition, subtraction, multiplication, and division are the same as for decimal addition, etc. except that everything is done in powers of 2. Add in binary: 11  carries = = = 17

CS-352Ahmed Ezzat 15 Binary Arithmetic (2) Subtract 5 from 12 in binary: 111  borrows = =  7

CS-352Ahmed Ezzat 16 Binary Arithmetic (3) Multiply 13 by 5 in binary: 1101 = 13 (multiplicand) x 0101 = 5 (multiplier) = 65

CS-352Ahmed Ezzat 17 Binary Arithmetic (4) Divide (dividend) by (divisor) in binary: Quotient is = 13 10, and remainder is 10 2 = 2 10

CS-352Ahmed Ezzat 18 Representation of Negative Numbers (1) Sign and Magnitude Representation: For an n-bits number, the MSB is the sign bit and the remaining (n-1) bits represents the magnitude. Thus an n-bit word can represent +2 n-1  -2 n-1 integer numbers 2’s Complement and 1’s Complement Representation: is more common because arithmetic operations are easier. Thus an n-bit word can represent +(2 n-1 -1)  0  -2 n-1

CS-352Ahmed Ezzat 19 Representation of Negative Numbers (2)

CS-352Ahmed Ezzat 20 Representation of Negative Numbers (3)

CS-352Ahmed Ezzat 21 Representation of Negative Numbers (4)

CS-352Ahmed Ezzat 22 Representation of Negative Numbers (5)

CS-352Ahmed Ezzat 23 Representation of Negative Numbers (6) 1’s complement addition is similar to 2’s complement addition except that instead of discarding the last carry-bit, it is added to the n-bit (LSB) of the sum in the position furthest to the right.

CS-352Ahmed Ezzat 24 Binary Codes (1) Computers internally use binary, however I/O devices typically use decimal numbers. A Binary-Coded-Decimal (BCD – ) is formed by replacing each decimal digit by its 4-bit binary equivalent: > Excess-3 code is obtained from BCD by adding 3 (0011). The 2-out-of-5 code has exactly 2 bits out of the 5 are 1. Gray code has successive decimal codes differ in only one digit – typically used when transforming analog values into digital form

CS-352Ahmed Ezzat 25 Binary Codes (2)

CS-352Ahmed Ezzat 26 Basic Boolean Operations (1) Basic Mathematics for studying logic design of digital systems is Boolean algebra Basic Operations are AND, OR, and Complement (inverse) Truth Tables list all combinations of inputs and the corresponding outputs for combinational circuits. An AND gate produces a 1 iff all inputs are 1 An OR gate produces a 1 iff one or more inputs are 1 A NOT gate (inverter) produces an output opposite to the input

CS-352Ahmed Ezzat 27 Basic Boolean Operations (2)

CS-352Ahmed Ezzat 28 Basic Boolean Operations (3) Switching Algebra

CS-352Ahmed Ezzat 29 Boolean Expressions and Truth Tables (1) Boolean expression is the application of basic operations to one or more variables (x, y, etc.) or constants (0 or 1)

CS-352Ahmed Ezzat 30 Boolean Expressions and Truth Tables (2) A truth table specifies the values of a Boolean expression for every possible combination of values of the variables in the expression Two expressions are equal iff they have the same truth tables

CS-352Ahmed Ezzat 31 Boolean Expressions and Truth Tables (3) Expressions (AB’ + C) = (A + C)(B’ + C)// equivalent

CS-352Ahmed Ezzat 32 Basic Theorems (1)

CS-352Ahmed Ezzat 33 Basic Theorems (2) The above six axioms completely define switching algebra. All other facts about the system can be proved starting with the axioms.

CS-352Ahmed Ezzat 34 Commutative, Associative and Distributive Laws Commutative law: XY = YX X + Y = Y + X Associative law: (XY)Z = X(YZ) = XYZ (X + Y) + Z = X + (Y + Z) = X + Y + Z XYZ = 1 iff X = Y = Z = 1 X + Y + Z = 0 iff X = Y = Z = 0 Distributive law: X(Y + Z) = XY + XZ X + YZ = (X + Y)(X + Z)

CS-352Ahmed Ezzat 35 Simplification Theorems (1) XY + XY’ = X(X + Y)(X + Y’) = X X + XY = XX(X + Y) = X (X + Y’) Y = XYXY’ + Y = X + Y

CS-352Ahmed Ezzat 36 Simplification Theorems (2)

CS-352Ahmed Ezzat 37 Multiplying Out and Factoring (1) Multiply Out (Sum Of Products): An expression is said to be in sum-of- products form when all products are the products of single variables only. The distributive laws are used to multiply out an expression to obtain a sum- of-products form. Applying 2 nd Distributive law [ (X + YZ) = (X + Y)(X + Z) ] first, when applicable, can reduce the amount of work required to arrive at a simplified sum-of-products form. Example: AB + AC + CD' + E is a sum of products A(B+C) + CD + E' is not a sum of products Multiplying out is a technique that is simpler than traditional multiplication of the given expression

CS-352Ahmed Ezzat 38 Multiplying Out and Factoring (2) Multiplying out:(A + BC)(A + D + E) Assume X = A, Y = BC, Z = D + E Then (X + Y)(X + Z) = X + YZ  A + BC(D + E) = A + BCD + BCE Traditional Multiplication Alternative: (A + BC)(A + D + E) = A + AD + AE + ABC + BCD + BCE = A(1 + D + E + BC) + BCD + BCE = A + BCD + BCE Multiplying out: AB'(C + D) + (C + D)' Assume X = AB’ Y = (C + D)’ and using XY’ + Y = X + Y Then: AB'(C + D) + (C + D)' = XY’ + Y  X + Y = AB' + (C + D)'

CS-352Ahmed Ezzat 39 Multiplying Out and Factoring (3) Multiplying out: (A + B)(B + C)(B + D')(ACD' + E) = (A + B)(B + CD')(ACD' + E) by D2 = (B + ACD')(ACD' + E) by D2 = ACD' + BE by D2 Multiplying out: (A + B')(A + D' + C)(A + D' + B) = (A + B')(A + D' + BC) by D2 = A + B'(D' + BC) by D2 = A + B'D' by D1 Factoring (Product-of-Sums): A + B’CD Assume: X = A, Y = B’, Z = CD = (X +YZ) = (X + Y)(X + Z) = (A + B’)(A + CD) = (A + B’)(A + C)(A + D)

CS-352Ahmed Ezzat 40 Multiplying Out and Factoring (4) Factoring: ABC + A'B'C + CD' = C(AB + A'B') + CD' by D1 = C(AB + A'B' + D') by D1 = C((AB + A')(AB + B') + D') by D2 = C((A + A')(B + A')(A + B')(B + B') + D') by D2 = C((B + A')(A + B') + D') by D2 = C(B + A'+ D')(A + B'+ D') by D2

CS-352Ahmed Ezzat 41 Multiplying Out and Factoring (5) Factoring: ABC + A'B'C = C(AB + A'B') by D1 = C((AB + A')(AB + B')) by D2 = C( (A' + A) (A' + B) (B' + B)(B' + A) ) by D2 = C(A' + B)(B' + A)

CS-352Ahmed Ezzat 42 Multiplying Out and Factoring (6) Factoring: C’D + C’E’ + G’H = C’(D + E’) + G’H by D1 = (C’ + G’H)(D + E’ + G’H) by D2 = (C’ + G’)(C’ + H)(D + E’ + G’)(D + E’ + H) by D2

CS-352Ahmed Ezzat 43 DeMorgan’s Laws (1) DeMorgan's laws: the inverse or complement of any Boolean expression can be found by successively applying the following theorems: (X + Y)' = X'Y' (XY)' = X'+ Y' DeMorgan's laws are generalized as follows: (X 1 + X 2 + X X n )' = X 1 'X 2 'X 3 '... X n ' (X 1 X 2 X 3... X n )' = X 1 '+ X 2 '+ X 3 ' X n '

CS-352Ahmed Ezzat 44 DeMorgan’s Laws (2) Method: Replace each variable with its complement. Replace 0 with 1 and 1 with 0. Replace OR with AND and AND with OR. Note: ANDing takes precedence over ORing. Use parentheses to preserve operation hierarchy in the complemented expression.

CS-352Ahmed Ezzat 45 DeMorgan’s Laws (3) Example: [(a'b + 1)(cd + e') + f(g'+ 0) + h]' = ([a'b + 1]' + [cd + e']') * ([f(g'+ 0)]') * (h') = ([a'b]'0 + [cd]'e) (f'+ [g'+ 0]') h' = ((a + b')0 + (c'+ d')e)(f' + g1)h'

CS-352Ahmed Ezzat 46 DeMorgan’s Laws (4) [(A’ + B)C’]’ = [(A’ + B)’ + C] = AB’ + C [(AB’ + C)D’ + E]’ = [(AB’ + C)’ + D] E’ = [(AB’)’ C’ + D]E’ = [(A’ + B)C’ + D]E’ [A’B + AB’]’ = (A’B)’ (AB’)’ = (A + B’)(A’ + B) = AA’ + AB + A’B’ + BB’ = AB + A’B’

CS-352Ahmed Ezzat 47