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

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

Computer Codes Rohit Khokher. Computer Codes Data types NumericNonnumeric IntegerRealAlphabet A, B, C, …,Z a, b, c,…,z Digits 0,…,9 Special Characters.
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
COE 202: Digital Logic Design Signed Numbers
ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.
Using Binary Coding Information Remember  Bit = 0 or 1, Binary Digit  Byte = the number of bits used to represent letters, numbers and special characters.
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.
CS 151 Digital Systems Design Lecture 4 Number Codes and Registers.
Overview Digital Systems and Computer Systems Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion Decimal Codes [BCD (binary.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
COE 202: Digital Logic Design Combinational Circuits Part 1
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
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 System and Codes
© BYU 02 NUMBERS Page 1 ECEn 224 Binary Number Systems and Codes.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
9/15/09 - L3 CodesCopyright Joanne DeGroat, ECE, OSU1 Codes.
1.6 Signed Binary Numbers.
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Digital Electronics Chapter 1 Binary Systems Digital Electronics Galore! Digital Cameras Digital Versatile Disks (DVD) Digital Computers Digital Televisions.
Binary Arithmetic & Data representation
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Digital Logic Lecture 4 Binary Codes The Hashemite University Computer Engineering Department.
Morgan Kaufmann Publishers
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
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
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
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.
Complements and Codes by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano  Programmable Controllers-Theory and Implementation,
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
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.
MECH1500 Chapter 3.
Module –I Codes: Weighted and non-weighted codes
AGBell – EECT by Andrew G. Bell (260) Lecture 2.
Lecture 2 Number Representation, Overflow and Logic Topics Adders Math Behind Excess-3 Overflow Unsigned, signed-magnitude Two’s Complement Gray Code Boolean.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
HNC COMPUTING - COMPUTER PLATFORMS 1 Micro Teach Binary.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Digital Systems: Number Systems and Codes Wen-Hung Liao, Ph.D.
Dr. Nermin Hamza. Agenda Signed Numbers Properties of Switching Algebra.
The ASCII Alphanumeric Code What is it? Why use it? How do we use it?
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Some basic concepts underlying computer archi­tecture
ECE 2110: Introduction to Digital Systems
Unit 18: Computational Thinking
3.1 Denary, Binary and Hexadecimal Number Systems
BINARY CODE.
Number systems and codes
Data Encoding Characters.
2 Number Systems and Codes Edited by Jerry Bernardini.
Digital Systems: Number Systems and Codes
C1 Number systems.
COMS 161 Introduction to Computing
Learning Intention I will learn how computers store text.
ECE 331 – Digital System Design
Presentation transcript:

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

Objectives Binary codes Binary coded decimal (BCD) Other Decimal Codes Gray Code ASCII Code Error Detecting Code KFUPM

Binary Codes A n-bit binary code is a binary string of 0s and 1s of size n. It can represent 2 n different elements. 4 elements can be coded using 2 bits 8 elements can be coded using 3 bits Given the number of elements to be coded, there is a minimum number of bits, but no maximum ! KFUPM

Binary Coded Decimal (BCD) Human communicating with computers Humans understand decimal Computers understands binary Solution: Convert Decimal-Binary-Decimal Need to store decimal numbers as binary codes KFUPM

Binary Coded Decimal (BCD) BCD Code uses 4 bits to represent the 10 decimal digits {0 to 9} 6 BCD codes unused The weights of the individual positions of the bits of a BCD code are: 2 3 =8, 2 2 =4, 2 1 =2, 2 0 =1 KFUPM

Other Decimal Codes 4 bits = 16 different codes Only 10 needed to represent the 10 decimal digits. Many possible codes! 2421 and excess-3 are self- complementing (9’s complement can be obtained by inverting bits) KFUPM src: Mano’s book

Gray Code Gray code represents decimal numbers 0 to 15 using 16 4-bit codes Gray codes of two adjacent decimal numbers differ by only one bit Example: (5) 10 = 0111 (6) 10 = 0101 (7) 10 = 0100 KFUPM

ASCII Character Code ASCII an abbreviation of “American Standard Code for Information Interchange” A 7-bit code (128 characters) 94 printable, 34 non-printable (control) 2x26 English letters (A,…Z, a,…z) 10 decimal digits (0,1,…9) 32 Special Characters such as %, *, $, … etc. Usually stored as a byte (8 bits) The extra bit is used for other purposes KFUPM

ASCII Character Code

KFUPM ASCII Character Code capital vs small A difference of (20) 16 = 32 10

Error Detecting Code In data communication, errors may happen One code change into another code How to detect errors? Add an extra bit called a parity bit such that Number of 1’s is even (even parity) or odd (odd parity) KFUPM

Error Detecting Code ASCII A = ASCII T =

Conclusions Bits are bits Modern digital devices represent everything as collections of bits A computer is one such digital device You can encode anything with sufficient 1’s and 0’s Binary codes (BCD, gray code) Text (ASCII) Sound (.wav,.mp3,...) Pictures (.jpg,.gif,.tiff) KFUPM