Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 3 Combinational Circuits

Similar presentations


Presentation on theme: "Lecture 3 Combinational Circuits"— Presentation transcript:

1 Lecture 3 Combinational Circuits
CSCE 211 Digital Design Lecture 3 Combinational Circuits Topics Basic Gates (3.1) Adders: half-adder, full-adder Gray Code (2.11) N-cube (2.14) Error Correcting codes (2.15) Boolean Algebra (4.1) Combinational-Circuit Analysis (4.2) August 28, 2003

2 Overview Last Time On last Time’s Slides(what we didn’t get to) New
Conversion of Fractions decimal  base-r Representations of Integers Unsigned, signed magnitude, one’s complement, two’s complement Arithmetic BCD, representations of characters BCD, unicode On last Time’s Slides(what we didn’t get to) Basic gates (well almost on transparencies) Adder circuits New Boolean algebra Combinational circuits VHDL ButNot Table 4-36 page 277 History: George Boole

3

4 Basic Gates AND OR NOT

5 Basic Gates NAND NOR XOR

6 Half Adder Circuit

7 Full Adder

8 Ripple Carry Adder

9 Gray Code In some mechanical devices you want to encode positions as binary strings in such a way that positions close to each other are represented by strings that are close together. Gray code – adjacent position differ in only one bit 000 001 011 010 110 111 101 100 Figure 2-6 encoding disk

10 Construction of Gray Codes
Gray Codes are reflective Algorithm for construction of Gray Codes on n-bits A 1-bit Gray code has two words 0 and 1. The first 2n words of an (n+1)-bit gray code are the words of the n-bit gray code with a leading 0 added. The next 2n words of an (n+1)-bit gray code are the words of the n-bit gray code but written in reverse order with a leading 1 added.

11 Construction of Gray Codes
1-bit gray code 1 2-bit gray code 00 01 11 10 3-bit gray code 0 00 0 01 0 11 0 10 1 10 1 11 1 01 1 00 4-bit gray code 0 000

12 Gray Code Generation Algorithm 2
The bits of an n-bit binary and n-bit Gray-code code word are numbered from right to left from 0 to n-1. Bit i of a Gray-code word is 0 if bits i and i+1 of the corresponding binary code word are the same, else bit i is 1. (When i = n-1, bit n is considered to be 0.) Example Given Add fake 0 on front bit n is 0

13 Codes representing characters
ASCII (American Standard Code for Information Interchange) – 8 bits = 7 + parity Unicode 16 bits

14 N-cubes 1-cube 2-cube 3-cube Traversing in gray-code order

15 Parity Bits Even parity bit – parity bit is set so that the number of ones is even Odd parity bit

16 Error Correcting codes
For an n-bit code, consider the hypercube of dimension n Choose some subset of the nodes as code words. Suppose the distance between any two two code words is at least 3. Now consider transmission errors. Then if there is an error in transmitting just one bit then the distance from the received word to one code word is one, distances to other code words are at least two. Single error correcting, double error detecting. Such codes are called Hamming codes after their inventor Richard Hamming.

17 Boolean Algebra George Boole (1854) invented a two valued algebra
To “give expression … to the fundamental laws of reasoning in the symbolic language of a Calculus.” 1938 Claude Shannon at Bell Labs noted that this Boolean logic could be used to describe switching circuits. (Switching Algebra) In Shannon’s view a relay had two positions open and closed and collections of relays satisfied the properties of Boolean algebra.

18 Boolean Algebra Axioms
The axioms of a mathematical system are a minimal set of properties that are assumed to be true. Axioms of Boolean Algebra X = 0 if X != X=1 if X!=0 If X = 0, then X’ = 1 if X=1 then X’=0 0 . 0 = = 1 1 . 1 = = 0 0 . 1 = = = = 1 Axioms 1-5 and 1-5’ completely define Boolean algebra.

19 Boolean Algebra Theorems
Proofs by perfect induction

20 More Theorems N.B. T8¢, T10, T11

21 Duality Swap 0 & 1, AND & OR Result: Theorems still true Why? Each axiom (A1-A5) has a dual (A1¢-A5¢) Counterexample: X + X × Y = X (T9) X × X + Y = X (dual) X + Y = X (T3¢) ???????????? X + (X × Y) = X (T9) X × (X + Y) = X (dual) (X × X) + (X × Y) = X (T8) X + (X × Y) = X (T3¢) parentheses, operator precedence!

22 N-variable Theorems Prove using finite induction
Most important: DeMorgan theorems

23 Combinational Circuit Analysis
A combinational circuit is one whose outputs are a function of its inputs and only its inputs. These circuits can be analyzed using: Truth tables Algebraic equations Logic diagrams

24 Truth Tables


Download ppt "Lecture 3 Combinational Circuits"

Similar presentations


Ads by Google