boolean boogie

57
An unconventional guide to electronics fundamentals, components, and processes BEBOP TO THE OOLEAN BOOGIE B by Clive (call me “Max”) Maxfield Foreword by Pete Waddell, Editor of Printed Circuit Design Magazine Eagle Rock, Virginia publications

Upload: gopalprakash

Post on 17-Nov-2015

55 views

Category:

Documents


5 download

DESCRIPTION

Theory of boolean

TRANSCRIPT

  • An unconventional guide to electronicsfundamentals, components, and processes

    BEBOPTO THE OOLEAN

    BOOGIEB

    by Clive (call me Max) Maxfield

    Foreword by Pete Waddell,Editor of Printed Circuit Design Magazine

    Eagle Rock, Virginiap u b l i c a t i o n s

  • p u b l i c a t i o n s

    Printed in the United States of AmericaCover design: Brian McMurdo, Ventana Studio, Valley Center, CA

    Interior design and production services: Sara Patton, Maui, HI

    Library of Congress Cataloging-in-Publication Data

    Maxfield, C. R. (Clive Richard), 1957Bebop to the Boolean boogie : an unconventional guide to

    electronics fundamentals, components, and processes / by C. R.Maxfield : foreword by Pete Waddell.

    p. cmIncludes bibliographical references and index.ISBN: 1-878707-22-1 (paper) : $35.00

    1. Digital electronicsPopular works. I. Title.TK7868.D5M323 1995821.39'5dc20 94-41062

    CIP

    Copyright 1995 by HighText Publications, Eagle Rock, VirginiaAll rights reserved. No part of this book may be reproduced, in any form orby any means whatsoever, without permission in writing from the publisher.

    HighText is a registered trademark

    RT 2 Box 99M Eagle Rock, VA, 24085

  • Forewordy first exposure to the unique writing style of Clive (call me Max)Maxfield was a magazine article that he co-wrote with an associate.

    The article was technically brilliant (he paid me to say that) and veryinformative, but it was the short biography at the end of the piece that Ienjoyed the most. I say enjoyed the most because, as you will soon learn,Max does not necessarily follow the herd or dance to the same drummeras the masses. Trade journals have a reputation for being informative andeducational but also as dry as West Texas real estate.

    Anyway, Maxs personally submitted biography not only included amessage from his mom, but also made mention of the fact that he (Max)is taller than his co-author, who just happened to be his boss at the time.Now to some people this may seem irrelevant, but to our readers (and Maxsboss), these kind of thingstrivial as they may seem to the uninitiatedare what helps us to maintain our off-grid sense of the world. Max hasbecome, for better or worse, a part of that alternate life experience.

    So now its a couple of years later, and Max has asked me to write afew words by way of introduction. Personally, I think that the title of thistome alone (hmmm, a movie?) should provide some input as to what youcan expect. But, for those who require a bit more: be forewarned, dearreader, you will probably learn far more than you could hope to expect fromBebop to the Boolean Boogie, just because of the unique approach Max hasto technical material. The author will guide you from the basics througha mine field of potentially boring theoretical mish-mash, to a Nirvanaof understanding. You will not suffer that fate familiar to every reader:rereading paragraphs over and over wondering what in the world the authorwas trying to say. For a limey, Max shoots amazingly well and from the hip,but in a way that will keep you interested and amused. If you are notvigilant, you may not only learn something, but you may even enjoy theprocess. The only further advice I can give is to expect the unexpected.

    PETE WADDELL, Editor, Printed Circuit DesignLiterary genius (so says his mom), and taller than Max by "

    M

  • Contents

    Chapter 1 Analog versus Digital 1

    Chapter 2 Atoms, Molecules, andCrystals 5

    Chapter 3 Conductors and Insulators;Voltage, Current, Resis-tance, Capacitance, andInductance 11

    Voltage, Current and Resistance 12

    Capacitance 14

    Inductance 17

    Unit Qualifiers 20

    Chapter 4 Semiconductors: Diodesand Transistors 23

    Diodes 24

    Bipolar Junction Transistors 25

    Metal-Oxide SemiconductorField-Effect Transistors 26

    The Transistor as a Switch 27

    Gallium Arsenide Semiconductors 28

    Chapter 5 Primitive LogicFunctions 31

    BUF and NOT Functions 33

    AND, OR, and XOR Functions 34

    NAND, NOR, and XNORFunctions 34

    Functions versus Gates 37

    1Section

    Fundamental ConceptsChapter 6 Using Transistors to

    Build Primitive LogicFunctions 39

    NOT and BUF Gates 40

    NAND and AND Gates 41

    NOR and OR Gates 43

    XNOR and XOR Gates 44

    Pass-Transistor Logic 45

    Chapter 7 Alternative NumberingSystems 47

    Decimal (Base-10) 47

    Duo-Decimal (Base-12) 49

    Sexagesimal (Base-60) 51

    The Concepts of Zero andNegative Numbers 52

    Vigesimal (Base-20) 53

    Quinary (Base Five) 54

    Binary (Base-2) 55

    Octal (Base-8) and Hexadecimal(Base-16) 57

    Representing Numbers Using Powers 59

    Tertiary Logic 61

    Chapter 8 Binary Arithmetic 63

    Unsigned Binary Numbers 63

    Binary Addition 64

    Binary Subtraction 64

    Signed Binary Numbers 69

    Binary Multiplication 73

  • vi Bebop to the Boolean Boogie

    Chapter 9 Boolean Algebra 75

    Combining a Single Variablewith Logic 0 or Logic 1 78

    The Idempotent Rules 79

    The Complementary Rules 79

    The Involution Rule 80

    The Commutative Rules 80

    The Associative Rules 81

    Precedence of Operators 82

    The First Distributive Rule 83

    The Second Distributive Rule 84

    The Simplification Rules 85

    DeMorgan Transformations 87

    Minterms and Maxterms 89

    Sum-of-Products andProduct-of-Sums 89

    Canonical Forms 91

    Chapter 10 Karnaugh Maps 93

    Minimization Using KarnaughMaps 94

    Grouping Minterms 96

    Incompletely Specified Functions 99

    Populating Maps Using 0sversus 1s 99

    Chapter 11 Using Primitive LogicFunctions to Build MoreComplex Functions 101

    Scalar versus Vector Notation 101

    Equality Comparators 102

    Multiplexers 103

    Decoders 105

    Tri-State Functions 106

    Combinational versus SequentialFunctions 108

    RS Latches 108

    D-Type Latches 114

    D-Type Flip-flops 116

    JK and T Flip-flops 118

    Shift Registers 119

    Counters 121

    Brick by Brick 123

    Chapter 12 State Diagrams,State Tables, andState Machines 125

    State Diagrams 126

    State Tables 127

    State Machines 128

    State Assignment 128

    Dont Care States, Unused States,and Latch-Up Conditions 132

    Chapter 13 Analog-to-Digital andDigital-to-Analog 135

    Analog-to-Digital 135

    Digital-to-Analog 136

    Chapter 14 Integrated Circuits(ICs) 139

    The Fabrication Process 139

    The Packaging Process 146

    Integrated Circuits versusDiscrete Components 148

    Technology Considerations 149

    Section

    2 Components & Processes

  • Contents vii

    Chapter 18 Circuit Boards (PWBsand DWBs) 193

    Subtractive Processes 194

    Additive Processes 197

    Single-sided Boards 198

    Lead Through-Hole (LTH) 201

    Surface Mount Technology (SMT) 203

    Double-sided Boards 205

    Holes versus Vias 207

    Multilayer Boards 209

    Discrete Wire Technology 213

    Backplanes and Motherboards 223

    Conductive Ink Technology 224

    Chip-On-Board (COB) 225

    Flexible Printed Circuits (FPCs) 226

    Chapter 19 Hybrids 229

    Hybrid Substrates

    The Thick-Film Process 231

    The Thin-Film Process 236

    The Assembly Process 238

    The Packaging Process 243

    Chapter 20 Multichip Modules(MCMs) 245

    Categorization by Substrate 246

    Why Use Multichip Modules? 247

    Cofired Ceramics 249

    Low-fired Cofired Ceramics 252

    Assembly and Packaging 253

    Equivalent Integrated Circuits 257

    Technology Considerations 259

    Chapter 15 Memory ICs 153

    Underlying RAM and ROMArchitectures 153

    Increasing Width andDepth 160

    Alternative Technologies 162

    Chapter 16 Programmable ICs 165

    Programmable Logic Arrays(PLAs) 170

    Programmable Array Logic(PAL) 170

    Programmable Read-OnlyMemories (PROMs) 171

    Additional ProgrammableOptions 171

    Programming PLDs 175

    Reprogrammable PLDs 176

    Complex PLDs (CPLDs) 180

    Field-Programmable GateArrays (FPGAs) 180

    PLD Applications 181

    Chapter 17 Application-SpecificIntegrated Circuits(ASICs) 183

    Gate Array Devices 183

    Standard Cell Devices 187

    Full Custom Devices 189

    Input/Output Cells and Pads 190

    Applications and TechnologyConsiderations 191

    ASICs, CSICs, or ASSPs? 192

  • viii Bebop to the Boolean Boogie

    Appendix D Gray Codes 325

    Appendix E A Reed-Mller ExtractionUtility 331

    How to Become Famous 346

    Appendix F Linear Feedback ShiftRegisters (LFSRs) 351

    Seeding an LFSR 354FIFO Applications 354Modifying LFSRs to Sequence

    2n Values 357Accessing the Previous Value 358Encryption and Decryption

    Applications 359Cyclic Redundancy Check

    Applications 359Data Compression Applications 361Built-in Self-Test Applications 363Pseudo-Random Number

    Applications 365

    Appendix G Pass-Transistor Logic 369

    Appendix H No-Holds-BarredSeafood Gumbo 373

    Abbreviations and Acronyms 377

    Glossary 381

    Dramatis Personae 415

    Index 417

    Chapter 21 Alternative and FutureTechnologies 261

    Reconfigurable Hardware andInterconnect 261

    Three-Dimensional MoldedInterconnect 273

    Optical Interconnect 275Optical Memories 284Protein Switches and Memories 286Electromagnetic Transistor

    Fabrication 287Heterojunction Transistors 288Diamond Substrates 291Chip-On-Chip (COC) 294Conductive Adhesives 297Superconductors 297Nano-technology 300Summary 306

    Appendix A Assertion-Level Logic 307

    Appendix B Positive Logic versusNegative Logic 311

    Physical to Abstract Mapping(NMOS Logic) 312

    Physical to Abstract Mapping(PMOS Logic) 314

    Physical to Intermediate to AbstractMapping 315

    Appendix C Reed-Mller Logic 319

  • Figures1.1 Staircase and ramp 1

    1.2 Person on a ramp: analog and digitalwaveforms 2

    1.3 Brick suspended by elastic 2

    1.4 Brick on elastic: analog waveform 3

    1.5 Brick on elastic: digital waveform(two quanta) 3

    1.6 Brick on elastic: digital waveform(five quanta) 4

    2.1 Helium atom 5

    2.2 Two hydrogen atoms bonding toform a hydrogen molecule 7

    2.3 Alternative representation of ahydrogen molecule 8

    2.4 Water molecule 8

    2.5 Three-dimensional structure ofsilicon crystal 9

    3.1 Electrons flowing through a copperwire 11

    3.2 Water tank representation of voltage,current, and resistance 12

    3.3 Resistor: component and symbol 13

    3.4 Ohms triangle 13

    3.5 Current flowing through a resistor 14

    3.6 Water tank representation ofcapacitance 15

    3.7 Rate at which water tank capacitorfills 15

    3.8 Capacitor: component and symbol 16

    3.9 Resistor-capacitor-switch circuit 16

    3.10 Voltage and current characteristics ofresistor-capacitor-switch circuit 17

    3.11 Current flow generates electro-magnetic field 17

    3.12 Conductor cutting electromagneticfield generates electrical potential 18

    3.13 Inductor: component and symbol 18

    3.14 Resistor-inductor-switch circuit 19

    3.15 Voltage and current characteristics ofresistor-inductor-switch circuit 20

    4.1 Creating P-type and N-typesilicon 23

    4.2 Comparison of pure and mixedP-type and N-type silicon 24

    4.3 Diode: component and symbol 24

    4.4 Bipolar junction transistors 25

    4.5 Metal-oxide semiconductorfield-effect transistors 26

    4.6 Resistor-switch circuit 27

    4.7 Resistor-NMOS transistor circuit 28

    5.1 Switch representation of a 2-inputAND function 31

    5.2 Switch representation of a 2-inputOR function 32

    5.3 BUF and NOT functions 33

    5.4 Two NOT functions connectedin series 34

    5.5 AND, OR and XOR functions 35

    5.6 AND function followed by NOTfunction 35

    5.7 NAND, NOR and XNORfunctions 36

    #

  • x Bebop to the Boolean Boogie

    6.1 CMOS implementation of aNOT gate 40

    6.2 NOT gates operation representedin terms of switches 40

    6.3 CMOS implementation of aBUF gate 41

    6.4 CMOS implementation of a2-input NAND gate 42

    6.5 NAND gates operation representedin terms of switches 42

    6.6 CMOS implementation of a2-input AND gate 43

    6.7 CMOS implementation of a2-input NOR gate 43

    6.8 CMOS implementation of a2-input OR gate 44

    6.9 CMOS implementation of a2-input XNOR gate 44

    6.10 CMOS implementation of a2-input XOR gate 45

    7.1 Place-value number systems 487.2 Combining digits with column

    weights in decimal 487.3 Counting in decimal 497.4 Using finger joints to count in

    duo-decimal 497.5 The Chinese twelve-hour day 507.6 Using finger joints on both hands

    to count to twenty-four 507.7 Using fingers to count to sixty 517.8 Representing zeros using spaces 527.9 Representing zeros using a

    place-holder 527.10 Combining digits with column

    weights in quinary 547.11 Counting in quinary 557.12 Combining digits with column

    weights in binary 55

    FIGURE

    7.13 Counting in binary 567.14 The 16 hexadecimal digits 577.15 Counting in octal and

    hexadecimal 587.16 Mapping octal and hexadecimal

    to binary 587.17 Representing numbers using

    powers 597.18 Using powers to represent

    column weights 60

    8.1 Unsigned binary numbers 638.2 Binary addition 658.3 Nines complement decimal

    subtraction 668.4 Tens complement decimal

    subtraction 668.5 Ones complement binary

    subtraction 678.6 Twos complement binary

    subtraction 688.7 Shortcut for generating a twos

    complement 698.8 Signed binary numbers 708.9 Comparison of positive and

    negative signed binary values 718.10 Comparison of sign-magnitude versus

    signed binary additions 718.11 Comparison of sign-magnitude

    additions 728.12 Binary multiplication using

    Booths Algorithm 73

    9.1 Summary of primitive logicfunctions 77

    9.2 Combining a single variablewith logic 0 or logic 1 78

    9.3 The idempotent rules 799.4 The complementary rules 79

    FIGURE

  • Figures xi

    FIGURE

    9.5 The involution rule 809.6 The commutative rules 809.7 The associative rules 819.8 The first distributive rule 839.9 The second distributive rule 84

    9.10 The simplification rules 859.11 DeMorgan Transformation of

    an AND 879.12 DeMorgan Transformations of AND,

    NAND, OR and NOR 889.13 Minterms and maxterms 899.14 Black box with associated truth

    table 899.15 Sum-of-products versus product-

    of-sums forms 909.16 Sum-of-products versus product-

    of-sums implementations 91

    10.1 Karnaugh map for 2-input AND 9310.2 Karnaugh maps for 3-input and

    4-input functions 9410.3 Example 3-input function 9410.4 Karnaugh map minimization of

    example 3-input function 9510.5 Karnaugh map minterms used to

    form multiple groups 9610.6 Karnaugh map groupings of four

    adjacent minterms 9710.7 Additional Karnaugh map grouping

    possibilities 9810.8 Karnaugh map for an incompletely

    specified function 9910.9 Karnaugh maps populated using

    0s versus 1s 99

    11.1 Scalar versus vector notation 10111.2 Equality comparator 10311.3 Multiplexer 104

    11.4 Multiplexer equation extractedfrom a Karnaugh map 104

    11.5 Decoder (active-low outputs) 10511.6 Tri-state buffer (active-low

    enable) 10611.7 Using tri-state buffers 10711.8 RS latch (NOR

    implementation) 10811.9 RS latch (reset goes active then

    inactive) 11011.10 RS latch (set goes active then

    inactive) 11111.11 RS latch (reset and set go inactive

    simultaneously) 11311.12 RS latch (NAND

    implementation) 11411.13 D-type latch (active-high

    enable) 11511.14 Waveform for D-type latch

    (active-high enable) 11511.15 Positive- and negative-edge

    D-type flip-flops 11611.16 Waveform for D-type flip-flop

    (positive-edge triggered) 11711.17 D-type flip-flop with clear 11711.18 JK and T flip-flops 11811.19 SIPO shift register 11911.20 Waveform for SIPO shift register 12011.21 SISO shift register 12011.22 Binary counter 12111.23 Generating the next count value 122

    12.1 Block diagram of a coin-operatedmachine 125

    12.2 State diagram for the controller 12712.3 State table for the controller 12712.4 Block diagram of a Moore

    machine 129

    FIGURE

  • xii Bebop to the Boolean Boogie

    12.5 Block diagram of a Mealymachine 129

    12.6 Binary encoded state assignment 130

    13.1 Analog-to-digital and digital-to-analogconverters 135

    13.2 Analog-to-digital conversionprocess 136

    13.3 Sampling an analog signal 137

    13.4 Digital-to-analog conversionprocess 137

    14.1 Creating silicon wafers 139

    14.2 Opto-lithographic step-and-repeatprocess 140

    14.3 Small area of silicon wafer 141

    14.4 Layer of silicon dioxide grown ordeposited 141

    14.5 Layer of organic resist applied 141

    14.6 Exposed resist degraded byultraviolet radiation 142

    14.7 Degraded resist dissolved withorganic solvent 142

    14.8 Etch exposed silicon dioxide 143

    14.9 Doping exposed silicon 143

    14.10 Add gate electrode and N-typediffusions 144

    14.11 Add metallization 144

    14.12 Power and signal pads 145

    14.13 Die separation 146

    14.14 Die attached to lead frame 146

    14.15 Wire bonding and encapsulation 147

    14.16 Discard unused lead frame 147

    15.1 ROM and RAM in a computersystem 153

    15.2 Memory cells, words, and arrays 155

    FIGURE FIGURE

    15.3 Address bus decoding 156

    15.4 ROM control decoding anddata bus 157

    15.5 RAM with separate data_in anddata_out buses 158

    15.6 RAM with single bidirectionaldata bus 159

    15.7 Connecting devices to increasewidth 160

    15.8 Connecting devices to increasedepth 161

    16.1 Diode implementations of ANDand OR gates 165

    16.2 Removing unwanted fusiblelinks 166

    16.3 Adding desired antifuse links 166

    16.4 Growing an antifuse link 167

    16.5 Special PLD notation 167

    16.6 True and inverse inputs presentedto an array 169

    16.7 AND array feeding into anOR array 169

    16.8 PLA (programmable AND,programmable OR) 170

    16.9 PAL (programmable AND,predefined OR) 170

    16.10 PROM (predefined AND,programmable OR) 171

    16.11 PLD with tri-state outputs 171

    16.12 PLD with individually tri-statableoutputs 172

    16.13 PLA with tri-state outputs fedback as inputs 172

    16.14 PLA with tri-state outputconfigured as an input 173

    16.15 PLD with registered outputs 174

  • Figures xiii

    FIGUREFIGURE

    16.16 Registered outputs with by-passmultiplexers 174

    16.17 PLD source file 17516.18 Programming PLDs 17616.19 NMOS transistor versus EPROM

    transistor 17616.20 Fusible-link PLA versus EPLA 17916.21 Complex PLD (CPLD) 18016.22 Field-programmable gate array

    (FPGA) 180

    17.1 Examples of gate array basic cells 18417.2 Channeled gate array

    architectures 18417.3 Channel-less (sea-of-gates) gate

    array architecture 18517.4 Assigning cells to basic cells 18617.5 Standard cell architecture 18817.6 Input/output cells and pads 190

    18.1 Subtractive processes: copperclad board 194

    18.2 Subtractive processes: exposingthe resist 195

    18.3 Subtractive processes: removingthe unwanted copper 196

    18.4 Additive processes: bare board 19718.5 Additive processes: exposing

    the resist 19718.6 Additive processes: adding

    the desired copper 19818.7 Single-sided boards: drilling

    the holes 19918.8 Single-sided boards: adding

    the tin-lead alloy 20018.9 Single-sided boards: adding

    the solder mask 20018.10 Lead through-hole (LTH) 201

    18.11 Wave soldering 20218.12 Surface mount technology

    (SMT) 20418.13 Circles and squares game 20518.14 Single-sided boards: using

    jumpers 20518.15 Double-sided boards: creating

    vias 20618.16 Holes versus vias 20818.17 Multilayer boards: alternative

    structures 20918.18 Multilayer boards: through-hole,

    blind, and buried vias 21018.19 Multilayer boards: power and

    ground planes, and thermal reliefand anti-pads 212

    18.20 Multiwire boards: preparingthe core 215

    18.21 Multiwire boards: ultrasonicallybonding the wire 215

    18.22 Multiwire boards: drillingthe holes 216

    18.23 Multiwire boards: platingand etching 216

    18.24 Microwire boards: preparingthe core 219

    18.25 Microwire boards: ultrasonicallybonding the wire 219

    18.26 Microwire boards: laser-drillingthe blind vias 220

    18.27 Microwire boards: platingthe vias and pads 220

    18.28 Backplanes 22318.29 Conductive ink technology 22418.30 Chip-on-board (COB) 22618.31 Flexible printed circuits:

    static flex 22718.32 Flexible printed circuits:

    rigid flex 228

  • xiv Bebop to the Boolean Boogie

    FIGURE FIGURE

    19.1 Thick-film optical mask andemulsion-coated fine steel mesh 231

    19.2 Thick-film tracks screen-printedonto hybrid substrate 232

    19.3 Thick-film resistors screen-printedonto substrate 233

    19.4 Thick-film laser trimmingresistors 234

    19.5 Thick-film inductors screen-printedonto substrate 235

    19.6 Thin-film optical mask andsubstrate 236

    19.7 Thin-film combined tracks andresistors 237

    19.8 Thin-film separated tracks andresistors 237

    19.9 Thin-film laser trimmingresistors 238

    19.10 Bare die attached to substrate 239

    19.11 Wire bonding 240

    19.12 Die attached to TAB tape 241

    19.13 Tape automated bonding(TAB) 241

    19.14 Flipped chip solder bumping 242

    19.15 Flipped chip flipped TAB 243

    19.16 Bare die encapsulated in plastic 243

    19.17 Ceramic cap package 244

    19.18 Hermetically sealed package 244

    20.1 Multichip module 245

    20.2 Cofired ceramics: punching holesto make vias 250

    20.3 Cofired ceramics: screen-printingtracks 251

    20.4 Cofired ceramics: assemblingand firing the layers 252

    20.5 Cofired ceramics: creatingthe wells 254

    20.6 Pin grid arrays 255

    20.7 Ball grid arrays and columngrid arrays 256

    20.8 Attaching the die 256

    20.9 Comparison based on equivalentintegrated circuits 258

    21.1 Configurable hardware: carradios 264

    21.2 Reconfigurable hardware: PROMas a hardware truth table 266

    21.3 Dynamically reconfigurablehardware: SRAM-based FPGAs 267

    21.4 Dynamically reconfigurableinterconnect: SRAM-basedFPIDs 269

    21.5 Virtual hardware 272

    21.6 Three-dimensional moldedinterconnect 274

    21.7 Light propagating throughan optical fiber 275

    21.8 Fiber-optic interconnect:linking bare die in amultichip module 276

    21.9 Fiber-optic interconnect:optical backplanes 277

    21.10 Free-space interconnect:linking bare die in amultichip module 278

    21.11 Guided-wave interconnect:silica waveguides 279

    21.12 Guided-wave interconnect:photo-imagable polyimidewaveguides 280

    21.13 Holographic interconnect:multichip module 282

  • Figures xv

    FIGURE

    21.14 Holographic interconnect: splittinga laser beam 283

    21.15 Optical memories: photochemicalhole-burning (PHB) 285

    21.16 Protein memories: cubic arrays oflight-sensitive proteins 286

    21.17 Heterojunction transistors: chemicalvapor deposition (CVD) 290

    21.18 Heterojunction transistors: silicon-germanium alloy 291

    21.19 Chip-on-chip: die organized as 3-Dcubes 295

    21.20 Chip-on-chip: creating viasthrough silicon 296

    21.21 Conductive adhesives 29621.22 Superconductivity 29821.23 Nano-technology: distribution of

    electrons in a water molecule 30121.24 Nano-technology: combining

    molecules Ma and Mb to form Mab 30321.25 Nano-technology: forming

    molecule Mab using an enzyme 304

    A.1 Naming active-low signals 307A.2 Standard versus assertion-level

    NOT symbols 308A.3 Implications of standard versus

    assertion-level NOT symbols 309A.4 Standard NAND versus assertion-

    level OR symbols 309A.5 Commonly used assertion-level

    symbols 310

    B.1 Logical versus arithmetic viewsof digital functions 311

    B.2 Absolute relationship betweentruth tables and functions 312

    B.3 Physical mapping (NMOS logicgate) 312

    FIGURE

    B.4 Physical to abstract mapping(NMOS logic gate) 313

    B.5 Physical mapping (PMOS logicgate) 314

    B.6 Physical to abstract mapping(PMOS logic gate) 315

    B.7 Alternative values for VDD andVSS 316

    B.8 Physical to intermediate toabstract mapping (NMOS logicgate) 317

    B.9 NMOS and PMOS logic gatesusing common voltage levels 317

    C.1 2-input function suitable forReed-Mller implementation 319

    C.2 3-input function suitable forReed-Mller implementation 320

    C.3 4-input function suitable forReed-Mller implementation 321

    C.4 Additional functions suitable forReed-Mller implementation 321

    C.5 Reed-Mller implementationsrequiring XNOR gates 322

    D.1 Binary versus Gray code 325D.2 Gray code used for shaft-angle

    encoding 326D.3 Generating a 4-bit Gray code

    using the mirroring process 327D.4 Binary to Gray code converter 328D.5 Gray code to binary converter 328

    E.1 Example truth tables forReed-Mller evaluaton 331

    E.2 The working area as aone-dimensional array 338

    E.3 Mapping a truth table intothe working area 339

  • xvi Bebop to the Boolean Boogie

    FIGURE FIGURE

    E.4 Alternative Karnaugh maprepresentations 340

    E.5 Consistent mapping to theworking area 340

    E.6 Testing a two-input truth table 341

    E.7 Testing a three-input truth table 342

    E.8 Visualizing the searches to locatethe significant inputs 345

    E.9 Handling dont care values onthe truth table inputs 347

    E.10 Binary decision diagrams(BDDs) 349

    F.1 LFSR with XOR feedback path 351

    F.2 Comparison of alternative tapselections 352

    F.3 Comparison of XOR and XNORfeedback paths 352

    F.4 Taps for maximal length LFSRswith 2 to 32 bits 353

    F.5 Loading alternative seed values 354

    F.6 First-in first-out (FIFO) memory 355

    F.7 Binary counter versus LFSR 356

    F.8 LFSR modified to sequence 2nvalues 357

    F.9 Accessing an LFSRs previousvalue 358

    F.10 Data encryption using an LFSR 359

    F.11 Cyclic redundancy check (CRC)calculation 359

    F.12 Functional test 361

    F.13 Guided probe analysis 362

    F.14 Built-in self-test (BIST) 363

    F.15 BIST implemented using LFSRs 364

    F.16 Checking for randomness 367

    G.1 Pass-transistor implementationof an AND gate 369

    G.2 Pass-transistor implementationof an OR gate 369

    G.3 Pass-transistor implementationof an XOR gate 370

    G.4 Pass-transistor implementationof an XNOR gate 370

    G.5 Pass-transistor implementationof a D-type latch 371

  • Acknowledgmentsad I known how difficult it was going to be to write this book,I would probably have taken up down-hill mud wrestling1 instead.

    The only reason that I eventually succeeded is due to the tremendoussupport that I received from my family and friends.

    Special thanks for technical advice are due to Alvin Brown,Alon Kfir, Don Kuk, and Preston Jett,2 the closest thing to living encyclo-pedic reference manuals one could hope to meet. The reason that the textcontains so few bibliographic references is due to the fact that I never hadto look anything upI simply strolled around the corner and asked therelevant expert for the definitive answer.3 Also, thanks go to Dave Allen,Pat Williams, Rob Kunkle, and Ed Smith for their sterling advice onprogrammable logic, seafood gumbo, circuit boards, and C programming,respectively.

    Thanks are also due to my wife Stephanie for the many hours shespent laboring over the formatting, and to my small army of reviewers:Tony McCollum, Dana Stephenson, Dan Polfer, Sam Lay, and JamesJohnson. Additionally, I am very grateful for the painstaking work putforward by Barbara Castlen and my mother, Margaret Maxfield, in thefinal grammatical check. In the unlikely event that any errors did creep in,they can only be attributed to cosmic rays and have nothing to do with me.

    I should also like to mention my daughters, Abby and Lucie, withoutwhom this book would never have materialized. They so depleted myfinancial resources that I was obliged to look for a supplemental sourceof income.

    1 Always a personal favorite.2 To avoid any hint of preferential treatment, the cast appears in reverse alphabetical sort of the third character in

    the first name.3 This was particularly useful because, although electronic concepts and practices are defined and documented

    almost to the point of absurdity, many of them tend to be defined and documented in various, and often contra-dictory, ways.

    H

  • Finally, who could avoid acknowledging my friend (I use the termin the loosest sense) Al Gilbert. His last of the reverse-mohican haircutsand technicolor suspenders4 are a source of endless amusement, even on thedarkest days.

    CLIVE (MAX) MAXFIELDJuly 1992 April 1994

    4 On the off-chance that Al is ever allowed out in public, it should perhaps be explained that suspenders inAmerica are used to hold ones trousers up, as opposed to an article of feminine lingerie, which would be the casein England.

    xviii Bebop to the Boolean Boogie

  • About the Authorlive (Max) Maxfield lives with three women. However, as one of them ishis wife, Stephanie, and the others are his daughters, Lucie and Abby,

    this is not quite as exciting as it might at first appear. Max is 6'1" tall, out-rageously handsome, English and proud of it. In addition to being a trendsetter and a leader of fashion, he is widely regarded as an expert in all aspectsof electronic engineering (at least by his mother). Apropos of nothing at all,Max has a younger brother, Andrew (Max) Maxfield,1 who would be tickledpink to see his name in a real book.

    For those who are interested in this sort of thing, Max received a B.Sc. inControl Engineering from Sheffield Polytechnic, England, in 1980. He beganhis career as a mainframe CPU designer for International Computers Limited(ICL) in Manchester, England. To cut a long story short, Max now findshimself a member of the technical staff (MTS) at Intergraph Electronics,Huntsville, Alabama, USA. Between then and now, he has wandered throughintegrated circuit and circuit board design, sauntered through in-circuit andfunctional test programming, and hurled himself into design capture andsimulation technologies.

    Max is the author of dozens of articles and papers appearing in magazinesand at technical conferences around the world. He was once referred to as anindustry notable and a semiconductor design expert by someone famous whowasnt prompted, coerced, or renumerated in any way! Maxs main areas ofinterest are currently focused in the analog, digital, and mixed-signal simu-lation of integrated circuits and multichip modules, but who knows whattomorrow will bring?

    1 Everyone in Maxs family shares the same nickname which can result in somewhat convoluted after dinnerconversations.

    C

  • DedicationThis book is dedicated to my Auntie Barbara,

    whose assiduous scrubbing in my younger years hasleft me the proud owner of the cleanest pair of

    knees in the known universe!

  • Introductionhis outrageously interesting book has two namesakes: Bebop, a jazzstyle known for its fast tempos and agitated rhythms, and Boolean

    algebra, a branch of mathematics that is the mainstay of the electronicsdesigners tool chest. Bebop to the Boolean Boogie meets the expectations setby both, because it leaps from topic to topic with the agility of a mountaingoat, and it will become your key reference guide to understanding the weirdand wonderful world of electronics. As Captain James T. Kirk would say:Bebop to the Boolean Boogie boldly goes behind the beyond, behind whichfew books have boldly gone beyond before.

    There are many excellent books on electronics, ranging from intro-ductory texts to highly detailed reference works. However, most of theseofferings focus on specific subjects, making it difficult to see the big picture.By contrast, Bebop to the Boolean Boogie provides a wide-ranging but compre-hensive introduction to the electronics arena, roaming through the funda-mental concepts and rampaging through electronic components and theprocesses used to create them. As a bonus, nuggets of trivia are includedwith which you can amaze your family and friends; for example, GreenlandEskimos have a base twenty number system because they count using bothfingers and toes.

    When reading this book you should ideally start at the beginning,wander through the middle, and eventually arrive somewhere in thevicinity of the end. But each chapter has been written to be as self-sufficientas possible, and the style of the book is intended to facilitate your plungingin and out as you wish.

    In some respects, the order and fashion in which information is pre-sented differs from the format associated with that of traditional text books.However, the presentation format has been carefully selected, the chaptersare short and focused, and their ordering provides an ongoing mixture ofsubjects. The book consists of two main sections which, taken together,span an exceptionally wide range:

    T

  • Section 1: Fundamental Concepts

    After considering the differences between analog and digital viewsof the world, the discussion progresses rapidly through atomic theoryand semiconductor switches to primitive logic functions and theirelectronic implementations. The concepts of alternative numberingsystems are presented, along with binary arithmetic, Boolean algebra,and Karnaugh map representations. Finally, the construction of morecomplex logical functions is considered along with their applications.

    Section 2: Components and Processes

    This section considers the components from which electronicsystems are formed and the processes required to construct them.The construction of integrated circuits is examined in some detail,followed by introductions to memory devices, programmable devices,and application-specific devices. The discussion continues withhybrids, printed circuit boards, and multichip modules, and closeswith an overview of some alternative and future technologies.

    This book is of particular interest to first-year electronics students.Additionally, by clarifying the techno-speech used by engineers, the bookis of value to anyone who is interested in understanding more about elec-tronics but lacks a strong technical background.

    Except where such interpretation is inconsistent with the context,the singular shall be deemed to include the plural, the masculine shall bedeemed to include the feminine, and the spelling shall be deemed to becorrect.

    A Brief History of Computers and Electronics

    Before moving on to the meat of the book, it is appropriate to firstconsider a brief history of computers and electronics to set the stage for allthat is to follow.

    No one person may be credited with the invention of electronics orcomputers, but several names stand proud in the crowd. The following

    xxii Bebop to the Boolean Boogie

  • attempts to cover at least a few of the more notable individual developments,with great regret for any omissions.

    The first tools used to aid calculation were almost certainly mans ownfingers, and it is not simply a coincidence that the word digit is used torefer to a finger (or toe) as well as a numerical quantity. As the need torepresent larger numbers grew, early man employed readily availablematerials for the purpose. The oldest known objects used to representnumbers are bones with notches discovered in western Europe. Of specialinterest is a wolf bone more than 20,000 years old with 55 notches in groupsof five, which was discovered at Vestonice, Czechoslovakia in 1937. Also ofuse were small stones or pebbles, which could represent larger numbers thanfingers and toes and have the advantage of being able to easily store inter-mediate results for later use. Thus, it is also no coincidence that the wordcalculate is derived from the Latin word for pebble.

    The first actual calculating mechanism known to us1 is the abacus,which is thought to have been invented sometime between 1,000 BC and500 BC. There are a number of versions of abacus, but the most popular arebased on the bi-quinary system, which utilizes two bases, base-2 and base-5,to represent decimal numbers.

    The great Italian Renaissance man Leonardo da Vinci (14521519) wasa genius: painter, musician, sculptor, architect, engineer, etc. However, hiscontributions to mechanical calculation remained hidden until the redis-covery of two of his notebooks in 1967. Working models of da Vinciscalculator have since been constructed from the drawings in these notebooks.

    In the early 1600s, a Scottish mathematician, John Napier (15501617),invented a tool called Napiers Bones, which were multiplication tableswritten out on strips of wood or bone. Napier also invented logarithms,which greatly assisted in arithmetic calculations. The combination of loga-rithms and Napiers bones formed the basis for the modern slide rule.

    A French mathematician, physicist, and theologian, Blaise Pascal(16231662), is credited with the invention of the first operational calcu-lating machine. In 1640 Pascal started developing a device to help his father

    Introduction xxiii

    1 It is more than possible that other similar inventions have been lost in the mists of time.

  • add sums of money in his tax work. The first operating model, the ArithmeticMachine, was introduced in 1642 and Pascal created fifty more devices overthe next ten years.2

    Gottfried von Leibniz (16461716) entered university at 15 years ofage and received his bachelors degree at 17. Leibniz said: It is unworthyof excellent men to lose hours like slaves in the labor of calculation whichcould be safely relegated to anyone else if machines were used. Leibnizdeveloped Pascals ideas and, in 1671, introduced the Step Reckoner, adevice which could multiply, divide, and evaluate square roots by seriesof stepped additions. Pascals and Leibnitzs devices were the forebears oftodays desktop computers.

    In the early 1880s, a French silk weaver called Joseph Jacquard(17521834) invented a way of automatically controlling the warp andweft threads on a silk loom by recording patterns as holes in a string of cards.In the years to come, variations on Jacquards punched cards found a varietyof uses, including the storage of music for automated pianos and the storageof programs for computers.

    The first device that might be considered to be a computer in themodern sense was conceived by the eccentric British mathematician CharlesBabbage (17911871). In Babbages time, mathematical tables such as loga-rithmic and trigonometric functions were generated by teams of mathe-maticians working night and day on primitive calculators. In 1822, Babbageproposed building a machine called the Difference Engine to automaticallycalculate these tables.

    The Difference Engine was partially completed when Babbage hadthe idea for another machine that would use Jacquards punched cards.The proposed Analytical Engine was to use loops of cards to control anautomatic calculator and make decisions based on the results of previouscomputations. The Analytical Engine was intended to employ severalfeatures subsequently used in modern computers: sequential control,branching, and looping.

    xxiv Bebop to the Boolean Boogie

    2 In 1658, Pascal created a scandal when, under the pseudonym of Amos Dettonville, he challenged other mathe-maticians to a contest and then awarded the prize to himself!

  • Working with Babbage was the daughter of Lord Byron, Augusta AdaLovelace (18151852), who created a program for the Analytical Engine thatwould compute Bernoulli numbers.3 Based on this work, Ada is now creditedas being the first computer programmer and, in 1979, the modern program-ming language ADA was named in her honor.

    Babbage worked on the Analytical Engine from around 1830 untilhe died. Unfortunately, he was a hundred years ahead of his time; the tech-nology of the day was inadequate for the task and the machine was nevercompleted. Interestingly enough, one of Babbages earlier Difference Engineswas finally constructed by a team at Londons Science Museum workingfrom original drawings. The final machine consists of 4,000 componentsconstructed from cast iron, bronze and steel, weighs three tons, and is3.3 meters wide by 0.45 meters deep by 2.1 meters tall. It performed its firstsequence of complex calculations in the early 1990s, returning results to31 digits of accuracy, which is far more accurate than the standard pocketcalculator. However, each calculation requires the operator to turn a crankhundreds, sometimes thousands of times.

    Not too far away from Babbage, another British mathematician,George Boole (18151864), was busily inventing a new form of mathematics.Boole made significant contributions in several areas of mathematics, butwas immortalized for two works in 1847 and 1854 in which he representedlogical expressions in a mathematical form now known as Boolean Algebra.Booles work was all the more impressive because, with the exception ofelementary school and a short time in a commercial school, he was almostcompletely self-educated.

    In conjunction with Boole, yet another British mathematician,Augustus DeMorgan (18061871), formalized a set of logical operationsnow known as DeMorgan transformations.4 As the Encyclopedia Britannicasays: A renascence of logical studies came about almost entirely because

    Introduction xxv

    3 In their spare time, Babbage and Ada also attempted to create a system for predicting the winners of horse races,but it is said that they lost a lot of money!

    4 In fact, the rules we ascribe to DeMorgan were known in a more primitive form by William Ockham in the 14thcentury.

  • of Boole and DeMorgan. Unfortunately, with the exception of students ofsymbolic logic, Boolean Algebra was destined to remain largely unknownand unused for the better part of a century.

    The pace began to pick up somewhat in the twentieth century. In1906, the American inventor Lee de Forest (18731961) introduced a thirdelectrode called the grid into the thermionic valve. The resulting triodecould be used as both an amplifier and a switch.

    In 1921, the Czech author Karel Capek (18901938) produced his best-known work, the play R.U.R. (Rossums Universal Robots), which featuredmachines created to simulate human beings. The term robot came from theCzech word robota, meaning work.

    In the late 1930s, a graduate student at MIT, Claude E. Shannon,realized that Boolean Algebra provided an ideal mathematical system fordesigning computers. His Masters thesis showed how Booles concepts ofTRUE and FALSE could be used to represent the functions of switches inelectronic circuits. Shannons paper has been described as: Possibly themost important Masters thesis of the century. Shannon is also creditedwith the invention of the rocket-powered frisbee and is famous for ridingdown the corridors at Bell Laboratories on a unicycle while simultaneouslyjuggling four balls.

    Many consider the modern computer era to commence with the firstlarge-scale automatic digital computer developed between 1939 and 1944;the Harvard Mark I. The Mark I was primarily constructed out of switchesand relays and was described as sounding like a roomful of ladies knitting.The machine was 51 feet long, 8 feet high, and weighed approximately5 tons! Although the Mark I is considered to be the first digital computer,its architecture was significantly different from modern machines. Thedevice consisted of many calculators working on parts of the same problemunder the guidance of a single control unit. Instructions were read in onpaper tape, and the device could only perform operations in the sequencein which they were received.

    In the aftermath of World War II, it was discovered that a program-controlled calculator called the Z3 had become functional in Germany in

    xxvi Bebop to the Boolean Boogie

  • 1941. Developed by Konrad Zuse, the Z3 therefore predates the Mark I.Some believe that the Z3 was faster than the Mark I, but unfortunately itdidnt survive the war.

    By the mid-1940s, computers were being built out of vacuum tubesrather than switches and relays. Although the vacuum tubes were fragile,expensive, and used a lot of power, they were much faster than relays andmuch quieter. The first true electronic computer, ENIAC (ElectronicNumerical Integrator And Calculator), was constructed at the University ofPennsylvania between 1943 and 1946. In many ways ENIAC was a monster;it occupied 30 feet by 50 feet of floor space, weighed approximately 30 tons,and used more than 18,000 vacuum tubes requiring 150 kilowatts of power,enough to light a small town. One of the greatest problems with computersbuilt from vacuum tubes was reliability; 90% of ENIACs down-time wasattributed to locating and replacing burnt-out tubes. Records from 1952show that approximately 19,000 vacuum tubes had to be replaced in thatyear alone; this averages out to about 50 tubes a day!

    One of the consultants to the ENIAC development group was theHungarian-American mathematician Johaan Von Neumann (19031957).Although no one person may be credited with inventing the computer,many consider Von Neumann to be the single most important contributor.During the development of ENIAC, Von Neumann conceived the ideaof storing instructions in memory along with the data. Rather than simplyfollowing a predetermined sequence of instructions, this would allow theprogram to branch to alternate instruction sequences based on the resultsof previous calculations. Additionally, as the electronic vacuum tubes wereso much faster than relays, it was no longer necessary to use multiplecomputing elements operating in parallel.

    Von Neumann gathered his ideas together in a paper issued in June1945, in which he presented the basic elements of a stored-programcomputer:

    i. to have a memory containing both data and instructions, and toallow both data and instruction memory locations to be read from,and written to, in any desired order;

    Introduction xxvii

  • ii. to have a calculating unit capable of performing both arithmeticand logical operations on the data;

    iii. and to have a control unit which could interpret an instructionreceived from the memory and select alternative courses of actionbased on the results of previous operations.

    The key point was that the computer could modify its own programsin much the same way as was originally suggested by Babbage. The computerstructure resulting from Von Neumanns criteria is popularly known as aVon Neumann Machine, and virtually all digital computers from that timehave been based on this architecture.

    Apropos of nothing at all, a jazz style known as Bebop became highlypopular in the decade following World War II. Charlie Parker, Dizzy Gillespieand Thelonius Monk were especially associated with this form of music,known for its fast tempos and agitated rhythms. We may only speculateif it was but a coincidence that many of the most significant ideas anddiscoveries in the history of computing occurred alongside the flourishingBebop.

    Von Neumanns ideas led to the proposal for the first stored programmachine, EDVAC (Electronic Discrete Variable Automatic Computer),which was developed at the University of Pennsylvania. Unfortunately,although the conceptual design was completed by 1946, several keymembers left the project to pursue their own careers and the machine didnot become fully operational until 1952. EDVAC contained approximately4,000 vacuum tubes and 10,000 crystal diodes. A 1956 report shows thatEDVACs average error-free up-time was approximately 8 hours.

    In fact, some would dispute EDVACs claim-to-fame as the first storedprogram computer due to its late completion. Based on the ideas set forwardfor EDVAC, a small experimental machine comprising 32 words of memoryand a 5-instruction instruction-set was operating at Manchester University,England, by June 1948. Additionally, a machine called EDSAC (ElectronicDelay Storage Automatic Calculator) performed its first calculation atCambridge University, England, in May 1949.

    xxviii Bebop to the Boolean Boogie

  • The first commercially available computer, UNIVAC I (UniversalAutomatic Computer), was also based on the EDVAC design. Work startedon UNIVAC I in 1948, and the first unit was delivered in 1951. Once again,due to the late completion of EDVAC, the first UNIVAC unit was delivereda year before EDVAC was fully operational.

    The transistor and subsequently the integrated circuit must certainlyqualify as two of the greatest inventions of the twentieth century. Drivenby research on radar in World War II, scientists and engineers began toinvestigate a little known group of substances called semiconductors. It wasconsidered that devices formed from semiconductors had potential as ampli-fiers and switches and could therefore be used to replace the prevailingtechnology of vacuum tubes.

    Bell Laboratories in the United States began research into semi-conductors in 1945, and physicists William Shockley, Walter Brattain andJohn Bardeen succeeded in creating the first point-contact germanium tran-sistor on December 23, 1947. In 1950, Shockley invented a new devicecalled a bipolar junction transistor that was more reliable, easier andcheaper to build, and gave more consistent results than point-contactdevices.

    By the late 1950s, bipolar transistors were being manufactured out ofsilicon rather than germanium; in addition to being easier to work with,silicon offered certain electrical advantages. Bipolar junction transistors areformed from the junction of three pieces of doped silicon called the collec-tor, base, and emitter. The original bipolar transistors were manufacturedusing the mesa process, in which a doped piece of silicon called the mesa(or base) was mounted on top of a larger piece of silicon which formed thecollector; the emitter was created from a smaller piece of silicon embeddedin the base.

    In 1959, the Swiss Physicist Jean Hoerni invented the planar process inwhich optical lithographic techniques were used to diffuse the base into thecollector, then the emitter into the base. One of Hoernis colleagues, RobertNoyce, invented a technique for growing a layer of silicon dioxide insulatorover the transistor, leaving small areas over the base and emitter exposed,

    Introduction xxix

  • and diffusing thin layers of aluminum into these areas to create wires. Theprocesses developed by Hoerni and Noyce led directly to modern integratedcircuits.

    In 1962, Steven Hofstein and Fredric Heiman at the RCA researchlaboratory in Princeton, New Jersey, invented a new family of devices calledmetal-oxide semiconductor field-effect transistors. Although these tran-sistors were somewhat slower than bipolar transistors, they were cheaper,smaller and used less power. Additionally, modified metal-oxide semi-conductor structures could be made to act as capacitors or resistors.

    To a large extent the demand for miniaturization was driven by thedemands of the American space program. For some time people had beenthinking that it would be a good idea to be able to fabricate entire circuitson a single piece of semiconductor. The first public discussion of this ideais credited to a British radar expert, G.W.A. Drummer, in a paper presentedin 1952. However, it was not until the summer of 1958 that Jack Kilby,working for Texas Instruments, succeeded in fabricating multiple compo-nents on a single piece of semiconductor. Kilbys first prototype was a phaseshift oscillator and, although manufacturing techniques subsequently tookdifferent paths from those used by Kilby, he is still credited with the manu-facture of the first true integrated circuit.

    By 1961, Fairchild and Texas Instruments had announced the avail-ability of the first commercial planar integrated circuits comprising simplelogic functions. This announcement marked the beginning of the massproduction of integrated circuits. In 1963, Fairchild produced a device calledthe 907 containing two logic gates, each of which consisted of four bipolartransistors and four resistors. The 907 also made use of isolation layers andburied layers, which were to become common features in modern integratedcircuits.

    In 1967, Fairchild introduced a device called the Micromosaicwhich contained a few hundred transistors. The key feature of the Micro-mosaic was that the transistors were not initially connected to each other.A designer used a computer program to specify the function the device wasrequired to perform, and the program determined the necessary transistorinterconnections and constructed the masks required to complete the

    xxx Bebop to the Boolean Boogie

  • device. The Micromosaic is credited as the forerunner of the modernapplication-specific integrated circuit and the first real application ofcomputer-aided design.

    In 1970, Fairchild introduced the first 256-bit static RAM called the4100; in the same year Intel announced the first 1024-bit dynamic RAMcalled the 1103. Then, in 1971, Intel presented the first microprocessor toreach the market, the 4004. This 4-bit device was part of a four-chip systemwhich also comprised a 256-byte ROM, a 32-bit RAM, and a 10-bit shiftregister. The 4004 contained approximately 2,300 transistors and couldperform 60,000 operations per second. The 4004 was followed in 1972 bythe 8008, an 8-bit microprocessor which contained approximately 3,300transistors. However, both the 4004 and 8008 microprocessors weredesigned for specific applications. In 1974, Intel presented the first truegeneral-purpose microprocessor, the 8-bit 8080, which contained about4,500 transistors and could perform 200,000 operations per second.

    The advent of the general-purpose microprocessor heralded a new erain computing. Systems small enough to fit on a desk could be created withmore processing power than monsters weighing tens of tons only a decadeor two before. Almost unbelievably, individuals could now own a personalcomputer. The effects of these developments are still unfolding, but it is notexcessive to say that the digital computer has changed the world moresignificantly than almost any other human invention.

    Introduction xxxi

  • ow sit up and pay attention because this bit is important. Electronicengineers split their world into two views, analog and digital, and its

    necessary to understand the difference between these viewsto make much sense out of the rest of this book.Consider a fun-loving fool sliding down a rampmounted alongside a staircase (Figure 1.1).

    To accurately determine the personsposition on the ramp, an independentobserver would require the use of a tapemeasure. Alternatively, the observer couldestimate the ramp-sliders approximatelocation in relation to the nearest stair.The exact position on the ramp, as measuredusing the tape measure, would be consideredto be an analog value. An analog value mostclosely represents the real world and can beas precise as the measuring technique allows.By comparison, an estimation based on thenearest stair would be considered to be a digital value. A digital valueis represented as being in one of a finite number of discrete states calledquanta. The accuracy, or resolution, of a digital value is dependent onthe number of quanta employed to represent it.

    Assume that at some starting time called T0 our thrill-seeker isbalanced at the top of the ramp preparing to take the plunge. Hecommences sliding at time T1 and reaches the bottom at time T2. Graphscan be plotted representing the location of the person on the ramp as afunction of time; these representations are known to electronic engineersas waveforms (Figure 1.2).

    1

    Analog versus Digital

    Chapter

    N

    Ground

    Step 1

    Step 2

    Step 3

    Platform

    Step 4

    Figure 1.1: Staircase and ramp

  • 2 Chapter One

    Figure 1.3: Brick suspended by elastic

    The horizontal axis in both waveforms represents the passage of time,which is considered to progress from left to right. In the case of the analogwaveform, the vertical axis is used to represent the thrill-seekers exact locationin terms of height above the ground, and is therefore annotated with real,physical units. By comparison, the vertical axis for the digital waveform is anno-tated with abstract labels which do not have any units associated with them.

    To examine the differences between the analog and digital views in moredetail, consider a brick suspended from a wooden beam by a piece of elastic.

    If the brick is left to its own devices, it willeventually reach a stable state where the pullof gravity is balanced by the tension in theelastic (Figure 1.3).

    Assume that at time T0 the system isin its stable state. The system remains inthis state until time T1, when an inquisitivepasserby grabs hold of the brick and pullsit down, thereby increasing the tension on

    the elastic. Pulling the brick downtakes some time, and the brick

    reaches its lowest point attime T2. The passerby hangsaround for a while looking

    Figure 1.2: Person on a ramp: analog and digital waveforms

    T1T0

    Time(seconds)

    Neareststep

    T2T1T0

    Time(seconds)

    Height

    ANALOG VIEW DIGITAL VIEW

    Step 1

    Step 2

    Step 3

    Step 4

    Platform

    Wooden beam

    Elastic

    Brick

    Stable position(tension in elastic balances pull of gravity)

    T2

  • somewhat foolish, releases the brick at time T3, and thereafter exits from ourstory. The bricks resulting motion may be illustrated using an analog waveform:

    Analog versus Digital 3

    Now consider a digital view of the bricks motion represented by twoquanta labeled LOW and HIGH. The LOW quanta may be taken to representany height less than or equal to the systems stable position, and the HIGHquanta therefore represents any height greater than the stable position:

    Figure 1.5: Brick on elastic: digital waveform (two quanta)

    T T T T0 1 2 3Time

    Stable Position

    Below thestable position

    Above thestable position

    Analog bandsDigital state

    HIGH

    LOW

    Figure 1.4: Brick on elastic: analog waveform

    T T T T0 1 2 3Time

    Stable Position

    Height

  • The analog waveform is only shown here for reasons of clarity.Although it is apparent that the digital view is a subset of the analog view,digital representations often provide extremely useful approximations tothe real world. If the only requirement in the above example is to determinewhether the brick is above or below the stable position, then the digitalview is the most appropriate.

    The accuracy of a digital view can be improved by adding more quanta.For example, consider a digital view with five quanta: LOW, LOW-MIDDLE,MIDDLE, HIGH-MIDDLE, and HIGH. As the number of quanta increases, thedigital view more closely approximates the analog view:

    4 Chapter One

    T T T T0 1 2 3Time

    Analog bandsDigital state

    HIGH

    LOW

    HIGH-MIDDLE

    MIDDLE

    LOW-MIDDLE

    Figure 1.6: Brick on elastic: digital waveform (five quanta)

    In the real world, every electronic component behaves in an analogfashion. However, these components can be connected together so as toform functions whose behavior is amenable to digital approximations.This book concentrates on the digital view of electronics, although certainaspects of analog designs and the effects associated with them are discussedwhere appropriate.

  • 2

    Atoms, Molecules,and Crystals

    Chapter

    atter, the stuff that everything is made of, is formed from atoms. Theheart of an atom, the nucleus, is composed of protons and neutrons

    and is surrounded by a cloud of electrons. It may help to visualize electronsas orbiting the nucleus in the same way that the moon orbits the earth. Inthe real world things arent quite this simple, but the concept of orbitingelectrons serves our purpose:

    M

    Figure 2.1: Helium atom

    Each proton carries a single positive (+ve) charge and each electroncarries a single negative (ve) charge. The neutrons are neutral and act likeglue, holding the nucleus together and resisting the natural tendency ofthe protons to repel each other. Protons and neutrons are approximately thesame size, while electrons are very much smaller. If a basketball were usedto represent the nucleus of a helium atom then, on the same scale, softballscould represent the individual protons and neutrons, while large garden peascould represent the electrons. In this case, the diameter of the electrons

    +ve

    -vee

    N PP N -ve

    e

    +ve

    PNe+ve-ve

    =====

    ProtonNeutronelectronpositive chargenegative charge

  • orbit would be approximately equal to the length of 250 football fields!(Thats American football fields excluding the end zones.) Thus, themajority of an atom consists of empty space. If all the empty space wereremoved from the atoms that form a camel, it would be possible for acamel to pass through the eye of a needle!1,2

    The number of protons determines the type of the element; forexample, hydrogen has one proton, helium two, lithium three, etc.Atoms vary greatly in size, from hydrogen with its single proton to thosecontaining hundreds of protons. The number of neutrons does not neces-sarily equal the number of protons. There may be several different flavors,or isotopes, of the same element differing only in their number of neutrons;for example, hydrogen has three isotopes with zero, one, and two neutrons,respectively.

    Left to their own devices, each proton in the nucleus will have acomplementary electron. If additional electrons are forcibly added toan atom, the result is a negative ion of that atom; if electrons are forciblyremoved from an atom, the result is a positive ion.

    In an atom where each proton is balanced by a complementaryelectron, one would assume that the atom would be stable and contentwith its own company; however, things are not always as they seem.Although every electron contains the same amount of negative charge,electrons orbit the nucleus at different levels known as quantum levels orelectron shells. Each electron shell requires a specific number of electronsto fill it; the first shell requires two electrons, the second requires eight,etc. Thus, although a hydrogen atom contains both a proton and anelectron and is therefore electrically balanced, it is still not completelyhappy. Given a choice, hydrogen would prefer to have a second electronto fill its first electron shell. However, simply adding a second electronis not the solution; although the first electron shell would now be filled,the extra electron would result in an electrically unbalanced negative ion.

    6 Chapter Two

    1 I am of course referring to the Bible verse: It is easier for a camel to go through the eye of a needle, than for arich man to enter into the Kingdom of God (Mark 10:25).

    2 This is irrespective of the size, age, weight, or even the name of the camel!

  • Atoms, Molecules, and Crystals 7

    Obviously this is a bit of a stumper, but the maker of the universecame up with a solution; atoms can use the electrons in their outermostshell to form bonds with other atoms. The atoms share each others elec-trons, thereby forming more complex structures. One such structure is calleda molecule; for example, two hydrogen atoms (chemical symbol H), eachcomprising a single proton and electron, can bond together and share theirelectrons to form a hydrogen molecule (chemical symbol H2):

    These types of bonds are called valence bonds. The resulting hydrogenmolecule contains two protons and two electrons from its constituent atomsand so remains electrically balanced. However, each atom lends its electronto its partner and, at the same time, borrows an electron from its partner. Thiscan be compared to two circus jugglers passing objects between each otherthe quickness of the hand deceives the eye. The electrons are passing back-wards and forwards between the atoms so quickly that each atom is fooledinto believing it has two electrons. The first electron shell of each atomappears to be completely filled and the hydrogen molecule is therefore stable.

    Figure 2.2: Two hydrogen atoms bonding to forma hydrogen molecule

    Hydrogen Atom (H)

    +veP

    -vee

    Hydrogen Atom (H)

    +veP

    -vee

    Hydrogen Molecule (H2)

    +veP

    +veP

    -vee

    -vee

  • 8 Chapter Two

    Even though the hydrogen molecule is the simplest molecule of all,the previous illustration demanded a significant amount of time, space, andeffort. Molecules formed from atoms containing more than a few protonsand electrons would be well nigh impossible to represent in this manner.A simpler form of representation is therefore employed, with two dashedlines indicating the sharing of two electrons:

    3 Because helium is so stable, it is known as an inert, or noble, gas.

    Figure 2.3: Alternative representation of a hydrogen molecule

    H HH2 H = hydrogen atom

    H2O

    H H

    O

    Figure 2.4: Water molecule

    H = hydrogen atomO = oxygen atom

    Now contrast the case of hydrogen with helium. Helium atoms eachhave two protons and two electrons and are therefore electrically balanced.Additionally, as heliums two electrons completely fill its first electron shell,this atom is very stable.3 Under normal circumstances helium atoms do notgo around casually making molecules with every other atom they meet.

    Molecules can also be formed by combining different types of atoms.An oxygen atom (chemical symbol O)contains eight protons and eight elec-trons. Two of the electrons are used tofill the first electron shell, which leavessix left over for the second shell.Unfortunately for oxygen, its secondshell would ideally prefer eight electronsto fill it. Each oxygen atom can there-fore form two bonds with other atomsfor example, with two hydrogen atomsto form a water molecule (chemicalsymbol H2O) (Figure 2.4). The reason

  • Si = Silicon Atom

    Si

    Si

    Si

    Si

    Si

    the three atoms in the water molecule are not shown as forming a straightline is discussed in the section on nanotechnology in Chapter 21.

    Each hydrogen atom lends its electron to the oxygen atom and at thesame time borrows an electron from the oxygen atom. This leads both of thehydrogen atoms to believe they have two electrons in their first electronshell. Similarly, the oxygen atom lends two electrons (one to each hydrogenatom) and at the same time borrows two electrons (one from each hydrogenatom). When the two borrowed electrons are added to the original six in theoxygen atoms second shell, this shell appears to contain the eight electronsnecessary to fill it. Thus, all the atoms in the water molecule are satisfiedwith their lot and the molecule is stable.

    Structures other than molecules may be formed when atoms bond; forexample, crystals. Carbon, silicon and germanium all belong to the samefamily of elements; each has only four electronsin its outermost electron shell. Silicon has14 protons and 14 electrons; two electrons arerequired to fill the first electron shell and eightto fill the second shell; thus, only four remainfor the third shell, which would ideally prefereight. Under the appropriate conditions, eachsilicon atom will form bonds withfour other silicon atoms, resultingin a three-dimensional siliconcrystal4 (Figure 2.5).

    The electrons used to formthe bonds in crystalline structuressuch as silicon are tightly bound totheir respective atoms. Yet anotherstructure is presented by metals suchas copper, silver, and gold. Metalshave an amorphous crystalline

    Atoms, Molecules, and Crystals 9

    4 An equivalent structure formed from carbon atoms is known as diamond.

    Figure 2.5: Three-dimensionalstructure of silicon crystal

    Si = silicon atom

  • structure in which their shared electrons have relatively weak bonds andmay easily migrate from one atom to another.

    Apart from the fact that atoms are the basis of life, the universe, andeverything as we know it, they are also fundamental to the operation ofthe components used in electronic designs. Electricity may be consideredto be vast herds of electrons migrating from one place to another, whileelectronics is the science of controlling these herds: starting them, stoppingthem, deciding where they can roam, and determining what they are goingto do when they get there.

    10 Chapter Two

  • Chapter

    ne of the most significant mathematical tools available to electronicsdesigners was actually invented for quite a different purpose. Around

    the 1850s, a British mathematician, George Boole (18151864), developeda new form of mathematics that is now known as Boolean Algebra. Boolesintention was to use mathematical techniques to represent and rigorouslytest logical and philosophical arguments. His work was based on thefollowing: a statement is a sentence that asserts or denies an attributeabout an object or group of objects:

    Statement: Your face resembles a cabbage.Depending on how carefully you choose your friends, theymay either agree or disagree with the sentiment expressed;therefore, this statement cannot be proved to be eithertrue or false.

    By comparison, a proposition is a statement that is either true or falsewith no ambiguity:

    Proposition: I just tipped a bucket of burning oil into your lap.This proposition may be true or it may be false, but it isdefinitely one or the other and there is no ambiguityabout it.

    Propositions can be combined together in several ways; propositionscombined with an AND operator are known as a conjunction:

    O

    9

    Boolean Algebra

  • 76 Chapter Nine

    Conjunction: You have a parrot on your head AND you have a fishin your ear.

    The result of a conjunction is true if all of the propositionscomprising that conjunction are true.

    Propositions combined with an OR operator are known as a dis-junction:

    Disjunction: You have a parrot on your head OR you have a fish inyour ear.

    The result of a disjunction is true if at least one of thepropositions comprising that disjunction is true.

    From these beginnings, Boole established a new mathematical fieldknown as symbolic logic, in which the logical relationship between proposi-tions can be represented symbolically by such means as equations or truthtables. Sadly, this work found little application outside the school of symboliclogic for almost one hundred years.

    In fact, the significance of Booles work was not fully appreciated untilthe late 1930s, when a graduate student at MIT, Claude Shannon, submitteda masters thesis that revolutionized electronics. In this thesis, Shannonshowed that Boolean Algebra offered an ideal technique for representing thelogical operation of digital systems. Shannon had realized that the Booleanconcepts of FALSE and TRUE could be mapped onto the binary digits 0 and 1,and that both could be easily implemented by means of electronic circuits.

    Logical functions can be represented using graphical symbols,equations, or truth tables, and these views can be used interchangeably(Figure 9.1).

    There are a variety of ways to represent Boolean equations. In thisbook, the symbols &, | and ^ are used to represent AND, OR, and XORrespectively; a negation, or NOT, is represented by a horizontal line, or bar,over the portion of the equation to be negated.

  • Boolean Algebra 77

    Figure 9.1: Summary of primitive logic functions

    1

    y = a | by = a

    a y

    BUF

    ya

    0011

    111

    b

    0101

    a y

    OR

    b

    y = a & b

    ya

    0011

    1

    b

    0101

    a y

    AND

    b |

    y = a ^ b

    ya

    0011

    11

    b

    0101

    a y

    XOR

    b& |

    0

    ya01

    0 0

    0

    000

    y = a | by = a

    a y

    NOT

    ya

    0011

    1

    b

    0101

    a y

    NOR

    b

    y = a & b

    ya

    0011

    111

    b

    0101

    a y

    NAND

    b |

    y = a ^ b

    ya

    0011

    1

    1

    b

    0101

    a y

    XNORb

    ya

    01

    & |&

    0

    000

    00

    10

  • 78 Chapter Nine

    y = a | 0

    ya

    0011

    0111

    b

    0101

    ya b

    b=0a

    y = a

    ya

    0011

    0001

    b

    0101

    b=0a y

    AND

    y = 0

    y = a & 0

    OR

    y|&

    Combining a Single Variable with Logic 0 or Logic 1

    A set of simple but highly useful rules can be derived from the combi-nation of a single variable with a logic 0 or logic 1:1,2

    Figure 9.2: Combining a single variable with logic 0 or logic 1

    1 Note that, throughout these discussions, the results from the NAND and NOR functions would be the inverse ofthose from the AND and OR functions, respectively.

    2 Note that the symbol shown in the equations in Figure 9.2 means therefore.

    ya

    0011

    0111

    b

    0101

    ya b ya b

    b=1a y

    y = 1

    OR

    y = a | 1

    ya

    0011

    0001

    b

    0101

    ya b ya b

    b=1a y

    y = a

    AND

    y = a & 1

    |&

  • Boolean Algebra 79

    The Complementary Rules

    The rules derived from the combination of a single variable with theinverse of itself are known as the complementary rules:

    ya

    0011

    0111

    b

    0101

    ya b

    b=aa y

    y = 1

    ya

    0011

    0001

    b

    0101

    b=aa y

    AND

    y = 0

    y = a & a y = a | a

    NOT OR

    |&

    NOT

    &

    The Idempotent Rules

    The rules derived from the combination of a single variable with itselfare known as the idempotent rules:

    Figure 9.4: The complementary rules

    Figure 9.3: The idempotent rules

    ya

    0011

    0111

    b

    0101

    ya ba y

    y = a

    ya

    0011

    0001

    b

    0101

    a y

    AND

    y = a

    y = a & a y = a | a

    OR

    & b=ab=a |

  • 80 Chapter Nine

    The Commutative Rules

    The commutative rules state that the order in which variables arespecified will not affect the result of an AND or OR operation:

    y = b | a

    ay

    OR

    b|

    The Involution Rule

    The involution rule states that an even number of inversions canceleach other out; for example, two NOT functions connected in seriesgenerate an identical result to that of a BUF function:

    Figure 9.6: The commutative rules

    a w

    NOT

    w = a

    y

    a w01

    10

    w y01

    10

    y = w y = a y = a

    a

    BUF

    y

    a y

    01

    01

    NOT

    Figure 9.5: The involution rule

    y = a & b

    ay

    AND

    b&&

    y = b & a

    ay

    AND

    b&&

    y = a | b

    a y

    OR

    b |

  • Boolean Algebra 81

    The Associative Rules

    The associative rules state that the order in which pairs of variables areassociated together will not affect the result of multiple AND or OR operations:

    a y

    bc

    yAND

    ab

    cba

    y

    ANDc &

    &

    AND AND

    & AND

    &

    y = a & (b & c)y = (a & b) & cy = a & b & c

    &

    n addition to recognizing the application to Boolean algebra toelectronic design, Shannon is also credited with the invention of the

    rocket-powered frisbee, and is famous for riding down the corridors atBell Laboratories on a unicycle while simultaneously juggling four balls.

    y = (a | b) | c

    a y

    bc

    y

    OR

    y

    OR

    y = a | b | c y = a | (b | c)

    | | OR

    OR

    |

    |

    a y

    ORb |

    cba

    c

    Figure 9.7: The associative rules

    I

  • 82 Chapter Nine

    Precedence of Operators

    In standard arithmetic, the multiplication operator is said to havea higher precedence than the addition operator. This means that, if anequation contains both multiplication and addition operators withoutparenthesis, then the multiplication is performed before the addition;for example:3

    6 + 2 4 6 + (2 4)

    Similarly, in Boolean Algebra, the & operator has a higher precedencethan the | operator:

    a | b & c a | (b & c)

    Due to the similarities between these arithmetic and logical operators,the & operator is known as a logical multiplication or product, and the |operator is known as a logical addition or sum. To avoid any confusion asto the order in which logical operations will be performed, this book willalways make use of parentheses.

    The first true electronic computer, ENIAC (ElectronicNumerical Integrator and Calcu-lator), was constructed at theUniversity of Pennsylvania be-tween 1943 and 1946. In manyways ENIAC was a monster; itoccupied 30 feet by 50 feet offloor space, weighed approxi-mately 30 tons, and used morethan 18,000 vacuum tubeswhich required 150 kilowatts of

    powerenough to light a smalltown. One of the big problemswith computers built fromvacuum tubes was reliability;90% of ENIACs down-time wasattributed to locating andreplacing burnt-out tubes.Records from 1952 show thatapproximately 19,000 vacuumtubes had to be replaced in thatyear alone; that averages outto about 50 tubes a day!

    3 Note that the symbol shown in the equations indicates is equivalent to or is the same as.

  • Boolean Algebra 83

    The First Distributive Rule

    In standard arithmetic, the multiplication operator will distribute overthe addition operator because it has a higher precedence; for example:

    6 (5 + 2) (6 5) + (6 2)

    Similarly, in Boolean Algebra, the & operator will distribute over an |operator because it has a higher precedence; this is known as the first dis-tributive rule:

    Figure 9.8: The first distributive rule

    a

    00001111

    b

    00110011

    c

    01010101

    (b | c)

    01110111

    y

    00000111

    a

    00001111

    b

    00110011

    c

    01010101

    (a & c)

    00000101

    y

    00000111

    (a & b)

    00000011

    Output columns are identical

    a

    y

    OR

    b

    cAND

    AND

    y = a & (b | c)

    a ybc AND

    OR|

    &|

    &

    &

    y = (a & b) | (a & c)

  • 84 Chapter Nine

    4 Note that the symbol shown in the equation indicates is not equal to.

    The Second Distributive Rule

    In standard arithmetic, the addition operator will not distribute overthe multiplication operator because it has a lower precedence:4

    6 + (5 2) (6 + 5) (6 + 2)

    However, Boolean Algebra is special in this case. Even though the| operator has lower precedence than the & operator, it will still distributeover the & operator; this is known as the second distributive rule:

    Figure 9.9: The second distributive rule

    b

    a

    00001111

    b

    00110011

    c

    01010101

    (b & c)

    00010001

    y

    00011111

    a

    00001111

    b

    00110011

    c

    01010101

    (a | c)

    01011111

    y

    00011111

    (a | b)

    00111111

    Output columns are identical

    a

    yb

    c

    y = a | (b & c)

    a y

    c OR

    ANDAND

    y = (a | b) & (a | c)

    |

    &

    |

    &OR

    |OR

  • Boolean Algebra 85

    y = a | (a & b)

    a y

    BUF

    y = a

    a

    yb

    y = (a & b) | (a & b)

    b

    a

    yb

    y = (a | b) & (a | b)

    b

    b

    a y

    OR

    AND

    y = a & (a | b)

    |

    &

    |

    b

    a y

    OR

    AND

    OR

    |&

    |

    AND

    AND&

    OR

    OR

    &

    AND

    &

    |

    The Simplification Rules

    There are a number of simplification rules which can be used toreduce the complexity of Boolean expressions. As the end result is toreduce the number of logic gates required to implement the expression,the process of simplification is also known as minimization:

    Figure 9.10: The simplification rules

    continued on next page

  • 86 Chapter Nine

    y = a & (a | b)

    b

    aya

    y = a | (a & b)

    b

    ay

    OR

    AND

    a

    &

    | &

    | AND

    OR

    ew now know that, before

    elbowing his way up the ladder

    of corporate success, the author

    of this epic volume once aspired

    to be a world-famous explorer.

    Picture him, if you will, as he

    strode across the veldt (hair by

    Vidal Sasson, eyelashes by Max

    Factor, and loin cloths by Fruit

    of the Loom). The name Tracker

    Max, as he then styled himself,

    was oft bandied by the denizens

    of the dim and dingy taverns in

    the deepest, direst domains of

    the dark continent.

    F Today his Arnold Schwarzeneggerlook-alike body is compressed intoan executive-style business suit

    (in a fashion reminiscent of years

    gone by) and he passes his twilight

    years quaffing the odd fermented

    coconut and penning trail-blazing

    books such as this one. Now that

    time has healed the deeper wounds,

    some in unusual and interesting

    places that he is only too happy to

    display (for a nominal fee), he feels

    more able to tell the tale of those

    far off times . . . unfortunately we

    dont have enough space here!

    a yb

    a yb

    AND

    &|OR

    Figure 9.10 (continued): The simplification rules

  • ba y

    DeMorgan Transformation

    Reverse Transformation

    a0011

    b0101

    y0001

    a0011

    b0101

    a1100

    b1010

    (a | b)1110

    y0001

    y

    a a

    b b

    a | bNOT

    NOT

    NOTOR

    y = a & b

    AND

    StartStep #1Step #2Step #3

    a & ba | ba | ba | b

    StartStep #1Step #2Step #3Step #4

    a | ba & ba & ba & ba & b

    & |

    y = a | b

    Boolean Algebra 87

    DeMorgan Transformations

    A contemporary of Booles, Augustus DeMorgan (18061871), alsomade significant contributions to the field of symbolic logic, most notablya set of rules which facilitate the conversion of Boolean expressions intoalternate and often more convenient forms. A DeMorgan Transformationcomprises four steps:

    1. Exchange the & operators for | operators and vice versa.

    2. Invert all the variables; also exchange 0s for 1s and vice versa.

    3. Invert the entire function.

    4. Reduce all multiple inversions.

    Consider the DeMorgan Transformation of a 2-input AND function(Figure 9.11). Note that the NOT gate on the output of the new functioncan be combined with the OR to form a NOR.

    Figure 9.11: DeMorgan Transformation of an AND

    Start a | bStep #1 a &bStep #2 a &b

    Step #3 a &bStep #4 a &b

    Start a &bStep #1 a | bStep #2 a | bStep #3 a | b

  • 88 Chapter Nine

    Similar transformations can be performed on the other primitivefunctions:

    Figure 9.12: DeMorgan Transformations ofAND, NAND, OR and NOR

    ba

    a

    b

    NOT

    NOT

    NOR

    y = a | bDeMorgan y = a & b&

    AND

    |

    ba

    a

    b

    NOT

    NOT

    OR

    y = a | b

    NAND

    y = a & bDeMorgan

    & |

    ba

    a

    b

    NOT

    NOT

    y = a & by = a | bDeMorgan

    |OR

    &

    NAND

    ba

    a

    b

    NOT

    NOT

    y = a & b

    NOR

    y = a | bDeMorgan

    |AND

    &

  • a b c minterms maxterms

    0 0 0 (a & b & c) (a | b | c)0 0 1 (a & b & c) (a | b | c)0 1 0 (a & b & c) (a | b | c)0 1 1 (a & b & c) (a | b | c)1 0 0 (a & b & c) (a | b | c)1 0 1 (a & b & c) (a | b | c)1 1 0 (a & b & c) (a | b | c)1 1 1 (a & b & c) (a | b | c)

    Boolean Algebra 89

    Minterms and Maxterms

    For each combination of inputs to a logical function, there is anassociated minterm and an associated maxterm. Consider a truth table withthree inputs a, b, and c (Figure 9.13.)

    The minterm associatedwith each input combinationis the &, or product, of theinput variables; the maxtermis the |, or sum, of theinverted input variables.Minterms and maxterms areuseful for deriving Booleanequations from truth tablesas discussed below.

    Sum-of-Products and Product-of-Sums

    A designer will often specify portions of a design using truth tables,and determine how to implement these functions as logic gates later.The designer may start by representing a function as a black box with anassociated truth table. Note that the values assigned to output y in the truthtable shown below were selected randomly, and have no significance beyondthe purposes of this example.

    Figure 9.14: Black box with associated truth table

    Figure 9.13: Minterms and maxterms

    a00001111

    b00110011

    c01010101

    y01011100

    BlackBox

    a

    c

    b y

  • 90 Chapter Nine

    There are two commonly used techniques for deriving Boolean equa-tions from a truth table. In the first technique, the minterms correspondingto each line in the truth table for which the output is a logic 1 are extractedand combined using | operators; this method results in an equation said tobe in sum-of-products form. In the second technique, the maxterms corre-sponding to each line in the truth table for which the output is a logic 0 arecombined using & operators; this method results in an equation said to be inproduct-of-sums form:

    For a function whose output is logic 1 fewer times than it is logic 0,it is generally easier to extract a sum-of-products equation. Similarly, if theoutput is logic 0 fewer times than it is logic 1, it is generally easier to extracta product-of-sums equation. The sum-of-products and product-of-sums formscomplement each other and return identical results. An equation in eitherform can be transformed into its alternative form by means of the appro-priate DeMorgan Transformation.

    Once an equation has been obtained in the required form, the designerwould typically make use of the appropriate simplification rules to minimizethe number of logic gates required to implement the function. However,neglecting any potential minimization, the equations above could be trans-lated directly into their logic gate equivalents (Figure 9.16).

    y = ( a b c ) ( a b c ) ( a b c )

    Line #1

    a

    00001111

    b

    00110011

    c

    01010101

    y

    01011100

    Line #2Line #3Line #4Line #5Line #6Line #7Line #8

    Product-of-Sums

    Sum-of-Products

    Line #2 Line #4 Line #5 Line #6( a b c ) | | |

    y = ( a | b | c ) ( a | b | c ) ( a | b | c ) ( a | b | c ) Line #1 Line #3 Line #7 Line #8

    &

    & &

    & &

    & & & & & &

    Figure 9.15: Sum-of-products versus product-of-sums forms

  • Boolean Algebra 91

    Figure 9.16: Sum-of-products versus product-of-sums implementations

    c

    y

    cb

    a

    a

    bc

    y

    cb

    a

    a

    b

    Sum-of-Products Product-of-Sums

    &

    &

    &

    &

    &

    |

    |

    |

    |

    |

    Canonical Forms

    In a mathematical context, the term canonical form is taken tomean a gener