COE 202: Digital Logic Design Number Systems Part 1

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
Representing Numbers: Integers
DATA REPRESENTATION CONVERSION.
COE 202: Digital Logic Design Signed Numbers
ECE 331 – Digital System Design
ECE 301 – Digital Electronics Number Systems and Conversion, Binary Arithmetic, and Representation of Negative Numbers (Lecture #10) The slides included.
1 Number Systems. 2 Numbers Each number system is associated with a base or radix – The decimal number system is said to be of base or radix 10 A number.
Number Systems and Arithmetic
BASICS OF COMPUTER APPLICATIONS ASB 102. UNIT 1 Introducing computer system  Number system  What is number system?  Types of number system  Their.
Number Systems and Codes In PLC
Number Systems Lecture 02.
Binary and Hexadecimal Numbers
Number Systems.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Numbering systems.
Numeral Systems Subjects: Numeral System Positional systems Decimal
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
Number systems: binary, decimal, hexadecimal and octal. Conversion between various number systems Number systems: binary, decimal, hexadecimal and octal.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
Computer Number Systems. d n-1 d n-2 d n d 2-m d 1-m d -m Conventional Radix Number r is the radixd i is a digit d i Є {0, 1, ….., r – 1 } -m ≤
1 CS103 Guest Lecture Number Systems & Conversion Bitwise Logic Operations.
ECE 331 – Digital System Design
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 Week 2: Binary, Octal and Hexadecimal Numbers READING: Chapter 2.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Digital Logic Lecture 2 Number Systems
ECE2030 Introduction to Computer Engineering Lecture 2: Number System Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Tech.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Number Systems and Logic Prepared by Dr P Marais (Modified by D Burford)
AEEE2031 Data Representation and Numbering Systems.
1 Review on Number Systems Decimal, Binary, and Hexadecimal.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Number Systems and Bitwise Operation.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
ECE 3110: Introduction to Digital Systems Number Systems.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
Number Representation 1 Lecture 2. Outcomes By the end of the session you should: – Understand what bits/bytes/words are. – Understanding conversion between.
1 EGR 277 – Digital Logic Syllabus Office Hours No food or drinks in the classrooms Web page (demonstration) Lecture #1 EGR 277 – Digital Logic Reading.
CS151 Introduction to Digital Design Chapter 1: Digital Systems and Information Lecture 2 1Created by: Ms.Amany AlSaleh.
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.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Data Representation COE 301 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum.
1. Binary, Decimal, Hexadecimal and Octal. 2. Conversion between various number systems. Number Systems:
Numbering Systems.
CHAPTER 1 : INTRODUCTION
Number Systems.
Number System conversions
Number Systems and Bitwise Operation
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Introduction to IT By: Muhammed s. anwar.
Numbering System TODAY AND TOMORROW 11th Edition
Binary / Hex Binary and Hex The number systems of Computer Science.
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Electronics and Microprocessors
Digital Logic Design (CSNB163)
ECE 301 – Digital Electronics
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
Number Systems By: Asst Lec. Besma Nazar Nadhem
COE 202: Digital Logic Design Number Systems Part 2
Presentation transcript:

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

Objectives Weighted (positional) number systems Features of weighted number systems Commonly used number systems Important properties KFUPM

Introduction A number system is a set of numbers together with one or more operations (e.g. add, subtract). Before digital computers, the only known number system is the decimal number system (النظام العشري) It has a total of ten digits: {0,1,2,….,9} From the previous lecture: Digital systems deal with the binary system of numbering (i.e. only 0’s and 1’s) Binary system has more reliability than decimal All these numbering systems are also referred to as weighted numbering systems KFUPM

Weighted Number System A number D consists of n digits and each digit has a position. Every digit position is associated with a fixed weight. If the weight associated with the ith. position is wi, then the value of D is given by: D = dn-1 wn-1 + dn-2 wn-2 + ……+ d1 w1 + d0 w0 Also called positional number system KFUPM

Example 9375 The Decimal number system is a weighted number system. For integer decimal numbers, the weight of the rightmost digit (at position 0) is 1, the weight of position 1 digit is 10, that of position 2 digit is 100, position 3 is 1000, etc. KFUPM

The Radix (Base) A digit di, has a weight which is a power of some constant value called radix (r) or base such that wi = ri. A number system of radix r, has r allowed digits {0,1,… (r-1)} The leftmost digit has the highest weight and called Most Significant Digit (MSD) The rightmost digit has the lowest weight and called Least Significant Digit (LSD) KFUPM

Example Decimal Number System Radix (base) = 10 wi = ri, so … wn = rn Only 10 allowed digits {0,1,2,3,4,5,6,7,8,9} KFUPM

Fractions (Radix point) A number D has n integral digits and m fractional digits Digits to the left of the radix point (integral digits) have positive position indices, while digits to the right of the radix point (fractional digits) have negative position indices The weight for a digit position i is given by wi = ri KFUPM

Example For D = 52.946 The weighted representation for D is: r = 10 (decimal number) The weighted representation for D is: i = -3 diri = 6 x 10-3 i = -2 diri = 4 x 10-2 i = -1 diri = 9 x 10-1 i = 0 diri = 2 x 100 i = 1 diri = 5 x 101 4 + 0.04 + KFUPM

Notation A number D with base r can be denoted as (D)r, Decimal number 128 can be written as (128)10 Similarly a binary number is written as (10011)2 Question: Are these valid numbers? (9478)10 (1289)2 (111000)2 (55)5 KFUPM

Common Number Systems Decimal Number System (base-10) Binary Number System (base-2) Octal Number System (base-8) Hexadecimal Number System (base-16) KFUPM

Binary Number System (base-2) Two allowed digits {0,1} A Binary Digit is referred to as a bit Examples: 1100111, 01, 0001, 11110 The left most bit is called the Most Significant Bit (MSB) The rightmost bit is called the Least Significant Bit (LSB) 11110 Least Significant Bit Most Significant Bit KFUPM

Binary Number System (base-2) The decimal equivalent of a binary number can be found by expanding the number into a power series: Question: What is the decimal equivalent of (110.11)2 ? Example KFUPM

Binary Number System (base-2) The decimal equivalent of a binary number can be found by expanding the number into a power series: Question: What is the decimal equivalent of (110.11)2 ? Answer: (6.75)10 Example KFUPM

Octal Number System (base-8) Eight allowed digits {0,1,2,3,4,5,6,7} Useful to represent binary numbers indirectly Octal and binary are nicely related; i.e. 8 = 23 Each octal digit represent 3 binary digits (bits) Example: (101)2 = (5)8 Getting the decimal equivalent is as usual Example KFUPM

Hexadecimal (HEX) Number System (base-16) 16 allowed digits {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F} Useful to represent binary numbers indirectly Hex and binary are nicely related; i.e. 16 = 24 Each hex digit represent 4 binary digits (bits) Example: (1010)2 = (A)16 Getting the decimal equivalent is as usual Question: (9E1)16 = (?)10 Example KFUPM

Hexadecimal (HEX) Number System (base-16) 16 allowed digits {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F} Useful to represent binary numbers indirectly Hex and binary are nicely related; i.e. 16 = 24 Each hex digit represent 4 binary digits (bits) Example: (1010)2 = (A)16 Getting the decimal equivalent is as usual Question: (9E1)16 = (?)10 Example KFUPM

Examples Question: What is the result of adding 1 to the largest digit of some number system? (9)10 + 1 = (10)10 (7)8 + 1 = (10)8 (1)2 + 1 = (10)2 (F)16 + 1 = (10)16 Conclusion: Adding 1 to the largest digit in any number system always has a result of (10) in that number system. KFUPM

Examples Question: What is the largest value representable using 3 integral digits? Answer: The largest value results when all 3 positions are filled with the largest digit in the number system. For the decimal system, it is (999)10 For the octal system, it is (777)8 For the hex system, it is (FFF)16 For the binary system, it is (111)2 KFUPM

Examples Question: What is the result of adding 1 to the largest 3-digit number? For the decimal system, (1)10 + (999)10 = (1000)10 = (103)10 For the octal system, (1)8 + (777)8 = (1000)8 = (83)10 In general, for a number system of radix r, adding 1 to the largest n-digit number = rn Accordingly, the value of largest n-digit number = rn -1 KFUPM

Important Properties The number of possible digits in any number system with radix r equals r. The smallest digit is 0 and the largest digit has a value (r - 1) Example: Octal system, r = 8, smallest digit = 0, largest digit = 8 – 1 = 7 The Largest value that can be expressed in n integral digits is (r n - 1) Example: n = 3, r = 10, largest value = 103 -1 = 999 KFUPM

Important Properties The Largest value that can be expressed in m fractional digits is (1 - r -m) Example: n=3, r = 10, largest value = 1-10-3 = 0.999 Largest value that can be expressed in n integral digits and m fractional digits is equal to (r n – r -m) Total number of values (patterns) representable in n digits is r n Example: r = 2, n = 5 will generate 32 possible unique combinations of binary digits such as (00000 11111) Question: What about Intel 32-bit & 64-bit processors? KFUPM

Conclusions A weighted (positional) number system has a radix (base) and each digit has a position and weight Commonly used number systems are decimal, binary, octal, hexadecimal (HEX) A number D with base r can be denoted as (D)r, To convert from base-r to decimal, use Weighted (positional) number systems have several important properties KFUPM