WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼...
Transcript of WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼...
![Page 1: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/1.jpg)
Digital Fundamentals
CHAPTER 1Number System and Conversion
![Page 2: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/2.jpg)
2
Digital and Analog Quantities 1
Analog quantities have continuous values
Digital quantitieshave discrete sets of values
![Page 3: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/3.jpg)
3
Binary Digits 1
The conventional numbering system uses ten digits: 0,1,2,3,4,5,6,7,8, and 9.
The binary numbering system uses just two digits: 0 and 1.
![Page 4: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/4.jpg)
4
Binary Digits 2
The two binary digits are designated 0 and 1
They can also be called LOW and HIGH, where LOW = 0 and HIGH = 1
![Page 5: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/5.jpg)
5
Binary Digits v.s. Logic Levels
Binary values are also represented by voltage levels
![Page 6: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/6.jpg)
6
Decimal Numbers
The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9
The decimal numbering system has a base of 10 with each position weighted by a factor of 10:
![Page 7: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/7.jpg)
7
Binary Numbers
The binary number system has two digits: 0 and 1
The binary numbering system has a base of 2 with each position weighted by a factor of 2:
![Page 8: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/8.jpg)
8
Decimal-to-Binary Conversion
Sum-of-weights method
Repeated division-by-2 method
Conversion of decimal fractions to binary
![Page 9: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/9.jpg)
9
Binary Arithmetic
Binary addition
Binary subtraction
Binary multiplication
Binary division
![Page 10: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/10.jpg)
10
Complements of Binary Numbers
1’s complements
2’s complements
![Page 11: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/11.jpg)
11
Complements of Binary Numbers
1’s complement
![Page 12: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/12.jpg)
12
Complements of Binary Numbers
2’s complement
![Page 13: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/13.jpg)
13
Signed Numbers
Signed-magnitude form
1’s and 2’s complement form
Decimal value of signed numbers
Range of values
Floating-point numbers
![Page 14: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/14.jpg)
14
Signed-magnitude form
The sign bit is the left-most bit in a signed binary number
A 0 sign bit indicates a positive magnitude
A 1 sign bit indicates a negative magnitude
![Page 15: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/15.jpg)
15
Complement Form
1’s complement form A negative value is the 1’s complement of the
corresponding positive value
2’s complement form A negative value is the 2’s complement of the
corresponding positive value
![Page 16: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/16.jpg)
16
Decimal Value of Signed Numbers
Sign-magnitude
1’s complement
2’s complement
![Page 17: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/17.jpg)
17
Range of Values
2’s complement form:
– (2n – 1) to + (2n – 1 – 1)
![Page 18: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/18.jpg)
18
Floating-Point Numbers
Single-precision (32 bits)
Double-precision (64 bits)
Extended-precision (80 bits)
![Page 19: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/19.jpg)
19
Arithmetic Operations with Signed Numbers
Addition
Subtraction
Multiplication
Division
![Page 20: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/20.jpg)
20
Addition of Signed Numbers 1
The parts of an addition function are:
Addend
Augend
Sum
Numbers are always added two at a time.
![Page 21: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/21.jpg)
21
Addition of Signed Numbers 2
Four conditions for adding numbers:
Both numbers are positive.
A positive number that is larger than a negative number.
A negative number that is larger than a positive number.
Both numbers are negative.
![Page 22: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/22.jpg)
22
Signs for Addition 1
When both numbers are positive, the sum is positive.
When the larger number is positive and the smaller is negative, the sum is positive. The carry is discarded.
![Page 23: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/23.jpg)
23
Signs for Addition 2
When the larger number is negative and the smaller is positive, the sum is negative (2’s complement form).
When both numbers are negative, the sum is negative (2’s complement form). The carry bit is discarded.
![Page 24: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/24.jpg)
24
Subtraction of Signed Numbers
The parts of a subtraction function are:
Subtrahend
Minuend
Difference
Subtraction is addition with the sign of the subtrahend changed.
![Page 25: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/25.jpg)
25
Subtraction
The sign of a positive or negative binary number is changed by taking its 2’s complement
To subtract two signed numbers, take the 2’s complement of the subtrahend and add. Discard any final carry bit.
![Page 26: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/26.jpg)
26
Multiplication of Signed Numbers 1
The parts of a multiplication function are: Multiplicand
Multiplier
Product
Multiplication is equivalent to adding a number to itself a number of times equal to the multiplier.
![Page 27: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/27.jpg)
27
Multiplication of Signed Numbers 2
There are two methods for multiplication:
Direct addition
Partial products
The method of partial products is the most commonly used.
![Page 28: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/28.jpg)
28
Multiplication of Signed Numbers 3
If the signs are the same, the product is positive.
If the signs are different, the product is negative.
![Page 29: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/29.jpg)
29
Division of Signed Numbers 1
The parts of a division operation are: Dividend
Divisor
Quotient
Division is equivalent to subtracting the divisor from the dividend a number of times equal to the quotient.
![Page 30: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/30.jpg)
30
Division of Signed Numbers 2
If the signs are the same, the quotient is positive.
If the signs are different, the quotient is negative.
![Page 31: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/31.jpg)
31
Hexadecimal Numbers 1
Decimal, binary, and hexadecimal numbers
![Page 32: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/32.jpg)
32
Binary-to-hexadecimal conversion
Hexadecimal-to-decimal conversion
Decimal-to-hexadecimal conversion
Hexadecimal Numbers 2
![Page 33: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/33.jpg)
33
Binary-to-Hexadecimal Conversion
Break the binary number into 4-bit groups
Replace each group with the hexadecimal equivalent
![Page 34: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/34.jpg)
34
Hexadecimal-to-Decimal Conversion
Convert the hexadecimal to groups of 4-bit binary Hexadecimal-to-decimal conversion
Convert the binary to decimal
![Page 35: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/35.jpg)
35
Decimal-to-Hexadecimal Conversion
Repeated division by 16
![Page 36: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/36.jpg)
36
Binary Coded Decimal (BCD)
![Page 37: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/37.jpg)
37
Digital Codes
Gray code
ASCII code
![Page 38: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/38.jpg)
38
Gray Code
![Page 39: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/39.jpg)
39
ASCII Code (Control Characters)
![Page 40: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/40.jpg)
40
ASCII Code (graphic symbols 20h – 3Fh)
![Page 41: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/41.jpg)
41
ASCII Code (graphic symbols 40h – 5Fh)
![Page 42: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/42.jpg)
42
ASCII Code (graphic symbols 60h – 7Fh)
![Page 43: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/43.jpg)
43
Extended ASCII Code (80h – FFh)
Non-English alphabetic characters
Currency symbols
Greek letters
Math symbols
Drawing characters
Bar graphing characters
Shading characters
![Page 44: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/44.jpg)
44
Error Detection and Correction Codes
Parity error codes
Hamming error codes
![Page 45: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/45.jpg)
45
Parity Error Codes
![Page 46: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/46.jpg)
46
Hamming Error Codes
Hamming code words
Hex equivalent of the data bits
0000000
0000111
0011011
0011110
0101010
0101101
0110011
0110100
1001011
1001100
1010010
1010101
1100001
1100110
1111000
1111111
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
![Page 47: WZR GLJLWV DQG Fundamentals/2018/ch01.pdf · Microsoft PowerPoint - ch01.ppt [ç ¸å®¹æ¨¡å¼ ] Author: cck Created Date: 11/23/2018 11:55:56 AM ...](https://reader033.fdocuments.us/reader033/viewer/2022042810/5f9763eea7a3d56264274f69/html5/thumbnails/47.jpg)
47
Basic Logic Operations