1 Binary Codes Digital systems use 2-state devices that understand only 2 binary values (0 and 1). But we communicate using various symbols and methods.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Digital Logic Design Gate-Level Minimization
ECE 238L Computer Logic Design Spring 2010
Chapter 2 Logic Circuits.
التصميم المنطقي Second Course
ECE 331 – Digital System Design
Gate-Level Minimization. Digital Circuits The Map Method The complexity of the digital logic gates the complexity of the algebraic expression.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Boolean Algebra and Logic Gates
CS 105 Digital Logic Design
Boolean Algebra and Logic Simplification
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
1 Why study Boolean Algebra? 4 It is highly desirable to find the simplest circuit implementation (logic) with the smallest number of gates or wires. We.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
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.
©2004 Brooks/Cole FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter in.
Chapter 2. Outlines 2.1 Introduction 2.2 Basic Definitions 2.3 Axiomatic Definition of Boolean Algebra 2.4 Basic thermos and proprieties of Boolean Algebra.
1 Lecture #7 EGR 277 – Digital Logic Reading Assignment: Chapter 4 in Digital Design, 3 rd Edition by Mano Chapter 4 – Combinational Logic Circuits A)
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
Chapter 3 Gate-Level Minimization
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.
Chap 2. Combinational Logic Circuits
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
Boolean Algebra – II. Outline  Basic Theorems of Boolean Algebra  Boolean Functions  Complement of Functions  Standard Forms.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Logic Circuits Lecture 3 By Amr Al-Awamry. Basic Definitions Binary Operators  AND z = x y = x yz=1 if x=1 AND y=1  OR z = x + y z=1 if x=1 OR y=1 
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22.
BOOLEAN ALGEBRA – Digital Circuit 1 Choopan Rattanapoka.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Combinational Circuit Design. Digital Circuits Combinational CircuitsSequential Circuits Output is determined by current values of inputs only. Output.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
Boolean Algebra ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Dr. Nermin Hamza. Agenda Signed Numbers Properties of Switching Algebra.
CHAPTER 2 Boolean algebra and Logic gates
CHAPTER 3 Simplification of Boolean Functions
ECE 301 – Digital Electronics
Computer Code.
Combinational Logic Design&Analysis.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra.
Unit 2 Boolean Algebra.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
Gate Circuits and Boolean Equations
CHAPTER 2 Boolean Algebra
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Overview Part 1 – Gate Circuits and Boolean Equations
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA
ECE/CS 352 Digital Systems Fundamentals
Lecture 3: Boolean Algebra
Boolean Algebra Why study Boolean Algebra?
CSE 311 Foundations of Computing I
Boolean Algebra.
Boolean Algebra.
Basic Logic Gates 1.
Chapter 2 Boolean Algebra and Logic Gate
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
COMS 361 Computer Organization
ECE 352 Digital System Fundamentals
Boolean Algebra S.SADHISH PRABHU.
Presentation transcript:

1 Binary Codes Digital systems use 2-state devices that understand only 2 binary values (0 and 1). But we communicate using various symbols and methods. Codes are needed to allow us to communicate. Codes translate our language into the computers language and vice versa. Lecture #2 EGR 277 – Digital Logic Reading Assignment: Chapters 1 and 2 in Digital Design, 3 rd Edition by Mano How many bits are needed to encode a set of elements? In general, N bits are needed to encode up to 2 N elements N = log 2 (number of elements)

2 Lecture #2 EGR 277 – Digital Logic Examples: Determine the number of bits required and develop a code to encode each of the following: A) 8 symbols B) symbols C) the 366 days of the year in order D) the 366 days of the year using the month and day

3 byte – group of 8 bits word – an n-bit code forms n-bit words. In a computer system, a certain number of bytes may form a word. For example, a 16-bit system might refer to words as consisting of 2 bytes. Lecture #2 EGR 277 – Digital Logic Decimal Codes – codes used to encode the digits 0 – 9 Several examples are shown below (Table 1-5 from the text) The BCD code is the most common. Know the BCD code for tests. Other codes will be given if needed.

4 Lecture #2 EGR 277 – Digital Logic Gray Code The Gray code is a 4-bit binary code (different from a BCD code in that it encodes all 16 4-bit combinations, not just 10 combinations). This code is interesting in that successive code words only change by one bit. This code is sometimes used with stepper motors. Each time the code increases, only one bit changes, and the stepper motor turns a specified amount (angle).

5 Lecture #2 EGR 277 – Digital Logic Example: Show how a digital voltmeter would convert binary information into BCD format, including the use of binary-to-BCD converters and BCD-to-7- segment decoders. Application: BCD codes are routinely used on equipment to display numerical values. Digital circuits work in binary, but people prefer to read numbers in base 10, so BCD codes are used to convert the data to base 10.

