UNIVERSAL COLLEGE OF ENGINEERING AND TECHNOLOGY PREPARED BY:- Chirag Parmar (130460116005) Kashish Soni (130460116014) Maitrey Bhatt(130460116016)

Slides:



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

A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Chapter 1 Binary Systems 1-1. Digital Systems
Wakerly Section 2.4 and further Addition and Subtraction of Nondecimal Numbers.
2.3 Binary Codes for Decimal Numbers ReturnNext Code: A set of n-bit strings in which different bit strings represent different numbers or other things.
Sistemas Digitais I LESI - 2º ano Lesson 2 - Number Systems U NIVERSIDADE DO M INHO E SCOLA DE E NGENHARIA Prof. João Miguel Fernandes
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
SIMS-201 Representing Information in Binary. 2  Overview Chapter 3: The search for an appropriate code Bits as building blocks of information Binary.
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Binary Representation and Computer Arithmetic
Digital Systems and Binary Numbers
Digital Design: Principles and Practices Chapter 2 Number Systems and Codes.
Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols.
CS 151: Digital Design Chapter 3 3-8: Encoding. CS 151 Encoding Encoding - the opposite of decoding - the conversion of a maximum of 2 n input code to.
ECE 3110: Introduction to Digital Systems Review #1 (Chapter 1,2)
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
The Digital Codes.
Binary Codes. Binary Code A binary code is just an assignment of information to bit patterns.
Topic 2 – Introduction to Computer Codes. Computer Codes A code is a systematic use of a given set of symbols for representing information. As an example,
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
BINARY CODE – Digital Circuit 1 Choopan Rattanapoka.
1 Problem Solving using computers Data.. Representation & storage Representation of Numeric data The Binary System.
Introduction to Computer Design CMPT 150 Section: D Ch. 1 Digital Computers and Information CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU 1.
CS151 Introduction to Digital Design
CHAPTER 1 BINARY SYSTEMS
Number Systems ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
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)
Logical Circuit Design Week 2,3: Fundamental Concepts in Computer Science, Binary Logic, Number Systems Mentor Hamiti, MSc Office: ,
Summer 2012ETE Digital Electronics1 Binary Arithmetic of Signed Binary Numbers.
ECE 2110: Introduction to Digital Systems BCD, Gray, Character, Action/Event, Serial Data.
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
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 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6.
Data Representation, Number Systems and Base Conversions
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
CEC 220 Digital Circuit Design Binary Codes
Digital Design Basics Analog vs Digital Why we need digital? Reproducibility, economy, programmability… Digital Devices Gates, FFs Combinational, sequential.
Lecture 3 Combinational Circuits
1 Digital Design Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
Module –I Codes: Weighted and non-weighted codes
Lecture 2 Number Representation, Overflow and Logic Topics Adders Math Behind Excess-3 Overflow Unsigned, signed-magnitude Two’s Complement Gray Code Boolean.
CEC 220 Digital Circuit Design Binary Codes Mon, Aug 31 CEC 220 Digital Circuit Design Slide 1 of 14.
ECE – III SEM BINARY CODES
ECE 2110: Introduction to Digital Systems
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
ECE DIGITAL LOGIC LECTURE 11: STANDARD CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 09/24/2015.
2.4 Gray Code ReturnNext In a Gray code only one bit changes between each pair of successive code words. Gray code is a reflected code. It can be defined.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
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.
Number Systems By, B. R. Chandavarkar CSE Dept., NITK, Surathkal.
Binary Codes.
ECE 2110: Introduction to Digital Systems
Number Systems and Codes (parte 2)
Number systems and codes
Wakerly Section 2.4 and further
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Unsigned Binary Encoding
COMS 161 Introduction to Computing
Binary Coded By: Asst Lec. Besma Nazar Nadhem
Chapter 1 (Part c) Digital Systems and Binary Numbers
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

UNIVERSAL COLLEGE OF ENGINEERING AND TECHNOLOGY PREPARED BY:- Chirag Parmar ( ) Kashish Soni ( ) Maitrey Bhatt( )

