Digital System Ch1-1 Chapter 1 Digital Systems and Binary Numbers Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.

Slides:



Advertisements
Similar presentations
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Advertisements

Chapter 1 Digital Systems and Numbers System
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Overview Digital Systems, Computers, and Beyond
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
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
1.6 Signed Binary Numbers.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Introduction to Digital Logic Design
Digital Systems and Binary Numbers
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Chapter 1 Digital Systems and Binary Numbers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Digital Design: From Gates to Intelligent Machines
Logic and Digital System Design - CS 303
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.
CS220 : Digital Design.
1.7 BINARY CODES BCD Code (Binary –Coded Decimal ) BCD Addition
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 2 – Binary Codes.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
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.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
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.8 Binary Storage and Registers
Computer Math CPS120 Introduction to Computer Science Lecture 4.
Digital Systems and Binary Numbers
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
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
1 CHAPTER 1 DIGITAL SYSTEMS AND BINARY NUMBERS 2 O UTLINE OF C HAPTER Digital Systems 1.2 Binary Numbers 1.3 Number-base Conversions 1.4 Octal.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
D IGITAL C IRCUITS Book Title: Digital Design Edition: Fourth Author: M. Morris Mano 1.
Chapter 1: Binary Systems
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
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.
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.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
Digital Logic Design Ch1-1 Chapter 1 Digital Systems and Binary Numbers Mustafa Kemal Uyguroğlu Digital Logic Design I.
Chapter 1 – Digital Systems and Information Logic and Computer Design Fundamentals.
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.
Unit 1 Introduction Number Systems and Conversion.
Chapter 1 Digital Systems and Binary Numbers
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Digital Systems and Binary Numbers
CHAPTER 1 : INTRODUCTION
Digital Systems and Binary Numbers
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
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 Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

Digital System Ch1-1 Chapter 1 Digital Systems and Binary Numbers Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統

Digital System Ch1-2 Outline of Chapter Digital Systems 1.2 Binary Numbers 1.3 Number-base Conversions 1.4 Octal and Hexadecimal Numbers 1.5 Complements 1.6 Signed Binary Numbers 1.7 Binary Codes 1.8 Binary Storage and Registers 1.9 Binary Logic

Digital System Ch Digital Systems and Binary Numbers (p.17) Digital age and information age Digital computers  General purposes  Many scientific, industrial and commercial applications Digital systems  Telephone switching exchanges  Digital camera  Electronic calculators, PDA's  Digital TV Discrete information-processing systems  Manipulate discrete elements of information  For example, {1, 2, 3, …} and {A, B, C, …}… Question 1: 這些分離的數 元是如何用訊號 (signal) 來 表示的 ?

Digital System Ch1-4 Analog and Digital Signal Analog system  The physical quantities or signals may vary continuously over a specified range. Digital system  The physical quantities or signals can assume only discrete values.  Greater accuracy t X(t)X(t) t X(t)X(t) Analog signalDigital signal

Digital System Ch1-5 Binary Digital Signal An information variable represented by physical quantity. For digital systems, the variable takes on discrete values.  Two level, or binary values are the most prevalent values. Binary values are represented abstractly by:  Digits 0 and 1  Words (symbols) False (F) and True (T)  Words (symbols) Low (L) and High (H)  And words On and Off Binary values are represented by values or ranges of values of physical quantities. t V(t)V(t) Binary digital signal Logic 1 Logic 0 undefine Hint 1: 二元數元 (0 與 1) 是數位系統的基礎。 Question 2: 如何將 生活裡,眾多的資 料用二元數元表示 ?

Digital System Ch Binary Numbers (p.19) Decimal number … a 5 a 4 a 3 a 2 a 1 a 0.a  1 a  2 a  3 … Decimal point Example: Base or radix Power General form of base-r system Coefficient: a j = 0 to r  1

Digital System Ch1-7 Binary Numbers (p.20, 21) Special Powers of 2  2 10 (1024) is Kilo, denoted "K"  2 20 (1,048,576) is Mega, denoted "M"  2 30 (1,073,741,824) is Giga, denoted "G" Powers of two Example: Base-2 number Arithmetic operation Arithmetic operations with numbers in base- r follow the same rules as decimal numbers.

Digital System Ch1-8 Binary Arithmetic (p.21) Single Bit Addition with Carry Multiple Bit Addition Single Bit Subtraction with Borrow Multiple Bit Subtraction Multiplication BCD Addition

Digital System Ch1-9 Addition Multiplication Subtraction Augend: Addend: Sum: Minuend: Subtrahend: Difference: Multiplicand 1011 Multiplier × 101 Partial Products Product Binary Arithmetic (p.21) Question 3: 數位系統的算 數運算只有加法, why?

Digital System Ch Number-Base Conversions (p.21) The six letters (in addition to the 10 integers) in hexadecimal represent: 10 (A), 11 (B), 12 (C), 13 (D), 14 (E), and 15 (F), respectively. NameRadixDigits Binary20,1 Octal80,1,2,3,4,5,6,7 Decimal100,1,2,3,4,5,6,7,8,9 Hexadecimal160,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Digital System Ch1-11 Number-Base Conversions (p.22) Example1.1  Convert decimal 41 to binary. The process is continued until the integer quotient becomes 0. Integer Quotient RemainderCoefficient 41/2=201/2a 0 = 1 20/2=100a 1 = 0 10/2=50a 2 = 0 5/2=21/2a 3 = 1 2/2=10a 4 = 0 1/2=01/2a 5 = 1

