《数字设计基础 双语教学版 教学课件 ppt 作者 英Barry Wilknson 双语课件(第1章)》由会员分享,可在线阅读,更多相关《数字设计基础 双语教学版 教学课件 ppt 作者 英Barry Wilknson 双语课件(第1章)(19页珍藏版)》请在金锄头文库上搜索。
1、1,2,1. Digital systems & representation,1.1 Digital systems,1.2 Numbers representation,1.3 Performing arithmetic with binary numbers,1.4 Representation of alphanumeric symbols,3,1.1 Digital Systems,1. The realm of digital systems,A digital system is often designed to satisfy two kinds of tasks:,(1)T
2、o control apparatus,(2)To perform calculations,A digital system can perform some calculations and on the basis of the result, take certain control actions.,4,1.1 Digital Systems,2. Two-valued logic signals,The input and output signals have only two values. Hence, the digital systems might use 5 volt
3、s and 0 volts to represent the two values.,3. Positive and negative logic representation,(1)Positive logic representation,The higher voltage represents a logic 1, and the lower voltage represents a logic 0.,5,1.1 Digital Systems,(2)Negative logic representation,The higher voltage represents a logic
4、0, and the lower voltage represents a logic 1.,(3)Mixed logic representation,Using both positive and negative representations in the same system.,6,1.1 Digital Systems,4. Logic functions,In order to develop the algorithm or logic function for a digital system, logic signals must be represented by na
5、mes as in algebra.,Logic function can be written in a two-valued algebra called Boolean algebra.,5. Three fundamental logic operations,AND, OR, and NOT are three fundamental logic operations, from which any complicated logic function can be created.,7,1.2 Numbers Representation,1. Decimal numbers,De
6、cimal number system has ten digits 0,1,2,3,4,5,6,7,8 and 9. It is a positional number system, which uses digits multiplied by powers of 10 that depend upon the position of the digit. 10 is the base of the number system.,(235)10 = 2102+ 3101+ 5100,Ten different voltages are needed for each possible v
7、alue of the digit in the decimal number system. Then electronic circuits will have to be designed which can accept ten different voltages and produce ten different voltages, one for each digit of the number.,8,1.2 Numbers Representation,2. Binary numbers,Binary number system has only two digits 0 an
8、d 1. They are called bits (binary digits). 2 is the base of the binary system. Binary number can be represented as:,(110001)2 = 125+ 124+ 023+ 022+ 021+ 120,Numbers can be a fraction or have a fractional part.,(0.101)2 = 12-1+ 02-2+ 12-3,The binary number system fits in well with digital systems. Th
9、ere are only two digits used, 0 and 1, in all numbers, so only two different voltages are needed for each digit.,9,1.2 Numbers Representation,3. Hexadecimal and octal numbers,The positional number system using the base of 16 is called the hexadecimal number system. The 16 different numbers are 0, 1,
10、 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.,The positional number system using the base of 8 is called the octal number system. The 8 different numbers are 0, 1, 2, 3, 4, 5, 6 and 7.,10,1.2 Numbers Representation,4. Number conversion,Numbers are likely to be entered using the decimal representatio
11、n, but dealt in binary within the digital systems. Therefore, there needs to be some way of converting from binary to decimal and vice versa.,Small decimal numbers can be easily converted into binary by considering the values of powers of 2.,Exp1: Convert the decimal number 25 into binary.,(25)10 =
12、16+8+1 =10000+01000+00001 = (11001)2,(1)Decimal to binary,11,1.2 Numbers Representation,(2) Binary to decimal,Exp2: Convert the binary number 110001 to decimal.,(110001)2 = 125+ 124+ 023+ 022+ 021+ 120 = (49)10,(3) Binary to hexadecimal,To convert a binary number into hexadecimal is a matter of divi
13、ding the binary number into groups of four digits and converting each group into one hexadecimal digit.,Exp3: Convert the binary number 110001 to hexadecimal.,(110001)2 = (31)16,12,1.2 Numbers Representation,(4) Hexadecimal to binary,Exp4: Convert the hexadecimal number 1AC to binary.,(1AC)16 = (000
14、1 1010 1100)2,(5) Binary to octal,Exp5: Convert the binary number 001010011 to octal.,(001010011)2 = (123)8,(6) Octal to binary,Exp6: Convert the octal number 456 to binary.,(456)8 = (100 101 110)2,13,1.3 Performing arithmetic with binary numbers,1. Addition,The rules are essentially the same for de
15、cimal and binary. Pairs of digits are added together, starting with the least significant digits. When a result digit is equal to or greater than the base, a carry is generated which is added to the next pair of digits.,14,1.3 Performing arithmetic with binary numbers,2. Negative numbers and subtrac
16、tion,Binary subtraction use the similar approach to the decimal approach of borrowing from the next column of digits.,In decimal, we have to borrow a digit from the next column if the subtrahend is greater than the minuend.,For implementation reasons, subtraction is usually done by the “addition of complements”. Such method can be applied to any number system.,15,1.3 Performing arithmetic with binary numbers,The 2s complement of a binary number N is defined by