Slides for Lecture 6
ENEL 353: Digital Circuits — Fall 2013 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 20 September, 2013 ENEL 353 F13 Section 02 Slides for Lecture 6 slide 2/21Previous Lecture
◮ ranges for two’s-complement systems ◮ overflow in two’s-complement addition ◮ BCD (binary coded decimal) codes for decimal digits ◮ Gray codes ENEL 353 F13 Section 02 Slides for Lecture 6 slide 3/21Today’s Lecture
A little more about Gray codes. Introduction to logic gates. Related reading in Harris & Harris: Section 1.5 ENEL 353 F13 Section 02 Slides for Lecture 6 slide 4/21Gray code to unsigned binary code conversion, unsigned binary code to Gray code conversion
... ... n-bit Gray code n-bit binary code extra 0 not part- f either code
- f the rotation angle of a spinning metal disk. This could be used
Practical shaft encoders use Gray codes
If the light and dark markings on the spinning disk are- rganized using a Gray code, that eliminates the problem of
Combinational versus Sequential Logic
It’s IMPORTANT to know what these words mean. The outputs of a combinational logic circuit depend only the current values of its inputs. The outputs of a sequential logic circuit depend on the history of its input values. ENEL 353 F13 Section 02 Slides for Lecture 6 slide 8/21Example combinational circuit: 1-bit full adder
Cin Cout A B S full adder The values of Cout and S depend on what the values of A, B, and Cin are RIGHT NOW, not what they were a few minutes ago, or even a few nanoseconds ago. ENEL 353 F13 Section 02 Slides for Lecture 6 slide 9/21What does the term logic gate mean?
A logic gate is a combinational logic circuit that has ◮ one or more inputs, each of which is a bit; ◮ exactly one output, which is a bit. According to this definition, is the full adder a logic gate?