Basic Digital Electronics 'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and if it were so, it would be: but as it isn't, it ain't. That's logic' (Carroll: Alice Through the Looking Glass)
PHYSICS AND ITS APPLICATIONS Series Editor E.R. Dobbs University of London This series of short texts on advanced topics for students, scientists and engineers will appeal to readers seeking to broaden their knowledge of the physics underlying modern technology. Each text provides a concise review of the fundamental physics and current developments in the area, with references to treatises and the primary literature to facilitate further study. Additionally texts providing a core course in physics are included to form a ready reference collection. The rapid pace of technological change today is based on the most recent scientific advances. This series is, therefore, particularly suitable for those engaged in research and development, who frequently require a rapid summary of another topic in physics or a new application of physical principles in their work. Many of the texts will also be suitable for final year undergraduate and postgraduate courses. 1. Electrons in Metals and Semiconductors R. G. Chambers 2. Basic Digital Electronics J. A. Strong 3. AC and DC Network Theory Anthony J. Pointon and Harry M. Howarth 4. Nuclear and Particle Physics R. J. Blin-Stoyle
Basic Digital Electronics J.A. 5trong Reader in Experimental Physics University of London SPRINGER-SCIENCE+BUSINESS MEDIA, B.v.
First edition 1991 1991 J. A. Strong Originally published by CHAPMAN AND HALL 1991 Typeset in 10/12 Times by Thomson Press (India) Ltd, New Delhi ISBN 978-0-412-39990-9 AII rights reserved. No part of this publication may be reproduced Of transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, or stored in any retrieval system of any nature, without the written permission of the copyright holder and the publisher, application for which shall be made to the publisher. The publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that may be made. British Library Cataloguing in Publication Data Strong, J. A. Basic digital electronics 1. Electronics I. Title II. Series 537.5 ISBN 978-0-412-39990-9 Library ofcongress Cataloging-in-Publication Data Strong, J. A. (John A.), 1941- Basic digital electronics / J. A. Strong.-lst ed. p. cm.-(physics and its applications; 2) Includes bibliographical references and index. ISBN 978-0-412-39990-9 ISBN 978-94-011-3118-6 (ebook) DOI 10.1007/978-94-011-3118-6 1. Digital electronics. I. Title. II. Series. TK7868.D5S79 1991 621.381-dc20 90-2689 CIP
Contents Preface Acknowledgements 1 Introduction 1 1.1 Preamble 1 1.2 History 2 1.3 Sentence analysis and truth tables 2 1.4 Number systems 4 1.5 Gates and memories 6 1.6 Integrated circuits 6 Problems 8 2 Basic gates 10 2.1 Introduction 10 2.2 Logic levels 10 2.3 Gating functions 12 2.4 Basic gates and symbols 12 2.5 Boolean algebra and truth tables 15 2.6 Universal logic elements 18 2.7 Gate minimization 20 2.8 NAND and NOR implementation 24 2.9 Limitations of the minimization process 25 2.10 Don't care and can't happen conditions 27 2.11 Hazards and glitches 28 2.12 Alternative symbols 31 2.13 Chip list 32 Problems 32 Practical exercises 35 ix xi
vi Contents 3 Gating circuits 3.1 Introduction 3.2 Decoders 3.3 Decoders as logic elements 3.4 Multiplexers 3.5 Multiplexers as logic elements 3.6 Parity 3.7 Memories as logic elements 3.8 Programmable logic 3.9 Binary addition 3.10 Full-adder circuits 3.11 Look-ahead carry circuits 3.12 Decimal addition 3.13 Binary subtraction 3.14 Multiplication 3.15 Division 3.16 Chip list Problems Practical exercises 4 Latches and flip-flops 4.1 Introduction 4.2 Aims 4.3 The set-reset flip-flop 4.4 The set-reset flip-flop as a switch debouncer 4.5 The data latch 4.6 The data flip-flop 4.7 Synchronization of external signals 4.8 The JK flip-flop 4.9 The T flip-flop 4.10 Multivibrators 4.11 Chip list Problems Practical exercises 5 Registers and counters 5.1 Introduction 5.2 Aims 5.3 Basic register 37 37 37 41 42 45 46 48 49 54 57 59 60 62 64 66 66 67 70 73 73 73 74 77 77 80 83 84 86 87 90 90 92 95 95 96 96
Contents 5.4 Shift register 5.5 Ring counters 5.6 Counters 5.7 Asynchronous counters 5.8 Modulo-n asynchronous counters 5.9 Synchronous counters 5.10 Synchronous system design 5.11 Modulo-5 counter using JK flip-flops 5.12 Modulo-5 counter using T flip-flops 5.13 Modulo-3 up/down counter using JK flip-flops 5.14 Decade counter using D flip-flops 5.15 Chip list Problems Practical exercises 6 Memories 6.1 Introduction and aims 6.2 Memory types and uses 6.3 Memory architecture 6.4 Memory arrays and buses 6.5 Memory read and write cycles 6.6 A practical memory circuit 6.7 Chip list Problems Practical exercises 7 The analogue connection 7.1 Introduction 7.2 Aims 7.3 Digital-to-analogue conversion 7.4 The R - 2R ladder 7.5 Practical DACs 7.6 A microprocessor-compatible DAC 7.7 A multiplying DAC 7.8 Uses for DACs 7.9 Accuracy and resolution of DACs 7.10 Analogue-to-digital conversion 7.11 Integrator ADCs 7.12 Single-slope conversion 7.13 Dual-slope ADC VB 97 100 103 104 107 110 115 115 118 120 123 125 126 130 131 131 132 133 137 138 141 142 143 144 146 146 147 148 149 152 152 154 157 157 159 159 160 162
viii Contents 7.14 Other ADCs using integrators 7.15 Analogue-to-digital conversion using DACs 7.16 The tracking ADC 7.17 The successive-approximation ADC 7.18 Flash ADCs 7.19 Chip list Problems Practical exercises Appendix 1 Boolean algebra AU Rules At.2 Algebraic minimization At.3 Minimization in product-of-sums form Appendix 2 Logic families A2.1 TTL circuits A2.2 Open-collector output A2.3 Tri-state output A2A Schmitt trigger inputs A2.5 Schottky TTL A2.6 Emitter-coupled logic (ECL) A2.7 MOS logic A2.8 Conversion between TTL and CMOS A2.9 A CMOS oscillator circuit Appendix 3 Designing and testing A3.1 Designs and diagrams A3.2 Proto typing methods A3.3 Testing Answers to problems Further reading Index 164 165 165 167 170 172 173 174 178 178 179 181 182 182 185 186 187 189 190 191 193 195 196 196 198 199 201 210 212
Preface Modern electronics is the most visible result of research in solid state physics. Transistors and integrated circuits are used everywhere in ever increasing numbers. The microprocessor controlled coffee-pot exists. Most experimental physicists, and, indeed, experimental scientists in most disciplines, study their subject with the aid of apparatus containing significant amounts of electronics and much of that electronics is digital. In order to design experiments and apparatus or simply to understand how a piece of equipment works, an understanding of electronics has become increasingly important. In recognition that electronics has pervaded so many areas, courses in digital electronics are now a recommended part of physics and many other science degree courses. At the introductory level, digital electronics is, primarily, a practical subject with relatively few basic concepts and any complexity arises from the coupling together of many simple circuits and the extensive use of feedback. Designing an electronic circuit and then getting it to work correctly provides an experience, and a sense of achievement, which is significantly different from most undergraduate work as it more closely resembles project work than standard laboratory practicals. For many years, I have been convinced of the value to students of understanding electronics and have taught a number of courses at different levels. This book is based on the introductory material given to physics and computer science students over several years but with extensive updating in an attempt to keep pace with rapid changes in the field. I have concentrated on the basic ideas and provided examples of the circuits and techniques used together with a
x Preface description of the underlying principles. To suit different ways of learning, the problems and practicals cover the range from reinforcement exercises to complex problems. These sections should be considered as an integral part of the text as they provide valuable lessons in many cases. In the cause of brevity, only material I considered essential has been included and many interesting topics have been missed out or mentioned only in passing. I hope that my selection is considered reasonable by the reader. Although the book starts from scratch as far as digital electronics is concerned, familiarity with basic electrical circuit laws is assumed and an introductory knowledge of operational amplifiers is helpful for the chapter on conversion between digital and analogue systems. If my aim is achieved, by the end ofthe book, readers should feel capable of designing small digital systems with some confidence that they will work. J. A. Strong
Acknowledgements I would like to thank Professor E. R. Dobbs for suggesting that I write this book, Professor P. V. March for his encouragement, my colleagues at Royal Holloway and Bedford New College for their assistance, my family for their never-ending support and my publishers for their patience.