Number systems and codes

Slides:



Advertisements
Similar presentations
Lecture no 6. Two's Complement Given a negative number (N), represented using the Two's Complement representation (N*), the magnitude of the number (P)
Advertisements

KFUPM COE 202: Digital Logic Design Number Systems Part 3 Courtesy of Dr. Ahmad Almulhem.
DAT2343 Summary of Standard Data Encoding © Alan T. Pinck / Algonquin College; 2003.
Appendix 1 Number Systems Objectives: Review of number systems and radix conversion methods Review of binary, octal, hexadecimal and BCD unsigned codes.
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Binary & Decimal numbers = 3* * *10 + 5*1 = 3* * * *10 0 Decimal system: Ten digits: 0,1,2,3,…,9 Example:
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.
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
EECC341 - Shaaban #1 Lec # 3 Winter Binary Multiplication Multiplication is achieved by adding a list of shifted multiplicands according.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Overflow Signed binary is in fixed range -2 n-1  2 n-1 If the answer for addition/subtraction more than the.
Number Systems and Codes In PLC
1.6 Signed Binary Numbers.
Digital Systems and Logic Design
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.
Morgan Kaufmann Publishers
UNIVERSAL COLLEGE OF ENGINEERING AND TECHNOLOGY PREPARED BY:- Chirag Parmar ( ) Kashish Soni ( ) Maitrey Bhatt( )
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
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.
ECE 3110: Introduction to Digital Systems unsigned Multiplication/Division codes.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
ECE 2110: Introduction to Digital Systems Signed Addition/Subtraction.
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Introduction to Microprocessors Chapter 2. Decimal or Base 10 Numbers  Have ten different digits (0-9)  It is a weighted number system. Each position.
CEC 220 Digital Circuit Design Binary Codes
DIGITAL SYSTEMS Number systems & Arithmetic Rudolf Tracht and A.J. Han Vinck.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
CCE Department – Faculty of engineering - Islamic University of Lebanon Chapter 6 Binary Arithmetic.
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 DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Exercise 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Digital Logic Design Lab 1,2 By Nora Alaqeel.
Dr. Nermin Hamza. Agenda Signed Numbers Properties of Switching Algebra.
11001 / 101, / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the result.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Lecture 4: Digital Systems & Binary Numbers (4)
Unit I From Fundamentals of Logic Design by Roth and Kinney.
Binary Codes.
Signed binary numbers & Binary Codes
ECE 2110: Introduction to Digital Systems
CS2100 Computer Organisation
Negative Binary Numbers
Lecture No. 4 Number Systems
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
11001 / 101 , / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the.
1.11, 1.12, 1.13, 1.14, 1.18, 1.20, 1.23, 1.24, 1.25, 1.32, 1.33 ( 47 )8 = ( )2 ( 47 )16 = ( )2 ( 20 )10.
Negative Binary Numbers
Arithmetic operations in binary
Wakerly Section 2.4 and further
Complement Theory 1’s and, 2’s complement operation
BCD = Binary Coded Decimal
Digital Systems: Number Systems and Codes
Complement Theory 1’s and, 2’s complement operation
Digital Logic & Design Lecture 05
Table 1.1 Powers of Two.
ECE 331 – Digital System Design
Chapter 1 (Part c) Digital Systems and Binary Numbers
CHAPTER 69 NUMBER SYSTEMS AND CODES
Chapter 1 Introduction.
Presentation transcript:

Number systems and codes Chapter 2 Number systems and codes Decimal and Binary Unsigned and Signed Code for Numbers and Characters

Codes in binary system Word: a digital string to represent an object; Use n bits, we can make 2n different words; To make n different words, you must use bits.

BCD codes Binary codes for decimal digits : use 4 or more bits express 10 digit ( 0—9) 8421 code 2421 codes Excess-3 code Biquinary code 1-out-of-10 code

BCD codes Binary codes for decimal digits ( Table 2-9 )

BCD codes 8421 code Natural code , just lake 4-bit binary numbers; Each digit is weighted; It has 10 valid code words and 6 invalid code words.

BCD codes 2421 codes Each digit is weighted; Self-complementing; Use MSB to express higher/lower part; It has 10 valid codes and 6 invalid codes.

BCD codes Excess-3 code Its digit is not weighted; Self-complementing ; 8421 code + “0011” .

BCD codes Examples: use BCD code for decimal numbers A = 1946 8421 code : A = 0001 1001 0100 0110 2421 code : A = 0001 1111 0100 1100 Excess-3 code: A = 0100 1100 0111 1001

BCD codes 1-out-of-10 code One hot code: It is very useful in control systems.

BCD codes Biquinary code 7-bits; two hot code; First 2 bits is one hot code for higher/lower range; Last 5 bits is one hot code in the range. Error-detecting property !

Gray codes Target: code for continues changed numbers (in binary system) to prevent wrong code happened in transition time; Property : In each pair of successive code words, only one bit changes.

Gray codes From binary number to Gray code The width is same, the MSB is same; From left to right, if a bit in binary number is same as its left bit, the gray code is 0, if it is different, the gray code is 1. Examples: binary number: 1001 0010 0110 0011 Gray codes: 1101 1011 0101 0010

Codes for characters Character codes : ASCII , 7-bits string, 128 code words; ( p.54 Table 2-11) Example: How are you! 1001000 1101111 1110111 0100000 1100001 1110010 1100101 0100000 1111001 1101111 1110101 0100001

Codes for other things Codes for actions , conditions or states: Use n bits, we can make 2n different words; To make n different words, we must use bits. p.55 Table 2-12

Codes transmit way in digital circuit Parallel codes use n-line to transmit an n-bits code words ; transmit an n-bits code words in one time period; Serial codes use one line to transmit an n-bits code words ; transmit an n-bits code words in n time period;