University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Yu Hen Hu and Yong-Chang Kim Fall 2002 Chapter 1 – Digital Computers and Information Originals by: Charles R. Kime and Tom Kamisnski Modified for course use by: Yu Hen Hu and Yong Chang Kim © 2001 Prentice Hall, Inc Logic and Computer Design Fundamentals
© 2001 Prentice Hall, Inc Chapter 1 2 Digital System Takes a set of discrete information inputs and discrete internal information (system state) and generates a set of discrete information outputs. System State Discrete Information Processing System Discrete Inputs Discrete Outputs
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 3 Positive Powers of 2 Exponent Value Exponent Value , , , , , , , , , ,048, ,097,
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 4 Numbers in Different Bases Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexa-decimal (Base 16) A B C D E F
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 5 What property is useful and common to these two codes? Excess 3 Code and 8, 4, –2, –1 Code DecimalExcess 38, 4, –2, –
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 6 What special property does this Gray code have related to adjacent numbers? Gray Code
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 7 Gray Code (Continued) Does this special Gray code property have any value? An Example: Optical Shaft Encoder
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 8 Gray Code (Continued) How does the shaft encoder work? For the binary code, what codes may be produced if the shaft position lies between codes for 3 and 4 (011 and 100)? Is this a problem?
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 9 Gray Code (Continued) For the Gray code, what codes may be produced if the shaft position lies between codes for 3 and 4 (010 and 110)? Is this a problem? Does the Gray code work in decimal counting in all cases?
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter 1 10 Error-Detection Codes 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.
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc Chapter Bit Parity Code Example Fill in the even and odd parity bits: The binary codeword "1111" has even parity and the binary code "1110" has odd parity. Both could be used to represent data.