Dr. Nermin Hamza 1. Materials Book: Digital Design 4 th M. Morris Mano and Michael D. Ciletti 2.

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

Chapter 1 Digital Systems and Numbers System
Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Number Systems and Arithmetic
© Copyright 2000 Indiana University Board of Trustees Proficiency Quiz Study Guide Note: The following slides are provided courtesy of Dr. Bob Orr (Computer.
2.1 2 Number Systems Foundations of Computer Science  Cengage Learning.
Hexadecimal Dk Izzati Pg Haji Ahmad.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Numbering systems.
Number Systems Binary and Hexadecimal. Base 2 a.k.a. Binary  Binary works off of base of 2 instead of a base 10 like what we are taught in school 
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Chapter 3 Data Representation
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
Number systems, Operations, and Codes
Numbering System Base Conversion. Number systems Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary – 0, 1 Octal – 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal system.
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Number Base Conversions
CPIT 201 Introduction to Computing
AEEE2031 Data Representation and Numbering Systems.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
Introduction To Number Systems Binary System M. AL-Towaileb1.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
Chapter 1 : Introduction to Binary Systems 1.1. Introduction to Digital Systems 1.2. Binary Numbers 1.3. Number Base Conversion 1.4. Octal and Hexadecimal.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
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.
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH 2 Number Systems CPIT 201 Introduction.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Numeral Systems Rubel Biswas.
Unit 1 Introduction Number Systems and Conversion.
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
Digital Logic and Computer Organization
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
CSE 102 Introduction to Computer Engineering
Number Systems Lab session 1 Xuan Guo.
Chapter 3 Data Representation
Number System conversions
Number Systems.
Fundamentals & Ethics of Information Systems IS 201
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
University of Gujrat Department of Computer Science
Number Systems and Binary Arithmetic
Introduction to IT By: Muhammed s. anwar.
Digital Electronics Ms. Deepa Mehta.
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Electronics and Microprocessors
Digital Systems and Binary Numbers
Chapter 2: Number Systems
Digital Logic Design (CSNB163)
Chapter 1 Number System RGGP, Narwana.
ECE 301 – Digital Electronics
Chapter 2 Number Systems.
Numeral systems (radix)
Chapter 2 Number Systems.
Chapter 2 Number Systems.
COMS 161 Introduction to Computing
Information Representation
Chapter 2 Number Systems.
Presentation transcript:

Dr. Nermin Hamza 1

Materials Book: Digital Design 4 th M. Morris Mano and Michael D. Ciletti 2

Agenda Introduction Number System 3

Introduction Digital Logic and Computer Organization is the science of utilizing logic design in organizing digital systems, including computer systems. A Digital System is a one in which all signals are represented by discrete values. Computers, calculators and most electronic systems contains large amount of digital logic. 4

Introduction Digital systems usually operate with two-valued signals (0 & 1). Inputs an outputs of a digital system represent real quantities, binary (two-valued), or otherwise encoded multi-valued. Multi-valued inputs (decimal, character,…,etc.) each, must be represented by a set of binary digits (bits), which we call coding the inputs into binary. 5

Introduction Examples: 1- A System with three inputs A, B and C and one output Z, such that Z =1 iff two of the inputs are 1. ABCZ

Introduction SOLUTION : ABCZ

Number system 1- Decimal system 8

The decimal: numeral system (also called base ten or occasionally denary) has ten as its base. Its digits from 0 to 9. It is the numerical base most widely used by modern civilizations 9 Number System

decimal system Let 7392 Which means : 7* * * *10 0 So : as a law If : …. a 3 a 2 a 1 a 0 ……. a 3 *10 3 +a 2 *10 2 +a 1 *10 1 +a 0 *

Number System Let Which means : 0. 9* * * *10 -4 So : as a law If : 0.a -1 a -2 a -3 a -4 0.a -1 * a -2 * a -3 * a -4 *

Number System So the : a 3 a 2 a 1 a 0.a -1 a -2 a -3 a -4 a 3 *10 3 +a 2 *10 2 +a 1 *10 1 +a 0 * a -1 * a -2 * a -3 * a -4 *

Binary System 13

Number System What about binary system? the digit at Decimal system from 0 to 9 so the base is 10 In binary system the digit is: 0 or 1 so the base is 2 The previous law could be the same but with base of two 14

Octal System 15

Octal System The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. 16

Hexadecimal System 17

Hexadecimal hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a–f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal 18

Conversion To Decimal System: 19

Number System The general law for conversion to decimal system: N = d n * R n + d n-1 * R n-1 +…+ d 0 * R 0 + d -1 *R -1 +…d -m * R -m Where n is number of digits, m number of fraction digits and R is the radix/base and d i are the coefficients such that 0 ≤ d i < R 20

Number System From binary to Decimal a 3 a 2 a 1 a 0.a -1 a -2 a -3 a -4 a 3 *2 3 +a 2 *2 2 +a 1 *2 1 +a 0 *2 0 +a -1 *2 -1 +a -2 *2 -2 +a -3 *2 -3 +a -4 *2 -4 Example : = 1*2 4 +1*2 3 +0*2 2 +1*2 1 +0* * * = =

Number System Convert the number ( ) 5 The solution is : (511.4) 10 22

From Decimal to binary 23

Number System To compute the binary equivalent of a decimal number: divide the decimal number by the radix (2 in this case) keep the remainder, divide again and keep the remainder, repeat this process until the result of the division is zero The sequence of digits obtained (the remainders) arranged from right to left is the number in the radix (binary) system. 24

Number System Example (decimal to binary): 9) 10 = ??) 2 Divide by 2 numberquotientReminderCoeffectiont 941a 0 = 1 420a 1 = 0 210a 2 = 0 101a 3 = 1 a 3 a 2 a 1 a

