ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.

Slides:



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

Give qualifications of instructors: DAP
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
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 3 More Number Systems.
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.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
1.6 Signed Binary Numbers.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
Digital Systems and Logic Design
Chap. 3 Data Representation
Chapter 3 Data Representation
Dept. of Computer Science Engineering Islamic Azad University of Mashhad 1 DATA REPRESENTATION Dept. of Computer Science Engineering Islamic Azad University.
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:
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Digital Logic Lecture 4 Binary Codes The Hashemite University Computer Engineering Department.
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,
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.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
CS151 Introduction to Digital Design
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Computer System Architecture © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 2 Number Systems and Codes Binary to Decimal Conversions.
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)
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 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Ch 2. Number Systems and Codes 2.2 Octal and Hexadecimal Numbers 10 ~ 15 : Alphabet.
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
ECE 301 – Digital Electronics Representation of Negative Numbers, Binary Arithmetic of Negative Numbers, and Binary Codes (Lecture #11) The slides included.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Introduction to Microprocessors Chapter 2. Decimal or Base 10 Numbers  Have ten different digits (0-9)  It is a weighted number system. Each position.
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.
MECH1500 Chapter 3.
Chapter 1: Binary Systems
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
CCE Department – Faculty of engineering - Islamic University of Lebanon Chapter 6 Binary Arithmetic.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
AGBell – EECT by Andrew G. Bell (260) Lecture 2.
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 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
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
Ch2 Number systems and codes
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.
COMPUTER ORGANIZATION 4 TH LECTURE. ASCII Code  ASCII ( American Standard Code for Information Interchange).  Input and output devices that communicate.
Introduction to Chapter 2
Binary Arithmetic Binary arithmetic is essential in all digital computers and in many other types of digital systems. Addition, Subtraction, Multiplication,
Chapter 3 Data Representation
2 Number Systems and Codes Edited by Jerry Bernardini.
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Diminished Radii Complement and codes
Digital Logic & Design Lecture 03.
Table 1.1 Powers of Two.
ECE 331 – Digital System Design
Presentation transcript:

ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers

ENGIN112 L4: Number Codes and Registers Overview °2’s complement numbers Addition and subtraction °Binary coded decimal °Gray codes for binary numbers °ASCII characters °Moving towards hardware Storing data Processing data

ENGIN112 L4: Number Codes and Registers 2’s Complement Subtraction °Let’s compute (13) 10 - (5) 10. (13) 10 = +(1101) 2 = (01101) 2 (-5) 10 = -(0101) 2 = (11011) 2 °Adding these two 5-bit codes… °Discarding the carry bit, the sign bit is seen to be zero, indicating a correct result. °Numbers in hexadecimal carry

ENGIN112 L4: Number Codes and Registers 2’s Complement Subtraction °Let’s compute (5) 10 – (12) 10. (-12) 10 = -(1100) 2 = (10100) 2 (5) 10 = +(0101) 2 = (00101) 2 °Adding these two 5-bit codes… °Here, there is no carry bit and the sign bit is 1. This indicates a negative result, which is what we expect. (11001) 2 = -(7) 10. °Numbers in hexadecimal

ENGIN112 L4: Number Codes and Registers Binary Coded Decimal °Binary coded decimal (BCD) represents each decimal digit with four bits Ex = °This is NOT the same as °Why do this? Because people think in decimal. Digit BCD Code Digit BCD Code

ENGIN112 L4: Number Codes and Registers Putting It All Together °BCD not very efficient °Used in early computers (40s, 50s) °Used to encode numbers for seven- segment displays. °Easier to read?

ENGIN112 L4: Number Codes and Registers Gray Code °Gray code is not a number system. It is an alternate way to represent four bit data °Only one bit changes from one decimal digit to the next °Useful for reducing errors in communication. °Can be scaled to larger numbers. DigitBinary Gray Code

ENGIN112 L4: Number Codes and Registers ASCII Code °American Standard Code for Information Interchange °ASCII is a 7-bit code, frequently used with an 8 th bit for error detection (more about that in a bit). CharacterASCII (bin) ASCII (hex) DecimalOctal A B C … Z a … 1 ‘

ENGIN112 L4: Number Codes and Registers ASCII Codes and Data Transmission °ASCII Codes °A – Z (26 codes), a – z (26 codes) °0-9 (10 codes), others °Complete listing in Mano text °Transmission susceptible to noise °Typical transmission rates (1500 Kbps, 56.6 Kbps) °How to keep data transmission accurate?

ENGIN112 L4: Number Codes and Registers Parity Codes °Parity codes are formed by concatenating a parity bit, P to each code word of C. °In an odd-parity code, the parity bit is specified so that the total number of ones is odd. °In an even-parity code, the parity bit is specified so that the total number of ones is even. Information BitsP  Added even parity bit  Added odd parity bit

ENGIN112 L4: Number Codes and Registers Parity Code Example °Concatenate a parity bit to the ASCII code for the characters 0, X, and = to produce both odd-parity and even-parity codes. CharacterASCII Odd-Parity ASCII Even-Parity ASCII X =

ENGIN112 L4: Number Codes and Registers Binary Data Storage Binary cells store individual bits of data Multiple cells form a register. Data in registers can indicate different values Hex (decimal) BCD ASCII Binary Cell

ENGIN112 L4: Number Codes and Registers Register Transfer °Data can move from register to register. °Digital logic used to process data °We will learn to design this logic Register ARegister B Register C Digital Logic Circuits

ENGIN112 L4: Number Codes and Registers Transfer of Information °Data input at keyboard °Shifted into place °Stored in memory NOTE: Data input in ASCII

ENGIN112 L4: Number Codes and Registers Building a Computer °We need processing °We need storage °We need communication °You will learn to use and design these components.

ENGIN112 L4: Number Codes and Registers Summary °Although 2’s complement most important, other number codes exist °ASCII code used to represent characters (including those on the keyboard) °Registers store binary data °Next time: Building logic circuits!