230 likes | 249 Views
Learn the basics of logic design for digital systems, from understanding input-output relationships to implementing high-level specifications. Topics include number systems, Boolean algebra, and circuits design. Get ready for hands-on projects and assignments.
E N D
W’05 CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital SystemsLecture 2 January 12 Yutao He yutao@cs.ucla.edu 4532B Boelter Hall http://courseweb.seas.ucla.edu/classView.php?term=05W&srs=187154200 CSM51A/EEM16-Sec.1W’05
Outline • Administrative Matter • Ch 1 Recap • Ch 2.1,2.2 - High-Level Spec. of Comb. Systems • Ch 2.3 - Data Representation and encoding • Summary
Administrative Matter • PTE numbers: • Available now • If you need one, please let me know during the break • If you haven’t filled in the questionaire, please do so • HW: • HW#1 is due on January 18 (Tuesday) • You better start it earlier • A cover sheet must be attached to your work • Class drop-off box • The drop-off box A4 is set up in 4428BH
Idea Specification Logic Design Physical Design Fabrication Big Picture of Digital Systems Design
(Hardware) Systems Analog Digital System Comb. Sync. Logical Seq. Async. Circuit Logic Design Function Inputs Number Systems Boolean Algebra K-Map Truth Table CAD Tools Outputs Specification Implementation Big Picture of CSM51A
English Text Arithmetic Expression Function Table Schematic High Level Arithmetic Specification: What It Does? Binary Level Logic Switching Expression Truth Table K-Map VHDL Chapter 2 - Overview
Function Inputs Outputs High-Level Spec - Word Problem • Goal: • Given a high-level specification of some forms, design a digital system. • Basic approach: • Ask three questions: • What are inputs? • What are outputs? • What are the relationships between inputs and outputs
Inputs distance Word Problem - Example 1 • Description: • Design a digital system that computes the distance between two 1’s in a four-binary-digit number. • Assume that a number contains exactly two 1’s. System
Example 1 - Cont. - - - - - - - - - - Inputs Distance 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 0 0 1 2 1
Light Switches Word Problem - Example 2 • Description: • A single light can be controlled by any one of three switches. Design a digital system that controls the light as follows: • One switch is the master on/off switch. If it is down, the light are off. • When the master switch is up, a change in the position of one of the other switches will causes the light to change System
Example 2- Cont. Switches Lights DDD DDU DUD DUU UDD UDU UUD UUU Off Off Off Off Off On On Off On Off Off On
Data Representation Number Systems Unit of a Datum Data Symbols Alphabet 0, …, 9 Decimal Digit Character Real World Digital World 0, 1 Binary Bit Number • Some common terms for binary data: • nibble = 4 bits • byte = 8 bits (a.k.a. octet) • word = 32 bits
Representation of Characters • ASCII Code • 7 Bits • 128 characters: alphabet, numbers, punctuation, control characters • EBCDIC • 8 Bits, 256 characters • invented by IBM and used in its mainframes • UniCode • 16 Bits • 65,536 characters • aimed to support the interchange, processing, display texts written in different languages
Encoding/Decoding of Characters • Question: • Given a string of 0’s and 1’s, find the meaning it represents • Solution: • find its encoding scheme • chop the string at the boundary • look up the corresponding table • Example: • What does 00110110 stand for?
Number Systems Positional Number Systems Number Radix Positive. Integer Negative Fraction Mixed. Negative Fixed Positive
Some useful binary constants • (1024) = 2 - “Kilo” in binary systems • (1048576) = 2 - “Mega” in binary systems • (1073741824) = 2 - “Giga” in binary systems 10 10 20 10 30 10 Positional Number Systems n-1 • Basic Formula: a = A W and W= W R where W 0 = 1 • How about fixed-radix systems, say binary number systems? i i i i-1 i-1 i=0
N = log X , where N and X are decimal values 2 Positional Number Systems (Cont.) • How many bits N are required to represent a decimal value X?
Decimal Digit BCD Excess-3 Gray 0 0000 0011 0000 1 0001 0100 0001 2 0010 0101 0011 3 0011 0110 0010 4 0100 0111 0110 5 0101 1000 0111 6 0110 1001 0101 7 0111 1010 0100 8 1000 1011 1100 9 1001 1100 1101 Common Codes for Decimal Digits
Number System Conversion • Basic Problem: • Convert the representation of a number in different number systems • Basic Types: • Among number systems of different radices (bases) • Radix-10 to Radix-2 • Between fixed-radix and mixed-radix number systems • Time in seconds and Time in H:M:S format
Decimal (Radix 10) Octal (Radix 8) Hexdecimal (Radix 16) Binary (Radix 2) Number System Conversion Formula Formula Long Division Long Division Long Division Formula bit grouping bit grouping digit expansion digit expansion
Mixed-radix Fixed-radix Number System Conversion (2) • Between fixed-radix and mixed-radix number systems Formula Division
Summary • Specification - Word Problem • Binary Data Representation • Number System Conversion
Next Lecture • Sections 2.4, 2.5, App. A • Switching Functions and Expressions • Boolean Algebra