ECE- 1551 DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.

Slides:



Advertisements
Similar presentations
KFUPM COE 202: Digital Logic Design Number Systems Part 3 Courtesy of Dr. Ahmad Almulhem.
Advertisements

HEXADECIMAL NUMBERS Code
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.
ECE 331 – Digital System Design
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
CS 151 Digital Systems Design Lecture 4 Number Codes and Registers.
EECC341 - Shaaban #1 Lec # 3 Winter Binary Multiplication Multiplication is achieved by adding a list of shifted multiplicands according.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
Mantıksal Tasarım – BBM231 M. Önder Efe
9/15/09 - L3 CodesCopyright Joanne DeGroat, ECE, OSU1 Codes.
1.6 Signed Binary Numbers.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Digital Systems and Binary Numbers
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
Logic and Digital System Design - CS 303
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Binary Codes. Binary Code A binary code is just an assignment of information to bit patterns.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
UNIVERSAL COLLEGE OF ENGINEERING AND TECHNOLOGY PREPARED BY:- Chirag Parmar ( ) Kashish Soni ( ) Maitrey Bhatt( )
Yuh-Jzer JoungDigital Systems1 Number Systems decimal number : 7397=7× × × ×10 0 a 4 a 3 a 2 a 1 a 0. a -1 a -2 = a 4 ×10 4 +a 3 ×10.
CS151 Introduction to Digital Design
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
ECE 3110: Introduction to Digital Systems BCD, Gray, Character, Action/Event, Serial Data.
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Summer 2012ETE Digital Electronics1 Binary Arithmetic of Signed Binary Numbers.
ECE 2110: Introduction to Digital Systems BCD, Gray, Character, Action/Event, Serial Data.
Complements and Codes by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano  Programmable Controllers-Theory and Implementation,
ECE 3110: Introduction to Digital Systems unsigned Multiplication/Division codes.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
ECE 301 – Digital Electronics Representation of Negative Numbers, Binary Arithmetic of Negative Numbers, and Binary Codes (Lecture #11) The slides included.
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The necessity and advantages of coding  The variety of coding systems You will learn: 2.
Chapter 1: Binary Systems
Module –I Codes: Weighted and non-weighted codes
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Digital Logic & Design Adil Waheed Lecture 03. Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
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)
ECE DIGITAL LOGIC LECTURE 11: STANDARD CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 09/24/2015.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
Dr. Nermin Hamza. Agenda Signed Numbers Properties of Switching Algebra.
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.
N 3-1 Data Types  Binary information is stored in memory or processor registers  Registers contain either data or control information l Data are numbers.
Number Systems By, B. R. Chandavarkar CSE Dept., NITK, Surathkal.
Chapter 1 Digital Systems and Binary Numbers
ECE 2110: Introduction to Digital Systems
Lecture No. 4 Number Systems
Chapter 1 Digital Systems and Binary Numbers
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Data Representation Data Types Complements Fixed Point Representation
Digital Logic & Design Lecture 03.
ECE 331 – Digital System Design
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016

COMPLEMENTS OF NUMBERS Radix Complement Diminished Radix Complement Recap Using 10’s complement, subtract Given the two binary numbers X = and Y = , perform the subtraction (a) X - Y and (b) Y - X by using 2’s complements.

Agenda  Binary Codes  BCD- Binary coded decimal Code  Decimal Arithmetic  Grey Code  ASCII code  Error correction/Error detection  Binary storage and Registers

Binary Code  An n ‐ bit binary code is a group of n bits that assumes up to 2n distinct combinations of 1’s and 0’s, with each combination representing one element of the set that is being coded.  Although the minimum number of bits required to code 2n distinct quantities is n, there is no maximum number of bits that may be used for a binary code.  For example, the 10 decimal digits can be coded with 10 bits, and each decimal digit can be assigned a bit combination of nine 0’s and a 1.  Decimal Codes  Binary-coded Decimal Code (BCD)  Excess-3  2421  8,4,-2,-1  Gray Code  ASCII Character code  Error Correcting code

Binary-Coded Decimal Code  To represent the decimal digits by means of a code that contains 1’s and 0’s.  The code most commonly used for the decimal digits is the straight binary assignment listed.  Example  (396) 10  ( ) BCD Decimal SymbolBCD Digit

Binary-Coded Decimal Code: BCD Addition  Consider the addition of two decimal digits in BCD, together with a possible carry from a previous less significant pair of digits.  Since each digit does not exceed 9, the sum cannot be greater than = 19.  When the binary sum is equal to or less than 1001 (without a carry), the corresponding BCD digit is correct.  However, when the binary sum is greater than or equal to 1010, the result is an invalid BCD digit.  The addition of 6 = (0110)2 to the binary sum converts it to the correct digit and also produces a carry as required.

Binary-Coded Decimal Code: BCD Addition  Example of 1 digits number Addition  Addition of n-digit unsigned BCD numbers addition

Binary-Coded Decimal Code: BCD Addition  The representation of signed decimal numbers in BCD is similar to the representation of signed numbers in binary  We can use either the familiar signed ‐ magnitude system or the signed ‐ complement system.  It is customary to designate a plus with four 0’s and a minus with the BCD equivalent of 9, which is  The signed ‐ complement system can be either the 9’s or the 10’s complement, but the 10’s complement is the one most often used.  Consider the addition (+375) + (-240) = +135 In Signed-Complement System

Other Decimal Codes  The BCD code has weights of 8, 4, 2, and 1, which correspond to the power ‐ of ‐ two values of each bit.  The bit assignment 0110, for example, is interpreted by the weights to represent decimal 6 because 8 * * * * 0 = 6.  The bit combination 1101, when weighted by the respective digits 2421, gives the decimal equivalent of 2 * * * * 1 = 7.  Note that some digits can be coded in two possible ways in the 2421 code. For instance, decimal 4 can be assigned to bit combination 0100 or 1010, since both combinations add up to a total weight of 4.

Benefits of decimal codes  BCD adders add BCD values directly, digit by digit, without converting the numbers to binary.  The 2421 and the excess ‐ 3 codes are examples of self ‐ complementing codes. Such codes have the property that the 9’s complement of a decimal number is obtained directly by changing 1’s to 0’s and 0’s to 1’s.  For example, decimal 395 is represented in the excess ‐ 3 code as  The 9’s complement of 395 = 604 which is represented as , which is obtained simply by complementing each bit of the code (as with the 1’s complement of binary numbers).

Grey Code  The Gray code is used in applications in which the normal sequence of binary numbers generated by the hardware may produce an error or ambiguity during the transition from one number to the next.  Between any two consecutive numbers, the symbols have at most 1 bit different.  Gray code of 7 and 8 is 0100, 1100  Versus Binary of 7 and 8 is 0111, 1000.

Grey Code  Binary to Grey Code a) = 7 b) 1000 = (Try your self)  Grey Code to Binary Code a) = 7 b) 1100 = (Try your self)

ASCII Character Code  Many applications of digital computers require the handling not only of numbers, but also of other characters or symbols, such as the letters of the alphabet.  The standard binary code for the alphanumeric characters is the American Standard Code for Information Interchange (ASCII), which uses seven bits to code 128 characters.

Error Detecting Code  To detect errors in data communication and processing, an eighth bit is sometimes added to the ASCII character to indicate its parity.  A parity bit is an extra bit included with a message to make the total number of 1’s either even or odd.

Next Class  Digital Logic  Boolean Algebra