* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Lecture14 Logic Circuits
Survey
Document related concepts
Transcript
Digital Circuits Analog and Digital Signals Noise margins in Logic Circuits "1" V OH V IH V(y) V OH Undefined Region "0" V IL V OL Slope = -1 VM Slope = -1 VOL V V IL IH V(x) Noise margins in Logic Circuits VDD "1" V OH Noise margin high NMH V IH Undefined Region V OL "0" NML V IL VGND Gate Output Gate Input Noise margin low Digital to Binary Conversion Conversion of the integer part Digital to Binary Conversion Conversion of the fractional part Binary Addition A B C One bit binary adder A0 B0 C i,0 A1 S0 (= C i,1 ) Carry B1 Co,0 FA Sum A2 B2 C o,1 A3 B3 C o,2 Co,3 FA FA FA S1 S2 S3 Binary Coded Decimal and Hexadecimal Representation To get BCD replace each digit by a group of 4 bits 3786.1=0011 0111 1000 0110. 0001BCD Binary to hexadecimal conversion (0,1,..9,A,..,F) 1110 1010 1001 0101=EA9516 Exercise: Represent 25 by its BCD and binary codes Binary Coded Decimal and Hexadecimal Representation To get BCD replace each digit by a group of 4 bits 3786.1=0011 0111 1000 0110. 0001BCD Binary to hexadecimal conversion (0,1,..9,A,..,F) 1110 1010 1001 0101=EA9516 Exercise: Represent 25 by its BCD and binary codes 25 = 0010 0101BCD 25 = 0001 1001 25/2 = 12 12/2 = 6 6/2 = 3 3/2 = 1 1/2 = 0 rem 1 rem 0 rem 0 rem 1 rem 1 Binary and Grey Codes Binary and Grey Codes Two’s Complement and Binary Addition One’s complement id obtained by inverting all the bits Two’s complement is obtained as one’s complement + 1 invert Positive and Negative Binary Numbers Signed two’s complement of a number is used a the negative number value. This can be used in subtraction operation. Positive and Negative Binary Numbers This can be used in subtraction operation. To subtract number B from A we add two’s complement of B to A Example: Compute A-B=25-11 using binary adders 1) Find binary representations A= 2) Find two’s complement of B -B= 3) Add A+(-B) using binary notation , B= Positive and Negative Binary Numbers This can be used in subtraction operation. To subtract number B from A we add two’s complement of B to A Example: Compute A-B=25-11 using binary adders 1) Find binary representations A=011001, B=001011 2) Find two’s complement of B -B=110101 3) Add A+(-B) using binary notation 011001 +110101 001110 = 14