Digital System Ch1-12 Number-Base Conversions (p.22) Example1.1 (cont.)  The arithmetic process can be manipulated more conveniently as follows:

Digital System Ch1-13 Number-Base Conversions (p.22, 23) Example 1.2  Convert decimal 153 to octal. The required base r is 8. Example1.3  Convert (0.6875) 10 to binary.  The process is continued until the fraction becomes 0 or until the number of digits has sufficient accuracy.

Digital System Ch1-14 Number-Base Conversions Example1.3 (cont.)  To convert a decimal fraction to a number expressed in base r, a similar procedure is used. However, multiplication is by r instead of 2, and the coefficients found from the integers may range in value from 0 to r  1 instead of 0 and 1.

Digital System Ch1-15 Number-Base Conversions (p.23) Example1.4  Convert (0.513) 10 to octal. From Examples 1.1 and 1.3:( ) 10 = ( ) 2 From Examples 1.2 and 1.4:( ) 10 = ( ) 8

Digital System Ch Octal and Hexadecimal Numbers (p.24) Numbers with different bases: Table 1.2.

Digital System Ch1-17 Octal and Hexadecimal Numbers (p.25) Conversion from binary to octal can be done by positioning the binary number into groups of three digits each, starting from the binary point and proceeding to the left and to the right. Conversion from binary to hexadecimal is similar, except that the binary number is divided into groups of four digits: Conversion from octal or hexadecimal to binary is done by reversing the preceding procedure.

Digital System Ch Complements (p.25) There are two types of complements for each base-r system: the radix complement and diminished radix complement. Diminished Radix Complement Example: For binary numbers, r = 2 and r – 1 = 1, so the 1's complement of N is (2 n  1) – N. Example: the r's complement and the second as the (r  1)'s complement.

Digital System Ch1-19 Complements (p.26) Radix Complement Example: Base-10 Example: Base-2 The r's complement of an n-digit number N in base r is defined as r n – N for N ≠ 0 and as 0 for N = 0. Comparing with the (r  1) 's complement, we note that the r's complement is obtained by adding 1 to the (r  1) 's complement, since r n – N = [(r n  1) – N] + 1. The 10's complement of is The 10's complement of is The 2's complement of is The 2's complement of is Question 4: 補數到底 有什麼作用 ?

Digital System Ch1-20 Complements (p.27) Subtraction with Complements  The subtraction of two n-digit unsigned numbers M – N in base r can be done as follows: Hint 2: 數位系統的算 數運算只有加法,以 簡化硬體成本。

Digital System Ch1-21 Complements (p.28) Example 1.5  Using 10's complement, subtract – Example 1.6  Using 10's complement, subtract 3250 – There is no end carry. Therefore, the answer is – (10's complement of 30718) = 

Digital System Ch1-22 Complements (p.28) Example 1.7  Given the two binary numbers X = and Y = , perform the subtraction (a) X – Y ; and (b) Y  X, by using 2's complement. There is no end carry. Therefore, the answer is Y – X =  (2's complement of ) = 

