fundamentals of digital circuits - kopykitab · fundamentals of digital circuits third edition a....

11

Upload: hoanglien

Post on 06-Jul-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

FUNDAMENTALS OFDIGITAL CIRCUITS

THIRD EDITION

A. Anand KumarPrincipal

K.L. University College of EngineeringK.L. University

Green Fields, VaddeswaramGuntur DistrictAndhra Pradesh

Delhi-1100922014

FUNDAMENTALS OF DIGITAL CIRCUITS, Third EditionA. Anand Kumar

© 2014 by PHI Learning Private Limited, Delhi. All rights reserved. No part of this book may bereproduced in any form, by mimeograph or any other means, without permission in writing from thepublisher.

ISBN-978-81-203-5052-6

The export rights of this book are vested solely with the publisher.

Twenty-fifth Printing (Third Edition) ... ... October, 2014

Published by Asoke K. Ghosh, PHI Learning Private Limited, Rimjhim House, 111, PatparganjIndustrial Estate, Delhi-110092 and Printed by V.K. Batra at Pearl Offset Press Private Limited,New Delhi-110015.

Tothe memory of

My parentsShri A. Nagabhushanam and Smt. A. Ushamani

(Freedom Fighters)

Preface .............................................................................................................................................. xxiii

Symbols, Notations ........................................................................................................................... xxvii

Abbreviations ..................................................................................................................................... xxix

1 INTRODUCTION ............................................................................................... 1–24

1.1 DIGITAL AND ANALOG SYSTEMS ............................................................................. 11.2 LOGIC LEVELS AND PULSE WAVEFORMS............................................................... 3

1.3 ELEMENTS OF DIGITAL LOGIC................................................................................... 5

1.4 FUNCTIONS OF DIGITAL LOGIC ................................................................................. 51.4.1 Arithmetic Operations ............................................................................................ 51.4.2 Encoding ................................................................................................................ 61.4.3 Decoding ................................................................................................................ 71.4.4 Multiplexing ........................................................................................................... 71.4.5 Demultiplexing ....................................................................................................... 81.4.6 Comparison ............................................................................................................ 81.4.7 Code Conversion .................................................................................................... 81.4.8 Storage .................................................................................................................... 81.4.9 Counting ................................................................................................................. 91.4.10 Frequency Division ................................................................................................ 91.4.11 Data Transmission .................................................................................................. 9

1.5 DIGITAL INTEGRATED CIRCUITS ............................................................................ 101.5.1 Levels of Integration ............................................................................................ 10

1.6 MICROPROCESSORS .................................................................................................... 11

v

CONTENTS

vi CONTENTS

1.7 DIGITAL COMPUTERS ................................................................................................. 121.7.1 Major Parts of a Computer ................................................................................... 12

1.8 TYPES OF COMPUTERS ............................................................................................... 13

SHORT QUESTIONS AND ANSWERS ..................................................................................... 14

REVIEW QUESTIONS ............................................................................................................... 18FILL IN THE BLANKS .............................................................................................................. 19

OBJECTIVE TYPE QUESTIONS .............................................................................................. 20

VHDL PROGRAMS ................................................................................................................... 22

2 NUMBER SYSTEMS ...................................................................................... 25–76

2.1 THE DECIMAL NUMBER SYSTEM ............................................................................ 252.1.1 9’s and 10’s Complements ................................................................................... 262.1.2 9’s Complement Method of Subtraction .............................................................. 272.1.3 10’s Complement Method of Subtraction ............................................................ 27

2.2 THE BINARY NUMBER SYSTEM ............................................................................... 282.2.1 Counting in Binary ............................................................................................... 282.2.2 Binary to Decimal Conversion ............................................................................. 292.2.3 Decimal to Binary Conversion ............................................................................. 302.2.4 Binary Addition .................................................................................................... 342.2.5 Binary Subtraction ............................................................................................... 342.2.6 Binary Multiplication ........................................................................................... 352.2.7 Computer Method of Multiplication .................................................................... 362.2.8 Binary Division .................................................................................................... 362.2.9 Computer Method of Division ............................................................................. 37

2.3 REPRESENTATION OF SIGNED NUMBERS ANDBINARY ARITHMETIC IN COMPUTERS ................................................................... 382.3.1 Representation of Signed Numbers Using the 2’s (or 1’s)

Complement Method ............................................................................................ 392.3.2 2’s Complement Arithmetic ................................................................................. 422.3.3 1’s Complement Arithmetic ................................................................................. 452.3.4 Double Precision Numbers .................................................................................. 522.3.5 Floating Point Numbers ....................................................................................... 52