Number System Solve : (41) 10 : (???) 2 numberquotientReminderCoeffectiont 41201a 0 = a 1 = a 2 = 0 521a 3 = 1 210a 4 = 0 101a 5 = 1 The solution :

Number System The fraction part : Multiply by two numberIntegerfractionCoefficient * a -1 = *200.75a -2 = *210.5a -3 = 1 0.5*210a -4 = 1 0. a -1 a -2 a -3 a

Number System Rule: Conversion from decimal to binary Divide the number by two in the integer part And multiply by two in the fraction part 28

Number System From base 10 to base Division. Multiplication Reminder. Integer 29

Number System Convert the following decimal into Binary numbers: a b. 512 c. 217 d. 177 e. 105 Convert the following Binary numbers to Decimal: a b c d

What about from decimal to octal and Hexadecimal ?? 31

Number System 1- from decimal to octal like binary but divide by 8 in integer part and multiply by 8 in fraction part 2- from decimal to hexadecimal but divide by 16 32

From binary to octal 33

Number System From binary to octal Octal (r=8) so 7= 111 Every 3 digits  one digit at octal system Ex:

Number System ( ) 2  ( ??) 8 Solution is : ( ) = ( ) 8 = (1352) 8 35

From binary to Hexadecimal 36

Number System From binary to hexadecimal Hexadecimal (r=16) so 15= 1111 Every 3 digits  one digit at octal system Ex:

Number System ( ) 2  ( ??) 8 Solution is : ( ) = ( ) 8 = (1352) 8 38

Number System Exercises: 1- ( ) 2  (???)  (???) ( )2  (??) 8 4- (1352.7) 8  (??) ( ) 10  (??) Solutions 1- (2EA.8) (746.5) (1352) 8 4- ( ) (1352.7) 8 39

Number System Binary Addition

Number System Binary Subtraction:

Number System One-bit Adder C in a b C out S 42

Number System 43

RADIX COMPLEMENT If N is number for base r (r-1)’s complement = (r n -1)-N r’s complement = r n -N ≠ 0 r’s complement = (r-1)’s complement +1 44

RADIX COMPLEMENT In binary system : 1’s complement and 2’s complement 101 =  1’s comp. is : 010 r= 2  r-1=1 …. 1’s complement : (2 n -1)-N Let (2 3 =8 )-1= 7 so  =  2’s complement is : 011 r =2  r n -N Let (2 3 =8 ) = 1000  =

RADIX COMPLEMENT Get 1’s complement and 2’s complement For : and Solution: 1’s : and ’s: and

RADIX COMPLEMENT Get 9’s comp and 10’s comp For : and The solution : 9’s comp: and ’s comp: and

Exercise Solve : a. (127.4) 8  ( ) 10 b. (B65F) 16  ( ) 10 c. (110101) 2  ( ) 10 d. (153) 10  ( ) 8 48

Exercise The solution a. (127) 8  (87 ) 10 b. (B65F) 16  (46687 ) 10 c. (110101) 2  ( 53) 10 d. (153) 10  ( 231) 8 49