Digital System Ch1-23 Complements (p.29) Subtraction of unsigned numbers can also be done by means of the (r  1)'s complement. Remember that the (r  1) 's complement is one less then the r's complement. Example 1.8  Repeat Example 1.7, but this time using 1's complement. There is no end carry, Therefore, the answer is Y – X =  (1's complement of ) =  Hint 3: 以上稱為無號數 (unsigned-magnitude) 的表示。

Digital System Ch Signed Binary Numbers (p.30) To represent negative integers, we need a notation for negative values. It is customary to represent the sign with a bit placed in the leftmost position of the number since binary digits. The convention is to make the sign bit 0 for positive and 1 for negative. Example: Table 1.3 lists all possible four-bit signed binary numbers in the three representations. Question 5: 三種表示同 一負數 (-9) ,但有何差別 ?

Digital System Ch1-25 Signed Binary Numbers (p.31)

Digital System Ch1-26 Signed Binary Numbers (p.32) Arithmetic addition  The addition of two numbers in the signed-magnitude system follows the rules of ordinary arithmetic. If the signs are the same, we add the two magnitudes and give the sum the common sign. If the signs are different, we subtract the smaller magnitude from the larger and give the difference the sign if the larger magnitude.  The addition of two signed binary numbers with negative numbers represented in signed-2's-complement form is obtained from the addition of the two numbers, including their sign bits.  A carry out of the sign-bit position is discarded. Example: Hint 4: 2’s 的算數運算所 產生的溢位 (overflow) 可以被忽略。

Digital System Ch1-27 Signed Binary Numbers (p.33) Arithmetic Subtraction  In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and add it to the minuend (including sign bit). 2.A carry out of sign-bit position is discarded. (  6)  (  13)(  ) ( ) (+ 7) Hint 5: 一個負數的補數 在補數形示裡會產生相 等的正數。

Digital System Ch Binary Codes (p.34) BCD Code ( 二進位碼十進數 )  A number with k decimal digits will require 4k bits in BCD.  Decimal 396 is represented in BCD with 12bits as , with each group of 4 bits representing one decimal digit.  A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9.  The binary combinations 1010 through 1111 are not used and have no meaning in BCD.

Digital System Ch1-29 Binary Code (p.35) Example:  Consider decimal 185 and its corresponding value in BCD and binary: BCD addition Question 6: 為何要使用 BCD 碼 ?

Digital System Ch1-30 Binary Code (p.36) Example:  Consider the addition of = 760 in BCD: Decimal Arithmetic: (+375) + (-240) = +135 Hint 6: using 10’s of BCD

Digital System Ch1-31 Binary Codes (p.37) Other Decimal Codes Hint 7: 2421 與 Excess-3 碼都是 自我補數 (self-complementing) 。

Digital System Ch1-32 Binary Codes (p.38) Gray Code  The advantage is that only bit in the code group changes in going from one number to the next. » Error detection. » Representation of analog data. » Low power design and onto!!

Digital System Ch1-33 Binary Codes (p.39, 40) American Standard Code for Information Interchange (ASCII) Character Code

Digital System Ch1-34 Binary Codes (p.40) ASCII Character Code

Digital System Ch1-35 ASCII Character Codes American Standard Code for Information Interchange (Refer to Table 1.7) A popular code used to represent information sent as character- based data. It uses 7-bits to represent:  94 Graphic printing characters.  34 Non-printing characters. Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return). Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas).

Digital System Ch1-36 ASCII Properties ASCII has some interesting properties:  Digits 0 to 9 span Hexadecimal values to  Upper case A-Z span to 5A 16  Lower case a-z span to 7A 16 » Lower to upper case translation (and vice versa) occurs by flipping bit 6.

Digital System Ch1-37 Binary Codes (p.41) Error-Detecting Code  To detect errors in data communication and processing, an eighth bit is sometimes added to the ASCII character to indicate its parity.  A parity bit is an extra bit included with a message to make the total number of 1's either even or odd. Example:  Consider the following two characters and their even and odd parity:

Digital System Ch1-38 Binary Codes Error-Detecting Code  Redundancy (e.g. extra information), in the form of extra bits, can be incorporated into binary code words to detect and correct errors.  A simple form of redundancy is parity, an extra bit appended onto the code word to make the number of 1’s odd or even. Parity can detect all single- bit errors and some multiple-bit errors.  A code word has even parity if the number of 1’s in the code word is even.  A code word has odd parity if the number of 1’s in the code word is odd.  Example: (odd parity) Message B: Message A: (even parity)

Digital System Ch Binary Storage and Registers (p.41) Registers  A binary cell is a device that possesses two stable states and is capable of storing one of the two states.  A register is a group of binary cells. A register with n cells can store any discrete quantity of information that contains n bits. A binary cell  Two stable state  Store one bit of information  Examples: flip-flop circuits, ferrite cores, capacitor A register  A group of binary cells  AX in x86 CPU Register Transfer  A transfer of the information stored in one register to another.  One of the major operations in digital system.  An example in next slides. n cells 2 n possible states

Digital System Ch1-40 A Digital Computer Example Synchronous or Asynchronous? Inputs: Keyboard, mouse, modem, microphone Outputs: CRT, LCD, modem, speakers

Digital System Ch1-41 Transfer of information (p.43) Figure 1.1 Transfer of information among register

Digital System Ch1-42 Transfer of information (p.44) The other major component of a digital system  Circuit elements to manipulate individual bits of information  Load-store machine LDR1; LDR2; ADD R3, R2, R1; SDR3; Figure 1.2 Example of binary information processing

Digital System Ch Binary Logic (p.44) Definition of Binary Logic  Binary logic consists of binary variables and a set of logical operations.  The variables are designated by letters of the alphabet, such as A, B, C, x, y, z, etc, with each variable having two and only two distinct possible values: 1 and 0,  Three basic logical operations: AND, OR, and NOT.

Digital System Ch1-44 Binary Logic (p.45) The truth tables for AND, OR, and NOT are given in Table 1.8.

Digital System Ch1-45 Binary Logic (p.46) Logic gates  Example of binary signals Logic 1 Logic 0 Un-define Figure 1.3 Example of binary signals

Digital System Ch1-46 Binary Logic (p.46) Logic gates  Graphic Symbols and Input-Output Signals for Logic gates: Fig. 1.4 Symbols for digital logic circuits Fig. 1.5 Input-Output signals for gates

Digital System Ch1-47 Binary Logic (p.47) Logic gates  Graphic Symbols and Input-Output Signals for Logic gates: Fig. 1.6 Gates with multiple inputs

Digital System Ch1-48 Homework 1 Problem 1.1, 1.4, 1.8, 1.10, 1.11, 1.15, 1.18, 1.25, 1.35, 1.36 Due day: 10/4