Digital Circuit Design with an Introduction to Cplds and Fpgas
Total Page:16
File Type:pdf, Size:1020Kb
Digital Circuit Design with an Introduction to CPLDs and FPGAs Steven T. Karris Editor Orchard Publications www.orchardpublications.com © 2005 Orchard Publications. All rights reserved. Printed in the United States of America. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of the publisher. Direct all inquiries to Orchard Publications, [email protected] Product and corporate names are trademarks or registered trademarks of Xilinx, Inc., Altera, Inc. Cypress Semiconductor, Lattice, Inc., and Atmel, Inc. They are used only for identification and explanation, without intent to infringe. Library of Congress Cataloging-in-Publication Data Library of Congress Control Number (LCCN) 2005929326 Copyright TX 5-612-942 0974423963 ISBN: 0974423955 Disclaimer The author has made every effort to make this text as complete and accurate as possible, but no warranty is implied. The author and publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this text. Contents Preface.............................................................................................................................................6 Chapter 1: Common Number Systems and Conversions Overview ......................................8 Overview...................................................................................................................................8 1.1 Decimal, Binary, Octal, and Hexadecimal Systems............................................................8 1.2 Binary, Octal, and Hexadecimal to Decimal Conversions ................................................10 1.3 Decimal to Binary, Octal, and Hexadecimal Conversions ................................................11 1.4 Binary-Octal-Hexadecimal Conversions...........................................................................14 1.5 Summary ...........................................................................................................................16 1.6 Exercises ...........................................................................................................................17 1.7 Solutions to End-of-Chapter Exercises .............................................................................21 Chapter 2: Operations in Binary, Octal, and Hexadecimal Systems ....................................22 Overview.................................................................................................................................22 2.1 Binary System Operations.................................................................................................22 2.2 Octal System Operations...................................................................................................24 2.3 Hexadecimal System Operations ......................................................................................26 2.4 Complements of Numbers.................................................................................................28 2.5 Subtraction with Tens- and Twos-Complements...............................................................31 2.6 Subtraction with Nines- and Ones-Complements .............................................................33 2.7 Summary ...........................................................................................................................35 2.8 Exercises ...........................................................................................................................36 Chapter 3: Sign Magnitude and Floating Point Arithmetic .....................................................45 Overview.................................................................................................................................45 3.1 Signed Magnitude of Binary Numbers..............................................................................45 3.2 Floating Point Arithmetic..................................................................................................46 3.3 Summary ...........................................................................................................................52 3.4 Exercises ...........................................................................................................................53 Chapter 4: Binary Codes.............................................................................................................57 Overview.................................................................................................................................57 4.1 Encoding ...........................................................................................................................57 4.2 The American Standard Code for Information Interchange (ASCII) Code.......................62 4.3 The Extended Binary Coded Decimal Interchange Code (EBCDIC) ...............................64 4.4 Parity Bits..........................................................................................................................64 4.5 Error Detecting and Correcting Codes..............................................................................65 4.6 Cyclic Codes .....................................................................................................................66 4.7 Summary ...........................................................................................................................69 4.8 Exercises ...........................................................................................................................71 Chapter 5: Fundamentals of Boolean Algebra.........................................................................73 Overview.................................................................................................................................73 5.1 Basic Logic Operations.....................................................................................................73 5.2 Fundamentals of Boolean Algebra ....................................................................................73 5.3 Truth Tables.......................................................................................................................74 5.4 Summary ...........................................................................................................................76 5.5 Exercises ...........................................................................................................................77 Chapter 6: Minterms and Maxterms ..........................................................................................80 Overview.................................................................................................................................80 6.1 Minterms ...........................................................................................................................80 6.2 Maxterms ..........................................................................................................................81 6.3 Conversion from One Standard Form to Another .............................................................82 6.4 Properties of Minterms and Maxterms..............................................................................83 6.5 Summary ...........................................................................................................................87 6.6 Exercises ...........................................................................................................................88 Chapter 7: Combinational Logic Circuits ..................................................................................92 Overview.................................................................................................................................92 7.1 Implementation of Logic Diagrams from Boolean Expressions .......................................92 7.2 Obtaining Boolean Expressions from Logic Diagrams.....................................................98 7.3 Input and Output Waveforms ............................................................................................99 7.4 Karnaugh Maps...............................................................................................................101 7.5 Design of Common Logic Circuits .................................................................................109 7.6 Summary .........................................................................................................................135 7.7 Exercises .........................................................................................................................136 Chapter 8: Sequential Logic Circuits.......................................................................................152 Overview...............................................................................................................................152 8.1 Introduction to Sequential Circuits .................................................................................152 8.2 Set-Reset (SR) Flip Flop .................................................................................................152 8.3 Data (D) Flip Flop...........................................................................................................156 8.4 JK Flip Flop ....................................................................................................................157