1 Digital Logic Design (41-135) Chapter 5 Number Representation & Arithmetic Circuits Younglok Kim Dept. of Electrical Engineering Sogang University Spring 2006
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 2 Chapter Objectives Representation of numbers in computers Circuits used to perform arithmetic operations Performance issues in large circuits
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 3 Numbers Unsigned: positive only Signed: positive & negative numbers Radix point: real numbers Positional number representation of decimal integer n decimal digits
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 4 Binary Integers Decimal numbers Base-10, radix-10 numbers Binary numbers Base-2, radix-2 numbers Each binary digit is called “bit” Positional number representation of binary integer Least significant bit (LSB) Most significant bit (MSB)
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 5 Conversion Decimal to Binary Quotient
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 6 Octal & Hexadecimal Representations Octal numbers Radix-8 3 bits per octal number ( ) 2 = (273) 8 ( ) 2 = (5327) 8 Hexadecimal Radix-16 4 bits per hex number ( ) 2 = (AF25) 16 ( ) 2 = (368) 16
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 7 Half Adder of Unsigned Numbers (d) Graphical symbol (a) The four possible cases (b) Truth table (c) Circuit
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 8 Example of Addition
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 9 Full Adder x i y i c i s i x i y i c i = x i y i c i c i1+ x i y i x i c i y i c i ++= (b) Karnaugh maps c i c i x i y i (a) Truth table s i c i x i y i s i c i1+
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 10 Full Adder using Two Half Adders HA s c s c c i x i y i c i1+ s i c i x i y i c i1+ s i (a) Block diagram (b) Detailed diagram
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 11 n-bit Ripple-Carry Adder FA x n –1 c n c n1” y n1– s n1– FA x 1 c 2 y 1 s 1 c 1 x 0 y 0 s 0 c 0 MSB positionLSB position
Digital Logic Design Ch.5 Number Representation & Arithmetic Circuits 12 Multiplication by 3 x 1 x 0 y 8 y 0 y 7 x 8 s 0 s 8 c 8 00 a 7 A: P 9 P 8 P 0 P3A= : (b) Efficient design a 0