BINARY CODES

Binary Code A binary code is just an assignment of information to bit patterns.

Binary Codes Electronic digital systems use signals that have two distinct values and circuit elements that have two stable states. Digital systems represent and manipulate not only binary numbers, but also many other discrete elements of information. Any discrete element of information distinct among a group of quantities can be represented by a binary code. Binary codes merely change the symbols, not the meaning of the elements of information that they represent.

Binary Codes To represent a group of 2n 2n distinct elements in a binary code requires a minimum of n bits. There is no maximum number of bits that may be used for a binary code.

Binary Codes for Decimal Numbers A set of n -bit string in which different bit strings represent different numbers or other things is called a code. A particular combination of n bit values is called a code word. A code that uses n -bit strings need not contain 2 n valid code words.

Binary Codes for Decimal Numbers The usual interpretation of a binary number is as defined according to the definition of a number in in base-2 system. There are, however, alternate methods used to encode numeric data into binary bit patterns. Table 2-9 in the course text presents five such codes. These are BCD, 2421, Excess-3, Biquinary ( ) and lastly the “1-out-of-10” code.

Binary Codes for Decimal Numbers It is important to note that this table presents binary codes and not binary numbers. A binary number is mathematically defined, while a binary code is just an assignment of numeric values to bit patterns.

Binary Codes for Decimal Numbers Each such assignment in table 2-9 does have some particular property associated with it that makes it a reasonable method of assignment. For example, a BCD number is just a natural binary encoding of the decimal digits from 0 to 9 on four bits. Therefore a string of bits is grouped into groups of four bits, and interpreted as a string of decimal digits.

Binary-Coded Decimal (BCD) a BCD number is just a natural binary encoding of the decimal digits from 0 to 9 on four bits in BCD (0 ~ 99) because there are unused code words 87 in normal unsigned binary number (0 ~ 255)

Binary-Coded Decimal (BCD) Binary-Coded Decimal is a weighted code because each decimal digit can be obtained from its code word by assigning a fixed weight to each code-word bit. The weights for the BCD bits are 8, 4, 2, and 1, and for this reason the code is sometimes called the 8421 code.

2421 CODE This code has the advantage that it is self- complementing, that is, the code word for the 9s’ complement of any digit may be obtained by complementing the individual bits of the digit’s code word = 2 9s’complement of 2 can be obtained by complementing individual bits 1101 = ( ) = 7

EXCESS 3 CODE This code is also self-complementing like 2421 code. Although this code is not weighted, it has an arithmetic relationship with the BCD code. The code word for each decimal digit is the corresponding BCD code word plus = 2 in BCD = 0101 = 2 in excess-3

Gray Code Gray code is a code where only one bit changes at a time while traversing from 0 to any decimal number in sequence. This is a useful property when converting analog values into digital values, since it eliminates the problem of misinterpreting asynchronous changes to bits between valid values.

Gray Code What value will the encoder produce if the disk is positioned right on the theoretical boundary?

Gray Code The encoding-disk problem can be solved by devising a digital code in which only one bit changes between each pair of successive code words. Such a code is called a Gray code.

Gray Code

Two ways to construct a Gray code with any number of bits: Reflected code defined recursively From binary code

Gray Code Gray code is defined recursively using the following rules: A 1-bit Gray code has two code words, 0 and 1. The first 2 n code words of an (n+1)-bit Gray code equal the code words of an n-bit Gray code, written in order with a leading 0 appended. The last 2 n code words of an (n+1)-bit Gray code equal the code words of an n-bit Gray code, written in reverse order with a leading 1 appended.

Gray Code Gray code is defined from the binary code using the following rules: The bits of an n-bit binary or Gray-code code-word are numbered from right to left, from 0 to n-1. Bit i of a Gray-code code-word is 0 if bits i and i+1 of the corresponding binary code word are the same, else bit i is 1. (When i+1=n, bit n of the binary code word is considered to be 0.)

MADE BY: CHIRAG PARMAR