Module 2.  In Module 1, we have learned basic number representation which include binary, octal, hexadecimal and decimal.  In digital systems, numbers.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

NUMBER SYSTEM. How to convert hexadecimal numbers to decimal numbers? 230 Working from right to left, MULTIPLY each position with 8 raised to the power.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Agenda Shortcuts converting among numbering systems –Binary to Hex / Hex to Binary –Binary to Octal / Octal to Binary Signed and unsigned binary numbers.
James Tam Non decimal math: doing math with non-base 10 number systems Addition, subtraction and multiplication with binary, octal and hexadecimal.
Decimal Addition What is going on? (carry) (subtract the base)
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
ECE 331 – Digital System Design
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
ECE 301 – Digital Electronics Number Systems and Conversion, Binary Arithmetic, and Representation of Negative Numbers (Lecture #10) The slides included.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Introduction to Number Systems
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
ITEC 352 Lecture 6 Back to binary. Binary Review Decoders 7 segment display Complexity of wiring Questions?
COMP201 Computer Systems Number Representation. Number Representation Introduction Number Systems Integer Representations Examples  Englander Chapter.
NEGATIVE BINARY NUMBER – Digital Circuit 1 Choopan Rattanapoka.
Digital Systems and Binary Numbers
1 Computer Fundamental ITD1382 Coursework : 100% 1. Tests 2. Quizzes (Short) 3. Assignments Module Value : 3.0.
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 
©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g The magnitude.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Number Systems. Why binary numbers? Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
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 ≤
ECE 331 – Digital System Design
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
1 Week 2: Binary, Octal and Hexadecimal Numbers READING: Chapter 2.
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.
Positional Number Systems
Chapter1: Number Systems
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Digital Logic Lecture 3 Binary Arithmetic By Zyad Dwekat The Hashemite University Computer Engineering Department.
1 4. Computer Maths and Logic 4.1 Number Systems.
MECH1500 Chapter 3.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Week 1(Number System) Muhammad Ammad uddin Logic Design Lab I (CEN211)
DIGITAL Logic DESIGN Digital system and binary numbers Lecturer: Ms. Farwah Ahmad.
Negative Number Sign-Magnitude: left-most bit as the sign bit –16 bits –Example: 4-bit numbers is given by is given by ’s complement:
CPE 201 Digital Design Lecture 3: Digital Systems & Binary Numbers (3)
Lecturer: Santokh Singh
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Data Representation in Computer Systems
ITE102 – Computer Programming (C++)
Chapter 3 Data Representation
Number Systems.
Overview Introduction Data representation Fixed Point Representation
Chapter 1 Number Systems & Conversions
Data Representation Data Types Complements Fixed Point Representation
Data Representation in Computer Systems
Digital Logic & Design Lecture 02.
Digital Systems and Binary Numbers
Digital Logic Design (CSNB163)
ECE 301 – Digital Electronics
Binary Addition (1 of 2) Two 1-bit values A B A + B 1
Arithmetic Operation By: Asst Lec. Besma Nazar Nadhem
COE 202: Digital Logic Design Number Systems Part 2
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Module 2

 In Module 1, we have learned basic number representation which include binary, octal, hexadecimal and decimal.  In digital systems, numbers are manipulated in binary format. However, to ease human- machine interaction, we describe numbers in octal or hexadecimal.  Where as, decimal is used in daily life.  In this module, examples are only in decimal and binary (i.e. to ease learning via decimal examples and relate it to actual digital system implementation via binary examples). e.g = = FF 16

 In digital systems, digital numbers are manipulated via digital logic operation.  We have learned basic number operation in Module 1 which include subtraction.  Subtraction operation in digital logic is NOT similar to our normal paper and pencil calculation (i.e. borrow concept is not practical).  Instead, it is performed via complement function in order to simplify digital logic operation, hence to produce cheaper circuits.

 There are two types of complements for each radix r based system: Diminished Radix Complement  E.g. 9’s complement for radix 10 (decimal)  E.g. 1’s complement for radix 2 (binary) Radix Complement  E.g. 10’s complement for radix 10 (decimal)  E.g. 2’s complement for radix 2 (binary) (r-1)’ complement (r)’ complement

 Formulae: Given a number N in base r having n total digits, the (r-1)’s complement of N is defined as (r n – 1) - N

 Convert to its 9’s complement:  Working: Given a number N = in base r = 10 having n = 5 total digits, the 9’s complement of is defined as: (r n – 1) - N = (10 5 – 1) = ( ) – = (99 999) – = 87654

 Convert to its 1’s complement:  Working: Given a number N = in base r = 2 having n = 7 total digits, the 1’s complement of is defined as: (r n – 1) - N = (2 7 – 1) = ( ) – = ( ) – = ’s complement is performed by inversing all the bits

 Formulae: Given a number N in base r having n total digits, the (r)’s complement of N is defined as [(r n – 1) – N] + 1 OR r n – N (r-1)’s complement + 1

 Convert to its 10’s complement:  Working: Given a number N = in base r = 10 having n = 5 total digits, the 10’s complement of is defined as: (r n – 1) - N + 1 = (10 5 – 1) = ( ) – = (99 999) – = OR r n - N = = 87655

 Convert to its 2’s complement:  Working: Given a number N = in base r = 2 having n = 7 total digits, the 2’s complement of is defined as: (r n – 1) - N + 1= (2 7 – 1) = ( ) – = ( ) – = = OR r n - N = = – = Short cut 2’s complement: 1 st inversing all the bits 2 nd add 1

 Subtraction M – N can be carried using radix r’s complement. In digital system of radix r = 2, subtraction is performed using 2’s complement.  Recaps of radix complement formulae: Given a number N in base r having n total digits, the (r)’s complement of N is defined as  For M > N r n – N M – N = [M + (r n – N)] - r n

 Calculate – using 10’s complement.  Working: Given M = 56 and N = 42 in base r = 10 having n = 2 total digits 1 st :-> get 10’s complement of N r n = ’s complement of N= 100 – 42 = 58 2 nd :-> add 10’s complement of N to M M = 56 10’s complement of N = 58 M + 10’s complement of N = rd :-> minus r n from 2 nd result 2 nd result = 114 r n = 100 r n - (2 nd result)= 14

 Calculate – using 10’s complement.  Working: Given M = 61 and N = 27 in base r = 10 having n = 2 total digits 1 st :-> get 10’s complement of N r n = ’s complement of N= 100 – 27 = 73 2 nd :-> add 10’s complement of N to M M = 61 10’s complement of N = 73 M + 2’s complement of N =134 3 rd :-> minus r n from 2 nd result 2 nd result = 134 r n = 100 r n - (2 nd result)= 34

 Calculate – (56 10 – ) using 2’s complement.  Working: Given M = and N = in base r = 2 having n = 6 total digits Note: – = st :-> get 2’s complement of N 1’s complement of N = ’s complement of N = nd :-> add 2’s complement of N to M M = ’s complement of N = M + 2’s complement of N = rd :-> minus r n from 2 nd result 2 nd result = r n = r n - (2 nd result)= 1110

 Calculate – (i.e – ) using 2’s complement.  Working: Given M = and N = in base r = 2 having n = 6 total digits Note: – = st :-> get 2’s complement of N 1’s complement of N = ’s complement of N = nd :-> add 2’s complement of N to M M = ’s complement of N = M + 2’s complement of N = rd :-> minus r n from 2 nd result 2 nd result = r n = r n - (2 nd result)=

End of Module 2