©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.

Slides:



Advertisements
Similar presentations
SHA-1 Secure Hash Algorithm 1. SHA-1 – Brief Introduction 家族是美國國家安全局 (NSA) 設計,美國國家標 準與技術研究院 (NIST) 發佈的一系列密碼雜湊函 數,發表於 1993 年 從一個最大 2 64 位元的訊息中產生一串 160.
Advertisements

ECE 331 – Digital System Design
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號
布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
: A-Sequence 星級 : ★★☆☆☆ 題組: Online-judge.uva.es PROBLEM SET Volume CIX 題號: Problem D : A-Sequence 解題者:薛祖淵 解題日期: 2006 年 2 月 21 日 題意:一開始先輸入一個.
T-SQL 運算子介紹 11/29. 運算子的總類 指定運算子 算術運算子 比較運算子 邏輯運算子 位元運算子 字串連結運算子 單一運算元運算子.
指導教授:陳淑媛 學生:李宗叡 李卿輔.  利用下列三種方法 (Edge Detection 、 Local Binary Pattern 、 Structured Local Edge Pattern) 來判斷是否為場景變換,以方便使用者來 找出所要的片段。
1.1 線性方程式系統簡介 1.2 高斯消去法與高斯-喬登消去法 1.3 線性方程式系統的應用(-Skip-)
ECE 331 – Digital System Design
具備人臉追蹤與辨識功能的一個 智慧型數位監視系統 系統架構 在巡邏模式中 ,攝影機會左右來回巡視,並 利用動態膚色偵測得知是否有移動膚色物體, 若有移動的膚色物體則進入到追蹤模式,反之 則繼續巡視。
聯合大學資工系 周念湘 BCC 數字系統. 聯合大學資工系 周念湘 2 r 進位:轉成 10 進位 r 代表「基底」  10 進位: r = 10  2 進位: r = 2 D r : 表示某個 r 進位的數 (r 不寫,表.
Digital Signal Processing with Examples in M ATLAB ® Chap 1 Introduction Ming-Hong Shih, Aug 25, 2003.
1 第 2 章 數字系統與資料表示法. 2 章節大綱 2-1 電腦的基本單位 電腦的基本單位 2-2 數字系統 數字系統 2-3 數值表示法 數值表示法 2-4 數值算術運算 數值算術運算 2-5 數碼系統 數碼系統 2-6 文字表示法 文字表示法 2-7 圖形表示法 圖形表示法 2-8 聲音表示法.
3.1 矩陣的行列式 3.2 使用基本運算求行列式 3.3 行列式的性質 3.4 特徵值介紹 3.5 行列式的應用
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
Chapter 10 m-way 搜尋樹與B-Tree
What is Computer.
Extreme Discrete Summation ★★★★☆ 題組: Contest Archive with Online Judge 題號: Extreme Discrete Summation 解題者:蔡宗翰 解題日期: 2008 年 10 月 13 日.
計算機概論 第6章 數位邏輯設計.
2005/7 Linear system-1 The Linear Equation System and Eliminations.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號 數位訊號 (digital signal) 指的是以預先定義的符號表示不連續 的訊號 one bit 8 bits=one byte 電腦裡的所有資料,包括文 字、數據、影像、音訊、視 訊,都是用二進位來表示的。
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號
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 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2008.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
數字系統與資料表示法 教師: 陳炯勳 數系轉換 r進制數字 稱為 base r或 radix r 有r個計數符號,計數順序逢r歸零(進位) A n A n - 1 ‥‥A 2 A 1 A 0 ﹒A -1 A -2 ‥‥A -m 其中A n 及A.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
Chapter 3 Number Representation
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2009.
Number Representation Rizwan Rehman, CCS, DU. Convert a number from decimal to binary notation and vice versa. Understand the different representations.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
Chapter 4 Operations on Bits. Apply arithmetic operations on bits when the integer is represented in two’s complement. Apply logical operations on bits.
Digital Design: Principles and Practices Chapter 2 Number Systems and Codes.
Chapter 7 Arithmetic Operations and Circuits Binary Arithmetic Addition –When the sum exceeds 1, carry a 1 over to the next-more-significant column.
©2010 Cengage Learning CHAPTER 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS This chapter in the book includes: Objectives Study Guide.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Foundations of Computer Science Chapter 4 Operations on Bits.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
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,
ECE 331 – Digital System Design
Digital System Ch1-1 Chapter 1 Digital Systems and Binary Numbers Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.
Number systems, Operations, and Codes
©2010 Cengage Learning CHAPTER 3 BOOLEAN ALGEBRA (continued) 3.1Multiplying Out and Factoring Expressions 3.2Exclusive-OR and Equivalence Operations 3.3The.
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
2015/11/23 Jackie Kan /11/23NTU DSD (Digital System.
Discrete Mathematics Section 3.7 Applications of Number Theory 大葉大學 資訊工程系 黃鈴玲.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Monday, January 13 CEC 220 Digital Circuit Design Slide 1 of 14.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Introduction To Number Systems Binary System M. AL-Towaileb1.
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Fri, Aug 28 CEC 220 Digital Circuit Design Slide 1 of 14.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
©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.
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.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Week 1(Number System) Muhammad Ammad uddin Logic Design Lab I (CEN211)
Unit I From Fundamentals of Logic Design by Roth and Kinney.
Unit 1 Introduction Number Systems and Conversion.
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
CHAPTER 18 Circuits for Arithmetic Operations
디지털 로직 및 CAD 실습 Fundamentals of Logic Design (6e) Charles H. Roth, Jr.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Chapter 3 Data Representation
Introduction To Number Systems
Presentation transcript:

©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 this chapter. This chapter in the book includes: Objectives Study Guide 1.1Digital Systems and Switching Circuits 1.2Number Systems and Conversion 1.3Binary Arithmetic 1.4Representation of Negative Numbers 1.5Binary Codes Problems

©2010 Cengage Learning Figure 1-1: Switching circuit

©2010 Cengage Learning Decimal Notation = 9x x x x x10 -2 Binary = 1x x x x x x2 -2 = / / 4 = ( 下標 : Base 10) (Base 2) Number system and Conversion 二進制、八進制、十進制、十六進制

©2010 Cengage Learning 建立一數字系統 : 以 R 為基數,用一幕級數 (power series) 來展開 來獲知 我們所習用的十進制 ( 詳課本 pp.9) Octal = 1x x x x8 -1 = x 1 / 8 = Hexadecimal Composed from 0 、 1 、 2 、 3 、 4 、 5 、 6 、 7 、 8 、 9 、 A 、 B 、 C 、 D A2F 16 = 10x x x16 0 = =

©2010 Cengage Learning EXAMPLE: Convert to binary. Conversion (a) 十進制轉二進制 : 整數值用連除法 ( 詳課本 p.10)

©2010 Cengage Learning Conversion (b) EXAMPLE:Convert to binary. 十進制轉二進制 : 小數值用連乘法 ( 詳課本 p.10) 乘盡 乘小數

©2010 Cengage Learning Conversion (c) EXAMPLE: Convert to binary. 乘不盡

©2010 Cengage Learning Conversion (d) EXAMPLE: Convert to base 7.

©2010 Cengage Learning Equation (1-1) Conversion from binary to hexadecimal (and conversely) can be done by inspection because each hexadecimal digit corresponds to exactly four binary digits (bits). Binary  Hexadecimal Conversion 每一個 16 進位數可以轉換成等值 4- 位元二進位數 每一個 8 進位數可以轉換成等值 3- 位元二進位數 (a)4-digits 為一單位 (b) 不足位元以 0 補上

©2010 Cengage Learning Addition Add and in binary. 二進位之運算法 (Binary Arithmetic) 加法

©2010 Cengage Learning Subtraction (a) The subtraction table for binary numbers is 0 – 0 = 0 0 – 1 = 1and borrow 1 from the next column 1 – 0 = 1 1 – 1 = 0 Borrowing 1 from a column is equivalent to subtracting 1 from that column. 二進位之運算法 (Binary Arithmetic) 減法

©2010 Cengage Learning Subtraction (b) EXAMPLES OF BINARY SUBTRACTION: 另一種二進位減法可以用 2’ 補數 (complement arithmetic) 來計算

©2010 Cengage Learning Subtraction (c) A detailed analysis of the borrowing process for this example, indicating first a borrow of 1 from column 1 and then a borrow of 1 from column 2, is as follows:

©2010 Cengage Learning Multiplication (a) The multiplication table for binary numbers is 0 x 0 = 0 0 x 1 = 0 1 x 0 = 0 1 x 1 = 1 二進位之運算法 (Binary Arithmetic) 乘法

©2010 Cengage Learning Multiplication (b) The following example illustrates multiplication of by in binary:

©2010 Cengage Learning Multiplication (c) When doing binary multiplication, a common way to avoid carries greater than 1 is to add in the partial products one at a time as illustrated by the following example: 1111multiplicand 1101multiplier 11111st partial product nd partial product (01111)sum of first two partial products rd partial product ( )sum after adding 3rd partial product th partial product final product (sum after adding 4th partial product) 二進位之運算法 : 避免大於 1 之數值

©2010 Cengage Learning Binary Division Binary division is similar to decimal division, except it is much easier because the only two possible quotient digits are 0 and 1. We start division by comparing the divisor with the upper bits of the dividend. If we cannot subtract without getting a negative result, we move one place to the right and try again. If we can subtract, we place a 1 for the quotient above the number we subtracted from and append the next dividend bit to the end of the difference and repeat this process with this modified difference until we run out of bits in the dividend. 二進位之運算法 : 除法

©2010 Cengage Learning Binary Division The following example illustrates division of by in binary: 二進位之運算法 : 不足以扣除,則往後退一位

©2010 Cengage Learning 3 Systems for representing negative numbers in binary Sign & Magnitude: Most significant bit is the sign Ex: – 5 10 = ’s Complement: = (2 n – 1) - N Ex: – 5 10 = (2 4 – 1) – 5 = 16 – 1 – 5 = = ’s Complement: N* = 2 n - N Ex: – 5 10 = 2 4 – 5 = 16 – 5 = = Section 1.4 (p. 16) For n-bit word, the first sign is sign, remaining n-1bits represent the magnitude So we have 2 n-1 for positive and 2 n-1 for negative integers

©2010 Cengage Learning 1’s Complement: (a)For n= 4: -0 =(2 4 -1)-0=15 =(1111) -8=(2 4 -1)-8= 7=(0111) (b) 正數 (N) 與負數 : 由 1 變 0 0 變 1 (c) 1’s complement + 1 = 2’s complement 2’s Complement: (a) 正數不變 (N) (b) 負數以 2 n 去扣正數 : 2 n -N ( 其中 n 為數字系統之位元數 (bit)) (c) 所有 2’s complement 之負數,其最左邊數值為 1 。 ( 與前述之 Sign & Magnitude system 同樣具備易於辨識之優點 ) 與 +7 混淆

©2010 Cengage Learning Table 1-1: Signed Binary Integers (word length n = 4) 1’ and 2’ complement are commonly used: adv. : arithmetic unit are easy to design 由 1 變 0 0 變 1 1’ s +1

©2010 Cengage Learning 2’s Complement Addition (a)

©2010 Cengage Learning 2’s Complement Addition (b) proof

©2010 Cengage Learning 2’s Complement Addition (c) proof

©2010 Cengage Learning 1’s Complement Addition (b) proof

©2010 Cengage Learning 1’s Complement Addition (c) proof

©2010 Cengage Learning 1’s Complement Addition (d)

©2010 Cengage Learning 2’s Complement Addition (d) Note: For 1’s and 2’s complement to get an n-bit sum is : An overflow occurs if adding two positive numbers gives a negative answer or if adding two negative numbers gives a positive answer: Than overflow occurs!

©2010 Cengage Learning Binary Codes Although most large computers work internally with binary numbers, the input-output equipment generally uses decimal numbers. Because most logic circuits only accept two-valued signals, the decimal numbers must be coded in terms of binary signals. In the simplest form of binary code, each decimal digit is replaced by its binary equivalent. For example, is represented by: Section 1.5 (p. 21)

©2010 Cengage Learning Table 1–2. Binary Codes for Decimal Digits Error-checking

©2010 Cengage Learning Table 1-3 ASCII code (incomplete)

©2010 Cengage Learning Chapter 01-Homework