Download presentation
Presentation is loading. Please wait.
Published byAdrian Barber Modified over 6 years ago
1
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也 道紀章(Chapter 14) 道無形象, 視之不可見者曰夷 Fuw-Yi Yang
2
Text Book: Digital Design 4th Ed.
Chap 1 Digital Systems and Binary Numbers 1.1 Digital Systems 1.2 Binary Numbers-- Table 1.1 1.3 Number-Base Conversions-- Example 1.1~1.4 1.4 Octal and Hexadecimal Numbers -- Table 1.2 1.5 Complements -- Example 1.5~1.8 1.6 Signed Binary Numbers -- Table 1.3 1.7 Binary Codes -- Table 1.4~1.7 1.8 Binary Storage and Registers -- Figure 1.1~1.2 1.9 Binary Logic -- Table 1.8, Figure 1.3~1.6 Fuw-Yi Yang
3
Text Book: Digital Design 4th Ed. Chap 1 1.2 Binary Numbers
In general, a number expressed in a base-r system has coefficients multiplied by powers of r: anrn+an-1rn-1+…+a1r1+a0+a-1r-1+a-2r-2 +…+a-mr-m r is called base or radix. Fuw-Yi Yang
4
In general, a number expressed in a base-r system has
coefficients multiplied by powers of r: anrn+an-1rn-1+…+a1r1+a0+a-1r-1+a-2r-2 +…+a-mr-m r is called base or radix. Fuw-Yi Yang
5
Text Book: Digital Design 4th Ed. Chap 1 1.2 Binary Numbers
是否注意到指數為負之值呢? Ex: 2-1, 2-3 ,2-4 Fuw-Yi Yang
6
Text Book: Digital Design 4th Ed. Chap 1 1.3 Number-Base Conversions
Example1.1 Convert decimal 41 to binary, (41)10 = (?)2 (41)D= (?)B Example1.2 (153)10 = (?)8 Example1.3 (0.6875)10 = (?)2 Example1.4 (0.513)10 = (?)8 Fuw-Yi Yang
7
Text Book: Digital Design 4th Ed.
Chap Octal and Hexadecimal Numbers See Table 1.2 Fuw-Yi Yang
8
Text Book: Digital Design 4th Ed.
Chap Octal and Hexadecimal Numbers See Table 1.2 Fuw-Yi Yang
9
Text Book: Digital Design 4th Ed. Chap 1 1.5 Complements
Diminished Radix Complement Given a number N in base r having n digits, the (r - 1)’s complement of N is defined as (rn - 1) - N. The 1’s complement of is Radix Complement Given a number N in base r having n digits, the r’s complement of N is defined as rn - N for N 0 and as 0 for N = 0 . The 2’s complement of is Fuw-Yi Yang
10
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements The subtraction of two n-digit unsigned numbers M - N in base r can be done as follows: 1. M + (rn - N ), note that (rn - N ) is r’s complement of N. 2. If M N, the sum will produce an end carry rn, which can be discarded; what is left is the result M - N. 3. If M < N, the sum does not produce an end carry and is equal to rn - (N - M), which is r’s complement of (N - M). Take the r’s complement of the sum and place a negative sign in front. Fuw-Yi Yang
11
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements Example 1.5 Using 10’s complement, subtract 1. M = 72532, N = 3250, 10’s complement of N = 96750 2. 3. answer: 69282 Fuw-Yi Yang
12
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements Example 1.6 Using 10’s complement, subtract 1. M = 3250, N = 72532, 10’s complement of N = 27468 2. 3. answer: -( ) = Fuw-Yi Yang
13
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements Example 1.7 Using 2’s complement, subtract 1. M = , N = , 2’s complement of N = 2. 3. answer: Fuw-Yi Yang
14
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements Example 1.7' Using 2’s complement, subtract 1. M = , N = , 2’s complement of N = 2. 3. answer: - ( ) = Fuw-Yi Yang
15
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements Example 1.8 Using 1’s complement, subtract 1. M = , N = , 1’s complement of N = 2. 3. answer: (rn carry, call end-around carry) Fuw-Yi Yang
16
Text Book: Digital Design 4th Ed.
Chap Complements— Subtraction with Complements Example 1.8' Using 1’s complement, subtract 1. M = , N = , 1’s complement of N = 2. 3. answer: - ( ) = Fuw-Yi Yang
17
Text Book: Digital Design 4th Ed. Chap 1 1.6 Signed Binary Numbers
Next table shows signed binary numbers Fuw-Yi Yang
18
Text Book: Digital Design 4th Ed. Chap 1 1.6 Signed Binary Numbers
Arithmetic addition Arithmetic subtraction See next table Fuw-Yi Yang
19
Text Book: Digital Design 4th Ed. Chap 1 1.6 Signed Binary Numbers
Arithmetic addition with comparison: The addition of two numbers in the signed magnitude system follows the rules of ordinary arithmetic. If the signed are the same, we add the two magnitudes and give the sum the common sign. If the signed are different, we subtract the smaller magnitude from the larger and give the difference the sign of the larger magnitude. EX. (+25) + (-38) = -( ) = -13 Fuw-Yi Yang
20
Text Book: Digital Design 4th Ed. Chap 1 1.6 Signed Binary Numbers
Arithmetic addition without comparison: 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 signed bits. A carry out of the signed bit position is discarded (note that the 4th case). See examples in next page. Fuw-Yi Yang
21
Text Book: Digital Design 4th Ed. Chap 1 1.6 Signed Binary Numbers
Arithmetic addition without comparison: Fuw-Yi Yang
22
Text Book: Digital Design 4th Ed. Chap 1 1.7 Binary Codes
BCD (Binary-Coded Decimal) Code Table 1.4 Decimal codes Table 1.5 (4 different Codes for the Decimal Digits) Gray code Table 1.6 ASCII character code Table 1.7 Error Detecting code See next tables 1.4~1.7 Fuw-Yi Yang
23
Text Book: Digital Design 4th Ed. Chap 1 1.7 Binary Codes
BCD Code Decimal codes Gray code ASCII character code Error Detecting code See next tables Fuw-Yi Yang
24
Text Book: Digital Design 4th Ed. Chap 1 1.7 Binary Codes
BCD Code Decimal codes Gray code ASCII character code Error Detecting code See next tables Fuw-Yi Yang
25
Text Book: Digital Design 4th Ed. Chap 1 1.7 Binary Codes
BCD Code Decimal codes Gray code ASCII character code Error Detecting code See next tables Fuw-Yi Yang
26
Text Book: Digital Design 4th Ed. Chap 1 1.7 Binary Codes
BCD Code Decimal codes Gray code ASCII character code Error Detecting code See next tables Fuw-Yi Yang
27
Text Book: Digital Design 4th Ed.
Chap Binary Storage and Registers 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 digital system is characterized by its registers and the components that perform data processing. In digital systems, a register transfer operation is a basic operation that consists of a transfer of binary information from one set of registers into another set of registers. Fuw-Yi Yang
28
Text Book: Digital Design 4th Ed.
Chap Binary Storage and Registers 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 digital system is characterized by its registers and the components that perform data processing. In digital systems, a register transfer operation is a basic operation that consists of a transfer of binary information from one set of registers into another set of registers. Fuw-Yi Yang
29
Text Book: Digital Design 4th Ed.
Chap Binary Storage and Registers 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 digital system is characterized by its registers and the components that perform data processing. In digital systems, a register transfer operation is a basic operation that consists of a transfer of binary information from one set of registers into another set of registers. Fuw-Yi Yang
30
Text Book: Digital Design 4th Ed. Chap 1 1.9 Binary Logic
Binary logic consists of binary variables and a set of logical operations. There are three basic logical operations: AND, OR, and NOT. AND, OR, NOT: Table 1.8 Binary signals: Figure 1.3 Logic circuit: Figures 1.4~1.6 Ex 1.35, 1.36 Fuw-Yi Yang
31
Binary logic consists of binary variables and a set of
logical operations. There are three basic logical operations: AND, OR, and NOT. See truth table 1.8 next page. Fuw-Yi Yang
32
Fuw-Yi Yang
33
Fuw-Yi Yang
34
Fuw-Yi Yang
35
Fuw-Yi Yang
36
Fuw-Yi Yang
37
Fuw-Yi Yang
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.