2.4 THE OCTAL NUMBER SYSTEM ................................................................................. 532.4.1 Usefulness of the Octal System ............................................................................ 532.4.2 Octal to Binary Conversion .................................................................................. 532.4.3 Binary to Octal Conversion .................................................................................. 542.4.4 Octal to Decimal Conversion ............................................................................... 542.4.5 Decimal to Octal Conversion ............................................................................... 542.4.6 Octal Arithmetic ................................................................................................... 56

2.5 THE HEXADECIMAL NUMBER SYSTEM ................................................................. 562.5.1 Hexadecimal Counting Sequence ........................................................................ 572.5.2 Binary to Hexadecimal Conversion ..................................................................... 572.5.3 Hexadecimal to Binary Conversion ..................................................................... 582.5.4 Hexadecimal to Decimal Conversion ................................................................... 58

CONTENTS vii

2.5.5 Decimal to Hexadecimal Conversion ................................................................... 592.5.6 Octal to Hexadecimal Conversion ....................................................................... 602.5.7 Hexadecimal to Octal Conversion ....................................................................... 602.5.8 Hexadecimal Arithmetic ...................................................................................... 61

SHORT QUESTIONS AND ANSWERS ..................................................................................... 64

REVIEW QUESTIONS ............................................................................................................... 67FILL IN THE BLANKS .............................................................................................................. 67

OBJECTIVE TYPE QUESTIONS .............................................................................................. 68

PROBLEMS ............................................................................................................................... 70VHDL PROGRAMS ................................................................................................................... 73

3 BINARY CODES ...........................................................................................77–119

3.1 CLASSIFICATION OF BINARY CODES ..................................................................... 773.1.1 Numeric and Alphanumeric Codes ...................................................................... 773.1.2 Weighted and Non-weighted Codes .................................................................... 773.1.3 Positively-weighted and Negatively-weighted Codes ......................................... 783.1.4 Error Detecting and Error Correcting Codes ....................................................... 783.1.5 Sequential Codes .................................................................................................. 793.1.6 Self-complementing Codes .................................................................................. 793.1.7 Cyclic Codes ........................................................................................................ 793.1.8 Reflective Codes .................................................................................................. 793.1.9 Straight Binary Code ............................................................................................ 79

3.2 THE 8421 BCD CODE (NATURAL BCD CODE) ........................................................ 793.2.1 BCD Addition ...................................................................................................... 803.2.2 BCD Subtraction .................................................................................................. 813.2.3 BCD Subtraction Using 9’s and 10’s Complement Methods .............................. 81

3.3 THE EXCESS THREE (XS-3) CODE ............................................................................ 833.3.1 XS-3 Addition ...................................................................................................... 833.3.2 XS-3 Subtraction .................................................................................................. 843.3.3 XS-3 Subtraction Using 9’s and 10’s Complement Methods .............................. 84

3.4 THE GRAY CODE (REFLECTIVE-CODE) .................................................................. 873.4.1 Binary-to-Gray Conversion .................................................................................. 883.4.2 Gray-to-Binary Conversion .................................................................................. 893.4.3 The XS-3 Gray Code ............................................................................................ 90

3.5 ERROR-DETECTING CODES ....................................................................................... 913.5.1 Parity .................................................................................................................... 913.5.2 Check Sums .......................................................................................................... 923.5.3 Block Parity .......................................................................................................... 923.5.4 Five-bit Codes ...................................................................................................... 943.5.5 The Biquinary Code ............................................................................................. 953.5.6 The Ring-counter Code ........................................................................................ 95

3.6 ERROR-CORRECTING CODES.................................................................................... 963.6.1 The 7-bit Hamming Code..................................................................................... 963.6.2 The 15-bit Hamming Code................................................................................... 993.6.3 The 12-bit Hamming Code................................................................................. 100

viii CONTENTS

3.7 ALPHANUMERIC CODES .......................................................................................... 1013.7.1 The ASCII Code ................................................................................................. 1013.7.2 The EBCDIC Code ............................................................................................ 102

SHORT QUESTIONS AND ANSWERS ................................................................................... 103

REVIEW QUESTIONS ............................................................................................................. 109

FILL IN THE BLANKS ............................................................................................................ 109OBJECTIVE TYPE QUESTIONS ............................................................................................ 110

PROBLEMS ............................................................................................................................. 113

VHDL PROGRAMS ................................................................................................................. 115

4 LOGIC GATES............................................................................................120–157

4.1 INTRODUCTION .......................................................................................................... 120

4.2 THE AND GATE ........................................................................................................... 1214.2.1 Realization of AND Gate (DL AND Gate and RTL AND Gate) ...................... 122

4.3 THE OR GATE .............................................................................................................. 1234.3.1 Realization of OR Gate (DL OR Gate and RTL OR Gate) ................................ 123