6 Lecture #2 EGR 277 – Digital Logic Error Detection and Correction Codes Extra bits are often added to codewords (using sometimes complex schemes) so that when the word is transmitted, the received can detect if errors occurred in the transmission and possibly correct some of the errors. Parity – perhaps the simplest error detection code involves the addition of a parity bit Discuss even parity vs odd parity Example: Show a BCD code with a trailing odd parity bit. Error Correction Codes - Discuss. Example: Show a simple 2-bit code with extra bits added for error correction.

7 Lecture #2 EGR 277 – Digital Logic Alphanumeric codes Used to encode keyboard symbols and control characters. ASCII and EBCDIC codes are the most common alphanumeric codes. The ASCII code is shown below in Table 1-7 from the text. Since the ASCII code is a 7-bit code, a parity bit is commonly added. Example: Write the word “Digital” using an ASCII code with an even leading parity bit.

8 Lecture #2 EGR 277 – Digital Logic Chapter 2 - Boolean Algebra - comparison to regular algebra Any algebra is built upon: 1) A set of elements 2) A set of operators 3) A set of postulates Boolean Algebra is built upon: 1) A set of elements: {0, 1} 2) A set of operators: {+, } – Define these in class 3) A set of postulates: the Huntington Postulates are the most common Huntington Postulates – The following 6 postulates, along with the set of elements and set of operators shown above, uniquely and completely define Boolean algebra. 1) Closure for the operations {+, } - Discuss

9 Lecture #2 EGR 277 – Digital Logic 2) Two identity elements: - Illustrate by considering all possible values for x A) 0: 0 + x = x + 0 = x B) 1: 1 x = x 1 = x 3) Commutative Laws: - Illustrate by considering all possible values for x and y A) x + y = y + x B) xy = yx 4) Distributive Laws: - Prove by truth table A) x (y + z) = xy + xz B) x + yz = (x + y) (x + z)

10 Lecture #2 EGR 277 – Digital Logic 5) Existence of a Complement: - Illustrate by considering all possible values for x Define by the following truth table: xx’ A) x + x’ = 1 B) x x’ = 0 6) At least two non-equal elements: {0, 1} - Discuss Common Theorems Boolean algebra has already been completely defined. Additional theorems are also often used, not because they are required, but because they are useful. Some of the most common theorems are shown below. Note that each theorem could be formally proven using the postulates. 1) Idempotency: (“same power”) A) x + x = x – Prove this using the postulates B) x x = x Example: Show related examples using this theorem.

11 Lecture #2 EGR 277 – Digital Logic 2) (no name) – Discuss A) x + 1 = 1 B) x 0 = 0 3) Involution: – Discuss x’’ = = x 4) Associative Laws: – Discuss (show logic gate application) A) x + (y + z) = (x + y) + z B) x(yz) = (xy)z 5) DeMorgan’s Theorems: - Prove 5A by truth table A) B) Example: Show related examples using DeMorgan’s theorem.

12 Lecture #2 EGR 277 – Digital Logic 6) Absorption: A) x + xy = x B) x (x+y) = x Example: Show related examples using this theorem. 7) (no name) A) x + x’y = x + y B) x (x’ + y) = xy Example: Show related examples using this theorem. 8) Concensus: A) xy + x’z + yz = xy + x’z B) (x + y)(x’ + z)( y + z) = (x + y)(x’ + z) Example: Show related examples using this theorem.

13 Lecture #2 EGR 277 – Digital Logic Order of operations Example: f = a  b+c  d Note: spacing is often used to make it clearer: f = ab + cd OperationPrecedence ParenthesesHigher NOT  AND  ORLower Boolean Functions – Simplifying Boolean functions corresponds to minimizing the amount of circuitry (logic gates) to be used. Truth table  Boolean function  minimized with Boolean algebra  implement with logic circuits Minimizing Boolean functions No specific rules. In general we use Boolean algebra (postulates and theorems) to reduce the number of terms, literals, logic gates, or IC’s. Literal – a primed (complemented) or unprimed variable Example: How many literals are in the expression f = ab + a’c + bc’d ?

14 Lecture #2 EGR 277 – Digital Logic Examples – Minimize the following Boolean functions: 1) F = AB + A(B + C) + B(B + C) 2) F = AB’(C + BD) + A’B’ 3) F(A,B,C,D) = A + A’BC + C’

15 Lecture #2 EGR 277 – Digital Logic Examples – Minimize the following Boolean functions (continued): 4) F = [(x’y)’ + z’]’ 5)

16 Lecture #2 EGR 277 – Digital Logic Examples – Minimize the following Boolean functions (continued): 6) f(x,y,z) = x’y(z + y’x) + y’z 7)