Lecture Slides Intro Number Systems Logic Functions
EE 0 in Context EE 0 EE 20L Logic Design Fundamentals Logic Design, CAD Tools, Lab tools, Project EE 357 EE 457 Computer Architecture Using the logic design principles to construct computer processors EE 454L Using the logic design principles to construct systems centered around a computer processor EE 477L VLSI Physically building and fabricating chips that implement the more abstract logic designs EE 459L Capstone Project Course
Where Does Digital Design Fit In Electrical, biomedical, or computer scientists/engineers develop algorithms for Wireless and communication systems Music and imaging systems Biomedical devices Digital design engineers take these general algorithms and architect/design a HW/SW system to implement them dealing with constraints of size, speed, weight, power, etc. Other electrical engineers may help with the final fabrication of the chip
HW SW Digital System Abstraction Levels Software Code Chips (Processors) Functional Units Logic if (x > 0) x = x + y - z; a = b*x; x y z A B + AND gate S CMPR X,0 JLE SKIP ADD X,X,Y SUB X,X,Z SKIP MUL A,B,X F 0000 C / C++ / Java Assembly / Machine Code Logic Gates Applications OS Processor / Memory / I/O Libraries Functional Units (Registers, Adders, Muxes) Transistors Controlling Input (Gate ) - - - - - - - Output (Drain ) Source Transistors Voltage / Currents
ANALOG TO DIGITAL CONVERSION
Electric Signals Information is represented electronically as a time-varying voltage Each voltage level may represent a unique value Frequencies may represent unique values (e.g. sound) Mark Redekopp, All rights reserved Sound converted to electronic signal (voltage vs. time)
Electronic Information Digital Camera CCD s (Charge- Coupled Devices) output a voltage proportional to the intensity of light hitting it 3 CCD s filtered for measuring Red, Green, and Blue light produce color pixel Color Filters CCD s More info: http://www.science.ca/scientists/scientistprofile.php?pid=29 http://www.microscopy.fsu.edu/primer/digitalimaging/concepts/ccdanatomy.html
volts volts Signal Types Analog signal Continuous time signal where each voltage level has a unique meaning Most information types are inherently analog Digital signal Continuous signal where voltage levels are mapped into 2 ranges meaning 0 or Possible to convert a single analog signal to a set of digital signals 0 0 0 Analog time Digital time
Logic 0 Illegal Logic Signals and Meaning Analog Digital 5.0 V 5.0 V 2.0 V 0.8 V Mark Redekopp, All rights reserved 0.0 V Each voltage value has unique meaning 0.0 V Each voltage maps to 0 or (there is a small illegal range where meaning is undefined)
Analog to Digital Conversion Analog signal can be converted to a set of digital signals (0 s and s) 3 Step Process Sample Quantize (Measure) Digitize 000 volts Analog to Digital Converter 0 0 0 0 0 Analog time Digital time Mark Redekopp, All rights reserved
Sampling Measure (take samples) of the signals voltage at a regular time interval Sampling converts the continuous time scale into discrete time samples Original Analog Signal t Sampled Signal
Quantization Voltage scale is divided into a set of finite numbers (e.g. 256 values: 0 255) Each sample is rounded to the nearest number on the scale Quantization converts continuous voltage scale to a discrete (finite) set of numbers 255 77 t Sampled Signal 000 Each sample is quantized
Digitization The measured number from each sample is converted to a set of s and 0 s Sample Measurement Scale 255 77 77 = 0000 000 Each sample is quantized Quantized value is converted to bits
Error Error is introduced because the discrete time and quantized samples only approximate the original analog signal Original Analog Signal Sampled Signal
Sampling Rates and Quantization Levels Higher sampling rates and quantization levels produce more accurate digital representations t Lower sampling rate and quantization levels Higher sampling rate and more quantization levels
Digital Sound CD Quality Sound 44. Kilo-samples per second 65,536 quantization levels (6-bits per sample) 44.KSamples * 6- bits/sample = 705 Kbps MP3 files compress that information to 28Kbps 320 Kbps
SAMPLE PROBLEMS Mark Redekopp, All rights reserved
Staircase Light Switch Logic
AND, OR, NOT Gates X Z X Y Z X Y Z NOT (Inverter) AND OR Z X ' or X or ~X Z X Y Z X Y X Z 0 0 X Y Z 0 0 0 0 0 0 0 X Y Z 0 0 0 0 0 AND = ALL (true when ALL inputs are true) OR = ANY (true when ANY input is true)
Water Pump Problem
POSITIONAL NUMBER SYSTEMS
Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system being used, before you can understand the value of those s and 0 s. Information (value) = Bits + Context (System) Unsigned Binary system 000000 =? ASCII system 65 0 A ASCII Signed System
Binary Number System Humans use the decimal number system Based on number 0 0 digits: [0-9] Because computer hardware uses digital signals with 2 states, computers use the binary number system Based on number 2 2 binary digits (a.k.a bits): [0,]
Number System Theory The written digits have implied place values Place values are powers of the base (decimal = 0) Place value of digit to left of decimal point is 0 0 and ascend from there, negative powers of 0 to the right of the decimal point The value of the number is the sum of each digit times its implied place value base Most Significant Digit (MSD) Least Significant Digit (LSD) (852.7) 0 = 8*0 2 + 5*0 + 2*0 0 + 7*0 - digits place values
Binary Number System Place values are powers of 2 The value of the number is the sum of each bit times its implied place value (power of 2) base Most Significant Bit (MSB) Least Significant Bit (LSB) (0.) 2 = * 2 2 + * 2 + 0 * 2 0 + * 2 - bits place values (0.) 2 = *4 + *2 + *.5 = 4+2+.5 = 6.5 0
Number Systems Number Systems consist of a base or radix, r, and r coefficients or digits (usually 0 r-). Decimal (Base 0): 0,,2,3,4,5,6,7,8,9 Binary (Base 2): 0, Octal (Base 8): 0,,2,3,4,5,6,7 Hexadecimal (Base 6): 0,,2,3,4,5,6,7,8,9,A,B,C,D,E,F (A thru F = 0 thru 5)
Converting to Decimal Decimal equivalent is the sum of each coefficient multiplied by its implicit place value (power of the base) (6523) 8 = 6*8 3 + 5*8 2 + 2*8 + 3*8 0 = 3072 + 320 + 6 + 3 = (34) 0 (AD2) 6 = 0*6 2 + 3*6 + 2*6 0 = 2560 + 208 + 2 = (2770) 0
Decimal and Binary 00 s 0 s s 6 s 8 s 4 s 2 s s 999 0 = 9 9 9 23 0 = 0 437 0 = 4 3 7 3 0 = 0 0 55 0 = 0 5 5 7 0 = 0 0 20 0 = 0 0 0 3 0 = Decimal Binary
Powers of 2 2 0 = 2 = 2 2 2 = 4 2 3 = 8 2 4 = 6 2 5 = 32 2 6 = 64 2 7 = 28 2 8 = 256 2 9 = 52 2 0 = 024 024 52 256 28 64 32 6 8 4 2
Anatomy of a binary number radix (base) Most Significant Digit (MSB) Least Significant Bit (LSB) (0) 2 = *2 3 + 0*2 2 + *2 + *2 0 coefficients place values
Unique Combinations Given n digits of base r, how many unique numbers can be formed? r n 2-digit, decimal numbers 3-digit, decimal numbers 0-9 0-9 00 combinations: 00-99 000 combinations: 000-999 4-bit, binary numbers 6-bit, binary numbers 0-0- 0-0- 6 combinations: 0000-64 combinations: 000000- Main Point: Given n digits of base r, r n unique numbers can be made with the range [0 - (r n -)]
Concepts & Skills Concepts Analog to Digital Conversion Process Bits have no inherent meaning meaning is assigned based on the system of representation or problem needs Positional Number systems Logic Function Visualization Skills Describe a specific logic function using a given representation Convert a number in base r to base 0 Σ (Coefficients * Place Values) Determine how many digits are needed to represent a number in base r
PREVIOUS YEARS Mark Redekopp, All rights reserved
Today s Digital Systems Computer Fact: Any algorithm can be implemented either in SW, HW, or a mixture of both HW-only approach: Build circuits to carry-out the specific calculations (Advantages: Faster, less power) HW/SW approach: Build circuits to carry-out generic operations specified by a SW program (Advantages: Cheaper, more flexible) Digital systems are often a mix of custom HW and generalpurpose processors all combined on a single chip called a System-On-Chip (SoC) What once took several chips now require only or 2 with all functionality integrated on that chip
Processing Logic Approaches Custom Logic Logic that directly implements a specific task Example above may use separate adders and a multiplier unit General Purpose Processor Logic designed to execute SW instructions Provides basic processing resources that are reused by each instruction Design Decision: HW only or HW/SW HW only = faster HW/SW = much more flexible X Y A B Instruc. Store ADD X,Y ADD A,B MUL X,A + + * Custom Logic Implementation Data storage + * GP Proc. Implementation of (X+Y)*(A+B) Out
Interconnect Interconnect Anatomy of a Digital System Start with the chip inputs and output (I/O) Inputs: Wheel sensor, audio-in, pressure/click sensor Outputs: LCD, audio-out Convert everything to digital for processing Processing Logic Approaches General Purpose Processor executing algorithms in SW Custom (Application-Specific) logic executing algorithm in HW only Convert back to analog for certain outputs Sensors Digital Processing Outputs Analog Inputs Analog to Digital Conversion (ADC) Microprocessors (Software executing on hardware ) Digital to Analog Conversion (DAC) Analog Outputs Clock Reset Digital Inputs Custom Logic Digital Outputs