Chap_01

69
Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice Chap 1 Administrative Matters Course: Digital Circuit Design Time/Location: 1B3EF-EC115 Instructor: 李毅郎 E-mail: [email protected] URL: http://people.cs.nctu.edu.tw/~ylli/ Office: 工三441 Office Hours: 4E or make an appointment by @ Teaching Assistants: 魏映綺: [email protected] 謝昕曄: [email protected] 翁士堯: [email protected] 林孟毅: [email protected] Prerequisites: None

description

DIGITAL DESIGN WITH AN INTRODUCTION TO THE VERILOG HDL Fifth Edition 2312

Transcript of Chap_01

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Administrative Matters

    Course: Digital Circuit Design Time/Location: 1B3EF-EC115 Instructor: E-mail: [email protected] URL: http://people.cs.nctu.edu.tw/~ylli/ Office: 441 Office Hours: 4E or make an appointment by @ Teaching Assistants:

    : [email protected] : [email protected] : [email protected] : [email protected]

    Prerequisites: None

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Administrative Matters

    Book: M. Morris Mano and Michael D. Ciletti, Digital

    Design with an Introduction to the VERILOG HDL, 5th edition, 2013, PEARSON.

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Course Contents

    Course Goals the fundamental to a digital system, how a digital system work, how to design a digital component, how to optimize a digital component design.

    Course Contents Chap 1. Digital Systems and Binary Numbers Chap 2. Boolean Algebra and Logic Gates Chap 3. Gate-Level Minimization Chap 4. Combinational Logic Chap 5. Synchronous Sequential Logic Chap 6. Registers and Counters Chap 7. Memory and Programmable Logic Chap 8. Design at the Register Transfer Level (Optional)

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Grading Policy

    Grading Examinations: 2 exams, 60% (25% and 35%) Handwriting and programming assignments: 20%

    One person per team Quizzes: 20% Class participation: bonus

    Course Web Site: eCampus Academic Honesty: Avoiding cheating at all cost.

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    5

    Overview

    Integrated Circuits Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal] Base Conversion Decimal Codes [BCD (binary coded decimal),

    parity] Alphanumeric Codes

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    6

    Integrated Circuits Overview

    System hierarchy

    Random (control)

    logic

    ALU

    Digital circuits

    ADconverter

    RFcircuit

    Analog circuits

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    7

    Integrated Circuits

    Integrated Circuits (IC) imply to pack many components in a circuit. Small Scale Integration (SSI) A couple of

    gates or a flip flop. Large Scale Integration (LSI) Functional unit

    and memory with low computation power and capability.

    Very Large Scale Integration (VLSI) millions of transistors (electrical switching device).

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    8

    Moores Law

    Gordon Moore: co-founder of Intel. Predicted that the number of transistors per chip would grow

    exponentially (double every 18 months).

    Source: Intel

    31000 2um134000 HMOS

    275000 0.8um1260000 ?

    3100000 0.8umBiCMOS7500000 0.35um CMOS

    >9500000 0.25,0.18umCMOS

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    9

    IC History

    Pentium 4

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    10

    VLSI Design Trends

    Increasing demands from system level design

    System On Chip (SOC)

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    11

    VLSI Design Trends

    Digital circuits design trends Apply computer-aided design tools electrical design

    automation (EDA) Design automation synthesis tools. Simulation tools. Verification tools.

    Use Hardware Description Language (HDL) to design and verify circuits at early design stage Verilog 1983 Developed by Gateway Automation, 1989 Cadence

    purchased Gateway Automation, 1995 IEEE Standard 1364 adopted.

    VHDL 1983 IEEE Standard 1076. Why HDL ?

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    12

    VLSI Design Flow

    (Hardware Description Language)

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    13

    VLSI Design Flow

    Layout Die IC

    cell levelchip level

    SiO2, Si,Polisilicon,Aluminum,Copper,Photoresistant,Plasma,

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    14

    Digital System

    Takes a set of discrete information inputs and discrete internal information (system state) and generates a set of discrete information outputs.

    System State

    DiscreteInformationProcessingSystem

    DiscreteInputs Discrete

    Outputs

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    15

    Types of Digital Systems

    No state present Combinational Logic System Output = Function(Input)

    State present State updated at discrete times (observe at fixed time)

    => Synchronous Sequential System State updated at any time (observe all the time)

    =>Asynchronous Sequential System State = Function (State, Input) Output = Function (State)

    or Function (State, Input)System State

    DiscreteInformationProcessingSystem

    DiscreteInputs Discrete

    Outputs

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    16

    Digital System Example:

    A Digital Counter (e. g., odometer):

    1 30 0 5 6 4Count Up

    Reset

    Inputs: Count Up, ResetOutputs: Visual DisplayState: "Value" of stored digits

    Synchronous or Asynchronous? Asynchronous

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    17

    A Digital Computer Example

    Synchronous or Asynchronous?

    Inputs: Keyboard, mouse, modem, microphone

    Outputs: CRT, LCD, modem, speakers

    Memory

    Controlunit Datapath

    Input/Output

    CPU(Arithmetic & logic op.)

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    18

    Signal

    Discrete elements of information (variables) are represented by physical quantities - signal.

    For digital systems, the variable takes on discrete values. Two level, or binary values are the most prevalent values

    in digital systems. Binary values are represented abstractly by:

    digits 0 and 1 words (symbols) False (F) and True (T) words (symbols) Low (L) and High (H) and words On and Off.

    Binary values are represented by values or ranges of values of physical quantities

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    19

    Signal Examples Over Time

    Analog

    Asynchronous

    Synchronous

    TimeContinuous in value &

    timeDiscrete in

    value & continuous

    in timeDiscrete in

    value & time

    Digital

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    20

    5.0

    4.0

    3.0

    2.0

    1.0

    0.0Volts

    HIGH

    LOW

    HIGH

    LOW

    OUTPUT INPUT

    Signal Example Physical Quantity: Voltage

    Threshold Region

    ?

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    21

    Why Binary Rather Than Decimal?

    5 V each of length 0.5V Need to recognize more levels more complex

    and costly circuits are required More sensitive to noise - each of length 0.25V

    for a given digit representation while considering noise on the voltages.

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    22

    What are other physical quantities represent 0 and 1? CPU Voltage Disk CD Dynamic RAM

    Binary Values: Other Physical Quantities

    Magnetic Field DirectionSurface Pits/Light

    Electrical Charge

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    23

    Number Systems Representation

    Positive radix, positional number systems A number with base or radix r is represented by

    a string of digits:An - 1An - 2 A1A0 . A- 1 A- 2 A- m 1 A- m

    in which 0 Ai < r and . is the radix point. An-1/A-m: most/least significant digit (msd/lsd).

    The string of digits represents the power series:

    (Number)r = j = - m

    jj

    i

    i = 0i rArA

    (Integer Portion) + (Fraction Portion)

    i = n - 1 j = - 1

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    24

    Number Systems Examples

    General Decimal BinaryRadix (Base) r 10 2Digits 0 => r - 1 0 => 9 0 => 1

    0123

    Powers of 4 Radix 5

    -1-2-3-4-5

    r0

    r1

    r2

    r3

    r4

    r5

    r -1

    r -2

    r -3

    r -4

    r -5

    1101001000

    10,000100,000

    0.10.010.0010.00010.00001

    124816320.50.250.1250.06250.03125

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    25

    Special Powers of 2

    210 (1024) is Kilo, denoted "K"

    220 (1,048,576) is Mega, denoted "M"

    230 (1,073, 741,824)is Giga, denoted "G"

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    26

    Useful for Base ConversionExponent Value Exponent Value

    0 1 11 2,0481 2 12 4,0962 4 13 8,1923 8 14 16,3844 16 15 32,7685 32 16 65,5366 64 17 131,0727 128 18 262,144

    19 524,28820 1,048,57621 2,097,152

    8 2569 51210 1024

    Positive Powers of 2

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    27

    To convert to decimal, use decimal arithmetic to form (digit respective power of 2).

    Example:Convert 110102 to N10:

    Converting Binary to Decimal

    110102 = 1 24 + 1 23 + 1 21 = 2610

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    28

    Method 1 Subtract the largest power of 2 (see slide 26) that gives a

    positive remainder and record the power. Repeat, subtracting from the prior remainder and

    recording the power, until the remainder is zero. Place 1s in the positions in the binary result

    corresponding to the powers recorded; in all other positions place 0s.

    Example: Convert 62510 to N2

    Converting Decimal to Binary

    625 512 = 113 = N1113 64 = 49 = N249 32 = 17 = N317 16 = 1 = N4

    1 1 = 0 = N5

    512 = 29

    64 = 26

    32 = 25

    16 = 24

    1 = 20(625)10 = 29 + 26 + 25 + 24 + 20 = (1001110001)2

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    29

    Commonly Occurring Bases

    Name Radix DigitsBinary 2 0,1Octal 8 0,1,2,3,4,5,6,7Decimal 10 0,1,2,3,4,5,6,7,8,9Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

    The six letters (in addition to the 10integers) in hexadecimal represent:

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    30

    Decimal (Base 10)

    Binary (Base 2)

    Octal (Base 8)

    Hexadecimal (Base 16)

    00 00000 00 0001 00001 01 0102 00010 02 0203 00011 03 0304 00100 04 0405 00101 05 0506 00110 06 0607 00111 07 0708 01000 10 0809 01001 11 0910 01010 12 0A11 01011 13 0B12 01100 14 0C13 01101 15 0D14 01110 16 0E15 01111 17 0F16 10000 20 10

    Numbers in Different Bases

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    31

    Conversion Between Bases

    Method 2 To convert from one base to another:

    1) Convert the Integer Part2) Convert the Fraction Part3) Join the two results with a radix point

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    32

    Conversion Details

    To Convert the Integral Part:Repeatedly divide the number by the new radix and save the remainders. The digits for the new radix are the remainders in reverse order of their computation. If the new radix is > 10, then convert all remainders > 10 to digits A, B,

    To Convert the Fractional Part:Repeatedly multiply the fraction by the new radix and save the integer digits that result. The digits for the new radix are the integer digits in order of their computation.If the new radix is > 10, then convert all integers > 10 to digits A, B,

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    33

    Example: Convert 46.687510 To Base 2

    Convert 46 to Base 2

    Convert 0.6875 to Base 2:

    Join the results together with the radix point:

    46/2 = 23 Remainder = 023/2 = 11+1/2 = 111/2 = 5 + 1/2 = 1

    5/2 = 2 + 1/2 Remainder = 12/2 = 1 = 01/2 = 0 + 1/2 = 1

    (46)10 = (101110)2

    0.6875 2 = 1.3750 integer = 10.3750 2 = 0.7500 = 00.7500 2 = 1.5000 = 10.5000 2 = 1.0000 = 1

    msd

    lsd

    msd

    lsd(0.6875)10 = (0.1011)2

    (46.6875)10 = (101110.1011)2

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    34

    Additional Issue - Fractional Part

    Note that in this conversion, the fractional part became 0 as a result of the repeated multiplications.

    In general, it may take many bits to get this to happen or it may never happen.

    Example: Convert 0.6510 to N2 0.65 = 0.1010011001001 The fractional part begins repeating every 4 steps

    yielding repeating 1001 forever! Solution: Specify number of bits to right of radix

    point and round or truncate to this number.

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    35

    Checking the Conversion

    To convert back, sum the digits times their respective powers of r. From the prior conversion of 46.687510

    1011102 = 132 + 016 +18 +14 + 12 +01= 32 + 8 + 4 + 2= 46

    0.10112 = 1/2 + 1/8 + 1/16= 0.5000 + 0.1250 + 0.0625= 0.6875

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    36

    Why Do Repeated Division and Multiplication Work?

    46 = 125 + 024 + 123 + 122 + 121 + 02046/2 = 124 + 023 + 122 + 121 + 120 + 0/2

    /2 = 123 + 022 + 121 + 120 + 1/2/2 = 122 + 021 + 120 + 1/2/2 = 121 + 020 + 1/2/2 = 120 + 0/2

    01

    11

    1 0msd

    lsd

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    37

    Why Do Repeated Division and Multiplication Work?

    0.6875 = 12-1 + 02-2 + 12-3 + 12-40.68752 = 120+ 02-1 + 12-2 + 12-32 = 020 + 12-1 + 12-22 = 120 + 12-12 = 120

    1011

    msd

    lsd

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    38

    Why Do Repeated Division and Multiplication Work? (continue)

    Convert 46 to Base 2

    Convert 0.6875 to Base 2:

    46/2 = 23 + 0/2/2 = 11 + 1/2 + 0/22

    /2 = 5 + 1/2 + 1/22 + 0/23

    /2 = 2 + 1/2 + 1/22 + 1/23 + 0/24

    /2 = 1 + 0/2 + 1/22 + 1/23 + 1/24 + 0/25

    (46)10 = (101110)2

    0.6875 2 = 1.3750 2 = 10.7500 2 = 101.5000 2 = 1011.0000

    (0.6875)10 = (0.1011)2

    (46.6875)10 = (101110.1011)2

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    39

    Octal (Hexadecimal) to Binary and Back

    Octal (Hexadecimal) to Binary: Restate the octal (hexadecimal) as three (four)

    binary digits starting at the radix point and going both ways.

    Binary to Octal (Hexadecimal): Group the binary digits into three (four) bit

    groups starting at the radix point and going both ways, padding with zeros as needed in the fractional part.

    Convert each group of three (four) bits to an octal (hexadecimal) digit.

    (010 110 001 101 011.111 100 000 110)2 = (26153.7406)8

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    40

    Octal to Hexadecimal via Binary

    Convert octal to binary. Use groups of four bits and convert as

    above to hexadecimal digits. Example: Octal to Binary to Hexadecimal

    6 3 5 . 1 7 7 8

    Why do these conversions work?

    (110 011 101. 001 111 111)2(000110011101.001111111000)2( 1 9 D . 3 F 8 )16

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    41

    A Final Conversion Note

    You can use arithmetic in other bases if you are careful:

    Example: Convert 1011102 to Base 10 using binary arithmetic:Step 1 101110 / 1010 = 100 r 0110Step 2 100 / 1010 = 0 r 0100Converted Digits are 01002 | 01102

    or 4 6 10

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    42

    Binary Numbers and Binary Coding

    Flexibility of representation Within constraints below, we can assign any binary

    combination (called a code word) to any data as long as data is uniquely encoded.

    Information Types Numeric

    Must represent range of data needed Very desirable to represent data such that simple,

    straightforward computation for common arithmetic operations permitted

    Tight relation to binary numbers Non-numeric

    Greater flexibility since arithmetic operations not applied. Not tied to binary numbers

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    43

    Given n binary digits (called bits), a binary code is a mapping from a set of represented elements to a subset of the 2n binary numbers.

    Example: Abinary codefor the sevencolors of therainbow

    Code 100 is not used

    Non-numeric Binary Codes

    Binary Number000001010011101110111

    ColorRedOrangeYellowGreenBlueIndigoViolet

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Complements of Numbers

    44

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Complements of Numbers

    45

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Complements of Numbers

    46

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Complements of Numbers

    47

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Complements of Numbers

    48

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Complements of Numbers

    49

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Signed Binary Numbers

    50

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Signed Binary Numbers

    51

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Signed Binary Numbers

    52

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Signed Binary Numbers

    53

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Signed Binary Numbers

    54

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    55

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    56

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    57

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    58

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    59

    What interesting property is common to these two codes?

    Excess 3 Code and 8, 4, 2, 1 Code

    Decimal Excess 3 8, 4, 2, 10 0011 00001 0100 01112 0101 01103 0110 01014 0111 01005 1000 10116 1001 10107 1010 10018 1011 10009 1100 1111

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    60

    Warning: Conversion or Coding?

    Do NOT mix up conversion of a decimal number to a binary number with coding a decimal number with a BINARY CODE.

    1310 = 11012 (This is conversion) 13 0001|0011 (This is coding)

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    61

    ASCII Character Codes

    American Standard Code for Information Interchange

    This code is a popular code used to represent information such as character-based data. It uses 7-bits to represent: 94 Graphic printing characters. 34 Non-printing characters

    Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return)

    Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas).

    (Refer to Table 1 -4 in the text)

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    62

    ASCII Properties

    ASCII has some interesting properties: Digits 0 to 9 span Hexadecimal values 3016 to 3916 . Upper case A-Z span 4116 to 5A16 . Lower case a -z span 6116 to 7A16 .

    Lower to upper case translation (and vice versa) occurs by flipping bit 6.

    Delete (DEL) is all bits set, a carryover from when punched paper tape was used to store messages.

    Punching all holes in a row erased a mistake!

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    63

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    64

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    Binary Codes

    65

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    66

    UNICODE

    UNICODE extends ASCII to 65,536 universal characters codes For encoding characters in world languages Available in many modern applications 2 byte (16-bit) code words See Reading Supplement Unicode on the

    Companion Website http://www.prenhall.com/mano

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    67

    Error-Detection Codes

    Redundancy (e.g. extra information), in the form of extra bits, can be incorporated into binary code words to detect and correct errors.

    A simple form of redundancy is parity, an extra bit appended onto the code word to make the number of 1s odd or even. Parity can detect all single-bit errors and some multiple-bit errors.

    A code word has even parity if the number of 1s in the code word is even.

    A code word has odd parity if the number of 1s in the code word is odd.

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    68

    4-Bit Parity Code Example

    Fill in the even and odd parity bits:

    The codeword "1111" has even parity and the codeword "1110" has odd parity. Both can be used to represent 3-bit data.

    Even Parity Odd ParityMessage - Parity Message - Parity

    000 - 0 000 -001 - 1 001 -010 - 1 010 -011 - 0 011 -100 - 1 100 -101 - 0 101 -110 - 0 110 -111 - 1 111 -

    1 0 010110

  • Pearson Education, Inc. Modified by Y. L. Li, CS/NCTU Digital Design with VERILOG Practice

    Chap 1

    69

    Terms of Use

    2004 by Pearson Education,Inc. All rights reserved. The following terms of use apply in addition to the standard

    Pearson Education Legal Notice. Permission is given to incorporate these materials into classroom

    presentations and handouts only to instructors adopting Logic and Computer Design Fundamentals as the course text.

    Permission is granted to the instructors adopting the book to post these materials on a protected website or protected ftp site in original or modified form. All other website or ftp postings, including those offering the materials for a fee, are prohibited.

    You may not remove or in any way alter this Terms of Use notice or any trademark, copyright, or other proprietary notice, including the copyright watermark on each slide.

    Return to Title Page