4.4 THE NOT GATE (INVERTER) .................................................................................... 1244.4.1 Realization of NOT Gate (RTL Logic) .............................................................. 125

4.5 THE UNIVERSAL GATES ........................................................................................... 1254.5.1 The NAND Gate ................................................................................................. 1264.5.2 The NOR Gate .................................................................................................... 128

4.6 THE EXCLUSIVE-OR (X-OR) GATE ......................................................................... 1304.6.1 X-OR Gate as an Inverter ................................................................................... 131

4.7 PROPERTIES OF EXCLUSIVE-OR ............................................................................ 131

4.8 THE EXCLUSIVE-NOR (X-NOR) GATE ................................................................... 1314.8.1 X-NOR Gate as an Inverter ................................................................................ 132

4.9 INHIBIT CIRCUITS ...................................................................................................... 1334.10 PULSED OPERATION OF LOGIC GATES ................................................................ 136

SHORT QUESTIONS AND ANSWERS ................................................................................... 142

REVIEW QUESTIONS ............................................................................................................. 145FILL IN THE BLANKS ............................................................................................................ 145

OBJECTIVE TYPE QUESTIONS ............................................................................................ 145

PROBLEMS ............................................................................................................................. 150VHDL PROGRAMS ................................................................................................................. 151

5 BOOLEAN ALGEBRA................................................................................158–213

5.1 INTRODUCTION .......................................................................................................... 158

5.2 LOGIC OPERATIONS .................................................................................................. 1595.2.1 AND Operation .................................................................................................. 1595.2.2 OR Operation ..................................................................................................... 1595.2.3 NOT Operation ................................................................................................... 159

CONTENTS ix

5.2.4 NAND Operation ............................................................................................... 1595.2.5 NOR Operation .................................................................................................. 1595.2.6 X-OR and X-NOR Operations ........................................................................... 160

5.3 AXIOMS AND LAWS OF BOOLEAN ALGEBRA .................................................... 1605.3.1 Complementation Laws ..................................................................................... 1605.3.2 AND Laws .......................................................................................................... 1605.3.3 OR Laws ............................................................................................................. 1615.3.4 Commutative Laws ............................................................................................ 1615.3.5 Associative Laws ................................................................................................ 1615.3.6 Distributive Laws ............................................................................................... 1625.3.7 Redundant Literal Rule (RLR) ........................................................................... 1645.3.8 Idempotence Laws ............................................................................................. 1645.3.9 Absorption Laws ................................................................................................ 1655.3.10 Consensus Theorem (Included Factor Theorem) ............................................... 1655.3.11 Transposition Theorem ...................................................................................... 1665.3.12 De morgan’s Theorem........................................................................................ 1675.3.13 Shannon’s Expansion Theorem ......................................................................... 1685.3.14 Additional Theorems .......................................................................................... 170

5.4 DUALITY ...................................................................................................................... 1705.4.1 Duals ................................................................................................................... 171

5.5 REDUCING BOOLEAN EXPRESSIONS .................................................................... 171

5.6 FUNCTIONALLY COMPLETE SETS OF OPERATIONS ......................................... 175

5.7 BOOLEAN FUNCTIONS AND THEIR REPRESENTATION .................................. 1765.8 EXPANSION OF A BOOLEAN EXPRESSION

IN SOP FORM TO THE STANDARD SOP FORM ..................................................... 180

5.9 EXPANSION OF A BOOLEAN EXPRESSION INPOS FORM TO STANDARD POS FORM ................................................................... 1805.9.1 Conversion between Canonical Forms .............................................................. 181

5.10 COMPUTATION OF TOTAL GATE INPUTS ............................................................ 1845.11 BOOLEAN EXPRESSIONS AND LOGIC DIAGRAMS ............................................ 185

5.11.1 Converting Boolean Expressions to Logic ......................................................... 1855.11.2 Converting Logic to Boolean Expressions ......................................................... 185

5.12 DETERMINATION OF OUTPUT LEVEL FROM THE DIAGRAM ......................... 188

5.13 CONVERTING AND/OR/INVERT LOGIC TO NAND/NOR LOGIC ....................... 1885.13.1 Active-Low Notation .......................................................................................... 193

5.14 MISCELLANEOUS EXAMPLES ................................................................................. 197

SHORT QUESTIONS AND ANSWERS ................................................................................... 206

REVIEW QUESTIONS ............................................................................................................. 210FILL IN THE BLANKS ............................................................................................................ 210

OBJECTIVE TYPE QUESTIONS ............................................................................................ 211

PROBLEMS ............................................................................................................................. 212

Fundamentals Of Digital Circuits

Publisher : PHI Learning ISBN : 9788120350526 Author : KUMAR, A. ANAND

Type the URL : http://www.kopykitab.com/product/7666

Get this eBook

30%OFF