Digital Logic & Design Adil Waheed Lecture 03. Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number.

Slides:



Advertisements
Similar presentations
DAT2343 Summary of Standard Data Encoding © Alan T. Pinck / Algonquin College; 2003.
Advertisements

ECE 331 – Digital System Design
Lecture - 2 Number systems and computer data formats
ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.
Chapter 2 : Number System
CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals Floyd Chapter 2 Tenth Edition
CS 151 Digital Systems Design Lecture 4 Number Codes and Registers.
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.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
Number System and Codes
Lesson 2 0x Coding ASCII Code.
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.
Number Systems and Codes
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Digital Systems and Logic Design
Chapter 3 Data Representation
Binary Arithmetic & Data representation
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.
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.
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.
Number Systems and Codes. CS2100 Number Systems and Codes 2 NUMBER SYSTEMS & CODES Information Representations Number Systems Base Conversion Negative.
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.
1 Chapter 2 Number Systems, Operations, and Codes.
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
Chapter1: Number Systems
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.
Number Systems and Digital Codes
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
SAK Chapter 21 Chapter 2 : Number System 2.1 Decimal, Binary, Octal and Hexadecimal Numbers 2.2 Relation between binary number system with other.
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.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
DIGITAL SYSTEMS Number systems & Arithmetic Rudolf Tracht and A.J. Han Vinck.
Computer Number System
NUMBER SYSTEMS AND CODES. CS Digital LogicNumber Systems and Codes2 Outline Number systems –Number notations –Arithmetic –Base conversions –Signed.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Overview 1-1 Information Representation
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Lecture No. 4 Computer Logic Design. Negative Number Representation 3 Options –Sign-magnitude –One’s Complement –Two’s Complement  used in computers.
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.
11001 / 101, / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the result.
Lecture No. 4 Number Systems
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Introduction to Chapter 2
Chapter 3 Data Representation
Number Systems.
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Digital Systems: Number Systems and Codes
Digital Logic & Design Lecture 03.
Digital Logic & Design Lecture 05
ECB2212-Digital Electronics Codes
2’s Complement form 1’s complement form 2’s complement form
Number Systems.
Presentation transcript:

Digital Logic & Design Adil Waheed Lecture 03

Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number is x How to represent larger numbers? How to represent very small numbers? How to represent numbers with integer part and fraction part?

Hexadecimal Number System Base 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Representing Binary in compact form = 1B06 H

Counting in Hexadecimal DecimalBinaryHexadecimalDecimalBinaryHexadecimal A B C D E F

Binary-Hexadecimal Conversion Binary to Hexadecimal Conversion D 6 B 9 6 Hexadecimal to Binary Conversion FD

Decimal-Hexadecimal Conversion Decimal to Hexadecimal Conversion Indirect Method Decimal →Binary → Hexadecimal Repeated Division by 16

Decimal-Hexadecimal Conversion Hexadecimal to Decimal Conversion Indirect Method Hexadecimal →Binary → Decimal Sum-of-Weights

Hexadecimal Addition & Subtraction Hexadecimal Addition Carry generated Hexadecimal Subtraction Borrow weight 16

Repeated Division by 16 NumberQuotientRemainder

Sum-of-Weights CA02 (C x 16 3 ) + (A x 16 2 ) + (0 x 16 1 ) + (2 x 16 0 ) (12 x 16 3 ) + (10 x 16 2 ) + (0 x 16 1 ) + (2 x 16 0 ) (12 x 4096) + (10 x 256) + (0 x 16) + (2 x 1)

Hexadecimal Addition Carry 1 2AC66+5=11d Bh + 92B5C+B=23d 17h BD7BA+2+1=13d Dh 2+9=11d Bh

Hexadecimal Subtraction Borrow B521-6=15d Fh - 2AC626-C=14d Eh 67EF17-A=7d 7h 8-2=6d 6h

Octal Number System Base 8 0, 1, 2, 3, 4, 5, 6, 7 Representing Binary in compact form =

Counting in Octal DecimalBinaryOctal

Counting in Octal DecimalOctalDecimalOctalDecimalOctal

Binary-Octal Conversion Binary to Octal Conversion Octal to Binary Conversion

Decimal-Octal Conversion Decimal to Octal Conversion Indirect Method Decimal →Binary → Octal Repeated Division by 8

Decimal-Octal Conversion Octal to Decimal Conversion Indirect Method Octal →Binary → Decimal Sum-of-Weights

Octal Addition & Subtraction Octal Addition Carry generated Octal Subtraction Borrow weight 8

Repeated Division by 8 NumberQuotientRemainder (O 0 ) (O 1 ) 840 (O 2 ) 404 (O 3 )

Sum-of-Weights 4033 (4 x 8 3 ) + (0 x 8 2 ) + (3 x 8 1 ) + (3 x 8 0 ) (4 x 512) + (0 x 64) + (3 x 8) + (3 x 1)

Octal Addition Carry =3d 3O =7d 7O =13d 15O 1+7+5=13d 15O

Octal Subtraction Borrow =1d 1O =1d 1O =6d 6O 6-5=1d 1O

Alternate Representations BCD Code BCD Addition Gray Code

Alternate Representations BCD (Binary Coded Decimal) Code DecimalBCDDecimalBCD

BCD Addition Multi-digit BCD numbers can be added together is illegal BCD number

BCD Addition Add a 0110 (6) to an invalid BCD number Carry added to the most significant BCD digit

Alphanumeric Code Numbers, Characters, Symbols ASCII 7-bit Code American Standard Code for Information Interchange 10 Numbers (0-9) 26 Lower Case Characters (a-z) 26 Upper Case Characters (A-Z) Punctuation and Symbols

ASCII Code Numbers 0 to 9 ASCII (30h) to (39h) Alphabets a to z ASCII (61h) to (7Ah) Alphabets A to Z ASCII (41h) to (5Ah) Control Characters ASCII (0h) to (1Fh)

Error Detection Digital Systems are very Reliable Errors during storage or transmission Parity Bit Even Parity Odd Parity

parity Odd parity: The number of 1-bit must add up to an odd number Even parity: The number of 1-bit must add up to an even number

Summary Hexadecimal Number System Binary-Hexadecimal Conversion Decimal-Hexadecimal Conversion Octal Number System Binary-Octal Conversion Decimal-Octal Conversion

Summary Alternate Representations BCD Code Gray Code Alphanumeric Codes ASCII Error Detection Parity Bit