// EE : INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN Lecture : Introduction /9/ Avinash Kodi, kodi@ohio.edu Agenda Go over the syllabus Introduction ti to Digital it Systems
// Why Digital Systems? Obvious reason Implementation ti basis for all modern computing, communication and control devices (C ) Building larger things from smaller components Faster, cheaper, more efficient than analog More reasons Inherent parallelism in hardware In addition to serial software design Binary Representation Binary Information digits (BITS) or n bits specify M = n different values Or M values specified by n = log M bits
// The Digital-Binary World 5 Easy to process binary data Digital logic where voltage <.5 V is a and >. 5 V is a Easy to store binary data Fast disk and CD-ROM storage devices, cheap and small Memory stick Easy to transmit and protect Data protection well developed (parity) Easy to describe mathematically Discrete mathematics (boolean algebra) Design of Computers Hierarchical Design Hardware Computer-based system design Design in which a computer is interfaced with and/or embedded in a larger system with a specific function, System design Design in which components such as the CPU. Memory, and I/O chips are interfaced to build a computer, Gate or Logic level Design of higher-level components with chips containing logical gates Device level Design of logic gates using transistors
// Abstraction Levels 7 Hardware: Levels of Detail - (top-down) x y ALU s, s z Block diagram x y Arithmetic Unit Logic Unit MUX z s s Magnified processor topography
// Hardware: Levels of Detail - Block diagram Logic diagram x y Arithmetic Unit Logic Unit MUX z x y MUX g x y MUX g s s x y MUX g x y MUX g Hardware: Levels of Detail & x Logic diagram y MUX g x y MUX g x y MUX g x y MUX g A B Electric circuit diagram NAND NOT C s 5
// Design of Computers Hierarchical Design Software (top-down) High Level Language Program (e.g., C) Compiler Assembly Language Program Assembler Machine Language g Program // Swap A and B temp = A; A = B; B = temp; mov AX,A mov BX,B mov A,BX mov B,AX D D D D or Machine Interpretation Control Signal Specification History of Computers Vacuum Tubes Transistors VLSI ENIAC Eckert and Mauchly 96 8, vacuum tubes,,8 instructions/sec,, ft Intel Microprocessor Introduced in 97,5 transistors, mm, 8 KHz Processor speed doubles every 8 months (Moore s Law) Memory speed doubles every -5 years 6
// Pentium - 55,, Transistors 6 mm Ghz Introduced in Intel Core Duo E66 65nm technology node 9 Million transistors mm 7
// Number System - Definition 5 A set of values to represent quantity We apply numbers everyday and knowing how numbers work will give us insight into how computer manipulates and stores numbers Example: Roman Numerals ( = I, 5 = V, = X, 5 = L, = C, 5 = D, = M) http://mathforum.org/alejandre/numerals.html http://www.sf.airnet.ne.jp/~ts/language/number.html History 6 The number system in most common use today is the Arabic system. It was first developed in India and was used as early as the rd century BC. The introduction of the symbol, used to indicate the positional value of digits was very important. We thus became familiar with the concept of groups of units, tens of units, hundreds of units, and so on. In number systems, it is often helpful to think of y, p recurring sets, where a set of values is repeated over and over again. We always write the digit with the largest value on the left of the number 8
// Base Values 7 The base (R=radix) value of a number system is the number of different values the set has before repeating itself Binary = (, ) Octal = 8 ( - 7) Decimal = ( 9) Hexadecimal = 6 ( 9, A F) A number at any base can be expanded in a power series (positional notation) ti N ) = ( aaaaa. a a a R = = a R + a R + a R + a R + a R + R + a R + a R a i R 7 a Decimal Number System (Base ) 8 Uses different symbols to represent values the greatest value (digit and column) 9 8 7 6 5 the least value (digit and column) 96 = 9 + 6 + N ) = ( aaaaa. a a a R = = a R + a R + a R + a R + a R + + R + a R + a R a i R 8 a... 9
// Decimal Number System (Base ) 9 Uses only different symbols to represent values the greatest value (digit and column) the least value (digit and column) Columns are used identical to the decimal system, leftmost is used to represent the greatest value Increasing order of value Octal Number System (Base 8) Uses 8 different symbols to represent values the greatest value (digit and column) 7 6 5 the least value (digit and column)
// Hexadecimal Number System (Base 6) Uses 6 different symbols to represent values 5 6 7 8 9 A B C D E F the least value the greatest value A =, B =, C =, D =, E =, F = 5 Binary to Decimal Convert to Decimal = + + + = 8 + + + = N ) = ( aaaaa. a a a R = = a R + a R + a R + a R + a R + + R + a R + a R a i R a...
// What about fraction conversion? Example:. = +. = = = +. 5 + +.65 N ) +. 5 = ( aaaaa. a a a R = = a R + a R + a R + a R + a R + + R + a R + a R a i R a... Decimal to Binary Divide the number by, then divide what s left by, and so on until there is nothing left (zero) 5 = 5/ = 7, Remainder = 7/ =, Remainder = / = 6, Remainder = 6/ =, Remainder = / =, Remainder = / =, Remainder =
// 5 What about decimal fractions into binary?.65 = F = (. a a a ) R F R = a + a R + a R = a. F Conversion of a decimal fraction to base R can be done using successive multiplications by R. F R = a + a R = a. F F =.65 F =.5 F =.5 x x x.5.5. =. a - = a - = a - = Class Problem 6 Convert 7. 8 into decimal Convert AF 6 into decimal Convert 5 into binary Convert.7 into binary
// Inter-Base Conversion 7 Conversion between bases other than decimal is generally easier if we use decimal as an intermediate base Example: Convert (.) to base 7 For Binary Hexadecimal, each hexadecimal digit represents binary bits, split the binary numbers into groups of bits, starting from right Example: Convert... 5 5 6. 6 = (55B6.6) 6 BIN-HEX-DEC Conversion Table 8 Decimal (base ) Binary (base ) Octal (base 8) Hexadecimal (base 6) 5 5 5 6 6 6 7 7 7 8 8 9 9 A B C 5 D 6 E 5 7 F
// Binary Numbers & Coding 9 Flexibility of representation In principle, can assign any binary combination (called a code word) to any data as long as it is uniquely encoded Information Type Numeric Must represent the range of data needed Simple, straightforward computation for common arithmetic operations permitted Relation to binary numbers Non-Numeric Greater flexibility since no arithmetic operations Not tied to binary numbers Binary Codes for Decimal Digits There are over 8, ways in which you can choose elements from 6 possible bit binary numbers. Decimal 8,,, Excess 8,,-,- Gray 5 6 7 8 9 5
// Binary Coded Decimal (BCD) BCD is the 8,,, code Referring to bit weights used Simplest, intuitive code for binary Uses powers of, but only encodes the first ten values from to 9 Eg: (9) = (8) + () There are invalid code words like or Decimal 5 6 7 8 9 8,,, Gray Code Unweighted and non-arithmetic, arranged so that every transition from one value to the next involves only one bit change. Decimal 5 6 7 8 9 Gray B B B (a) Binary Code for Positions through 7 G G G (b) Gray Code for Positions through 7 6
// Arithmetic: Binary, Octal, Hexadecimal, Binary Codes Addition Subtraction ti Multiplication Division Unsigned Binary Addition Just like in high school (carry s) Carry- Out LSB Carry-In 7 7 + + 6 is the default Carry-In to the Least Significant Bit (LSB) 7
// Binary Subtraction 5 Just like in high school (borrow s) Minuend 5 8 Subtrahend - - 5 Binary Multiplication 6 Binary Multiplication is simple x = ; x = ; x = ; x = Multiplicand Multiplier x Partial Products x xx Products 8
// Binary Division 7 Arithmetic Inversion of Multiplication Example: Divide id. with.. - - - Octal Multiplication 8 Multiply 56 8 with 8 showing all intermediate steps 56 8 x 8 8 + 67 8 7 8 8 x 6 8 = = 8 + 8 x5 8 = = 8 + 8 x 8 = = 8 8 x 6 8 = = 8 + 8 x5 8 = =7 8 + 8 x 8 =6 =6 8 9
// Hexadecimal Subtraction 9 Subtract (A96B) 6 (9FC) 6 Minuend A 9 6 B 6 Subtrahend - 9 F C 6 Difference A F 6 The partial differences were found a) B-C =B-C=(6+)-=7-=5=F B-C produces a negative result, so a borrow is generated b) 5 - = c) (9 + 6) F = A d) 9 9 = BCD Arithmetic Given a BCD code, we use binary arithmetic to add the digits: 8 Eight +5 + Plus 5 is (> 9) Note that the result is MORE THAN 9, so needs two digits! To correct the BCD digit, ADD 6, 8 Eight +5 + Plus 5 is (> 9) + so add 6 carry = leaving + carry Final answer (two digits)
// More BCD Arithmetic Add 8 BCD to 89 BCD showing carries and digit corrections Carry 8 + 89 97 BCD Carry + Binary sum Add 6 + BCD Sum BCD Result 9 7