1 CS151 Introduction to Digital Design Chapter 1 Lecture 3.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Chapter 1 Binary Systems 1-1. Digital Systems
Overview Digital Systems, Computers, and Beyond
SYEN 3330 Digital Systems Jung H. Kim Chapter 1 1 SYEN 3330 Digital Systems Chapter 1.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Overview Digital Systems, Computers, and Beyond
Overview Digital Systems, Computers, and Beyond
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
1 CSE-221 Digital Logic Design (DLD) Lecture-1: Digital Systems & Number Systems.
BASICS OF COMPUTER APPLICATIONS ASB 102. UNIT 1 Introducing computer system  Number system  What is number system?  Types of number system  Their.
Digital Computers and Information
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Mantıksal Tasarım – BBM231 M. Önder Efe
Introduction to Digital Logic Design
Number Systems and Codes
Chapter 1 1 CPE 231 Digital Logic Introduction Dr. Gheith Abandah [Adapted from the slides of the textbook of Mano and Kime]
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
Numeral Systems Subjects: Numeral System Positional systems Decimal
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 1 – Number Systems and.
Logic and Digital System Design - CS 303
Chapter 3 Data Representation
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
NUMBER SYSTEM AND COMPUTER CODES Chapter 2. Prelude Fingers, sticks, and other things for counting were not enough! Counting large numbers Count in groups.
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.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Number systems, Operations, and Codes
Positional Notation 642 in base 10 positional notation is:
Number Systems and Digital Codes
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Introduction To Number Systems Binary System M. AL-Towaileb1.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 1 Tom Kaminski & Charles R.
Overview 1-1 Information Representation
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
CS151 Introduction to Digital Design Chapter 1: Digital Systems and Information Lecture 2 1Created by: Ms.Amany AlSaleh.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
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.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
Logic and Computer Design Fundamentals
Introduction To Number Systems
Lecture 3 – Binary Arithmetic
Digital Systems and Number Systems
Lecture 3: Binary values and number systems
CHAPTER 1 : INTRODUCTION
Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina
Chapter 3 Data Representation
Number Systems.
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Chapter 1 Number Systems & Conversions
SYEN 3330 Digital Systems Chapter 1 SYEN 3330 Digital Systems.
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Overview Digital Systems and Computer Systems
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Electronics and Microprocessors
ECE 301 – Digital Electronics
Introduction To Number Systems
COE 202: Digital Logic Design Number Systems Part 2
Dr. Clincy Professor of CS
Presentation transcript:

1 CS151 Introduction to Digital Design Chapter 1 Lecture 3

CS Octal to Binary and Back Octal to Binary:  Restate the octal as three binary digits starting at the radix point and going both ways. Binary to Octal :  Group the binary digits into three bit groups starting at the radix point and going both ways, padding with zeros as needed in the fractional part.  Convert each group of three bits to an octal digit.

CS Hexadecimal to Binary and Back Hexadecimal to Binary:  Restate the hexadecimal as four binary digits starting at the radix point and going both ways. Binary to Hexadecimal:  Group the binary digits into four bit groups starting at the radix point and going both ways, padding with zeros as needed in the fractional part.  Convert each group of three bits to a hexadecimal digit.

CS Octal to Hexadecimal via Binary Convert octal to binary. Use groups of four bits and convert as above to hexadecimal digits. Example: Octal to Binary to Hexadecimal Why do these conversions work? Answer in notes page for this slide…

CS Conversion Between Bases  Method 2  To convert from one base to another: 1) Convert the Integer Part 2) Convert the Fraction Part 3) Join the two results with a radix point

CS Conversion Details To Convert the Integer Part: Repeatedly divide the number by the new radix and save the remainders. The digits for the new radix are the remainders in reverse order of their computation. If the new radix is > 10, then convert all remainders > 10 to digits A, B, … To Convert the Fractional Part: Repeatedly multiply the fraction by the new radix and save the integer digits that result. The digits for the new radix are the integer digits in order of their computation. If the new radix is > 10, then convert all integers > 10 to digits A, B, …

CS Example: Convert To Base 2 1. Convert 46 to Base 2 2. Convert to Base 2: 3. Join the results together with the radix point: Answer in notes page for this slide…

CS Additional Issue - Fractional Part Note that in this conversion, the fractional part became 0 as a result of the repeated multiplications. In general, it may take many bits to get this to happen or it may never happen. Example: Convert to N 2  0.65 = …  The fractional part begins repeating every 4 steps yielding repeating 1001 forever! Solution: Specify number of bits to right of radix point and round or truncate to this number.

CS Checking the Conversion To convert back, sum the digits times their respective powers of r. From the prior conversion of = 1*32 + 0*16 +1*8 +1*4 + 1*2 +0*1 = = = 1/2 + 1/8 + 1/16 = =

CS Number Ranges 624 Consider a 3-digit counter. What is the minimum number it can show? What is the maximum number it can show? What is it’s number range? position Each position has 10 possibilities: 0,1,2,3,4,5,6,7,8,9. 10 * 10 * 10 = 10 3 Radix # Positions Range: 0   ( )

CS Number Ranges 010 What if the counter was a 3-bit binary counter? What is the minimum number it can show? What is the maximum number it can show? What is it’s number range? position Each position has 2 possibilities: 0,1. 2 * 2 * 2 = 2 3 Radix # positions (bits) (000) 2 (111) 2 = 7 10 Range: 0  7 0  (2 3 -1)

CS Given n digits in radix r, there are r n distinct elements that can be represented. These elements range from 0 to r n -1 Number Ranges BONUS: What is the minimum number of bits, n, needed to represent a binary code of M elements ???

CS Number Ranges Range of numbers is based on the number of bits available in the hardware structure that store and process information. (E.g. registers). Usually, size of these structures is a power of 2. (8 bits, 16 bits, 32 bits, 64 bits and 128 bits).

CS Binary Arithmetic Single Bit Addition with Carry Multiple Bit Addition Single Bit Subtraction with Borrow Multiple Bit Subtraction Multiplication BCD Addition When working with base-r, use ONLY r allowable digits (0..r-1) and perform all computations with base r digits.

CS Single Bit Binary Addition with Carry Z X Y C S Z X Y C S

CS Extending this to two multiple bit examples: Carries 0 0 Augend Addend Sum Note: The 0 is the default Carry-In to the least significant bit. Multiple Bit Binary Addition Kindly view notes page for answer.

CS Given two binary digits (X,Y), a borrow in (Z) we get the following difference (S) and borrow (B): Borrow in (Z) of 0: Borrow in (Z) of 1: Single Bit Binary Subtraction with Borrow Z X Y BS Z X Y BS

CS Extending this to two multiple bit examples: Borrows 0 0 Minuend Subtrahend Difference Notes: The 0 is a Borrow-In to the least significant bit. If the Subtrahend > the Minuend, interchange and append a – to the result. Multiple Bit Binary Subtraction Kindly view notes page for answer.

CS Binary SubtractionBorrows: Minuend:10011 Subtrahend: Difference:  Swap Multiple Bit Binary Subtraction

CS Binary Multiplication +

CS Octal Multiplication Multiplicand:762 Multiplier: x Product: OctalDecimalOctal 5x2 =10= x6 +1=31= x7 +3=38= x2=8 = x6 +1=25= x7 +3=31= Form a table to calculate sums and products of 2 digits in base-r (in this case, base-8)

CS Hexadecimal Addition HexDecimal +++ Carry =16+ 5 Carry 1 14 = E19 = E 51 3 E F E 4 6 +