Sie sind auf Seite 1von 83

DIGITAL SYSTEMS

DESIGN, VOLUME I
DIGITAL SYSTEMS
DESIGN, VOLUME I
Numbering Systems and Logical
Operations

LARRY MASSENGALE
Digital Systems Design, Volume I: Numbering Systems and Logical
Operations

Copyright © Momentum Press®, LLC, 2019.

All rights reserved. No part of this publication may be reproduced, stored


in a retrieval system, or transmitted in any form or by any means—­
electronic, mechanical, photocopy, recording, or any other—except for
brief quotations, not to exceed 250 words, without the prior permission
of the publisher.

First published in 2019 by


Momentum Press®, LLC
222 East 46th Street, New York, NY 10017
www.momentumpress.net

ISBN-13: 978-1-94944-911-2 (print)


ISBN-13: 978-1-94944-912-9 (e-book)

Momentum Press Engineering Technology Collection

Cover and interior design by S4Carlisle Publishing Services Private Ltd.,


Chennai, India

First edition: 2019

10 9 8 7 6 5 4 3 2 1

Printed in the United States of America


Abstract

Working as an engineer with advanced weapon systems for more than


25 years, it was crucial to understand the fundamentals of numbering sys-
tems, logic gate design, and the logical math known as Boolean Algebra.
Whether as a technician or engineer, these fundamentals are the basics
of engineering and are essential in interpreting logic gate functionality.
The intent of this book is to provide much more information than most
commercial engineering references currently offer. In Chapter 1, number-
ing systems such as binary, octal, hexadecimal, gray code, binary-coded
decimal, and other systems are discussed. Chapter 2 discusses constants
and variables, implementing the basic design of truth tables, basic gate
operators, and several other logic gate designs. Chapter 3 provides a broad
array of Boolean Algebra symbology and logic gate operations, discussing
topics such as properties, theorems, implementing and interpreting truth
tables from Boolean Algebra expressions, finding minterms and maxterms
from symbology expressions, and more. The chapter review and chapter
answer sections provide an extensive number of questions with compre-
hensive insight to showing how to attain the answers. This book will be an
extremely valuable asset for technical and engineering students studying
digital system design.

KEYWORDS

Boolean algebra; DeMorgan theorem; logic gate design; logical operators;


numbering systems
Contents

List of Figures  xi

List of Tables xv

Acknowledgments xvii

Chapter 1 Numbering Systems and Codes 1


1.1. Introduction 1
1.2. Decimal Numbering System 2
1.3. Binary Numbering System 2
1.3.1. Binary to Decimal Conversion 4
1.3.2. Decimal to Binary Conversion 6
1.4. Octal Numbering System 7
1.4.1. Octal to Decimal Conversion 8
1.4.2. Decimal to Octal Conversion 9
1.4.3. Octal to Binary Conversion 10
1.4.4. Binary to Octal Conversion 11
1.5. Hexadecimal Numbering System 11
1.5.1. Sum of Weights 12
1.5.2. Radix Multiplication 13
1.5.3. Decimal to Hexadecimal Conversion 13
1.5.4. Hexadecimal to Binary Conversion 14
1.5.5. Binary to Hexadecimal Conversion 15
1.5.6. Octal to Hexadecimal Conversion 15
1.6. Binary Coded Decimal 16
1.6.1. Decimal to BCD Conversion 17
1.6.2. BCD to Decimal Conversion 17
1.7. Gray Code 17
1.7.1. Gray Code to Binary Conversion 18
1.7.2. Binary to Gray Code Conversion 18
1.8. Special Codes 19
1.8.1. Excess-3 Code 19
viii  •  Contents

1.8.2. American Standard Code for Information


Interchange 21
1.9. Addition of Binary, Octal, and Hexadecimal
Numbers 24
1.9.1. Binary Addition 24
1.9.2. Octal Addition 25
1.9.3. Hexadecimal Addition 25
1.10. Subtraction of Binary, Octal, and Hexadecimal
Numbers25
1.10.1. Binary Subtraction 25
1.10.2. Octal Subtraction 25
1.10.3. Hexadecimal Subtraction 25
1.11. Chapter 1 Review—Questions 26
1.12. Chapter 1 Review—Answers 29
Chapter 2 Logic Gates Design 61
2.1. Introduction 61
2.2. Constants and Variables 61
2.3. Truth Tables Used in Boolean Algebra 61
2.4. Basic Logic Gate Operators 63
2.4.1. OR Gate Operator 63
2.4.2. AND Gate Operator 65
2.4.3. NOT Gate Operator 68
2.5. OR, AND, and NOT Combination Circuits 70
2.6. NOR Gate Circuits 72
2.7. NAND Gate Circuits 75
2.8. Chapter 2 Review—Questions 78
2.9. Chapter 2 Review—Answers 80
Chapter 3 Boolean Algebra 89
3.1. Introduction 89
3.2. Boolean Symbols 90
3.3. Basic Logic Operations 91
3.3.1. AND Logic 91
3.3.2. OR Logic 93
3.3.3. NOT Logic 95
3.3.4. NOR Logic 96
3.3.5. NAND Logic 98
3.4. Properties of Real Numbers and Boolean Algebra 100
3.4.1. Properties of Real Numbers 100
3.4.1.1. Associative Property of Addition 100
3.4.1.2. Associative Property of
Multiplication 101
Contents  •   ix

3.4.1.3. Commutative Properties of


Addition and Multiplication 101
3.4.1.4. Distributive Property of
Multiplication over Addition 102
3.4.2. Properties of Boolean Algebra 103
3.4.2.1. Inhibit Property 105
3.4.2.2. Enable Property 105
3.4.2.3. Redundant Property 105
3.4.2.4. Complement Property 105
3.4.2.5. Double Negation Property 106
3.5. DeMorgan’s Theorems 106
3.6. Implementing the Circuit and Developing
the Truth Table 108
3.7. Interpreting Truth Tables 113
3.7.1. Given: Two-Input Truth Table 114
3.7.2. Given: Three-Input Truth Table 115
3.7.3. Given: Three-Input Truth Table 116
3.7.4. Sum of Products Configuration 117
3.7.5. Product of Sums Configuration 119
3.7.6. Sum of Products and Product of Sums
Equality 120
3.8. Minterms and Maxterms 123
3.9. Chapter 3 Review—Questions 127
3.10.   Chapter 3 Review—Answers 132
Bibliography 149
About the Author 151
Index 153
List of Figures

Figure 2.1. OR, AND, and NOT logic gate symbology 63


Figure 2.2. (a) Two-input OR truth table (b) Three-input OR
truth table 63
Figure 2.3. MIL/ANSI, IEC, and DIN OR gate symbology 64
Figure 2.4. Arrangement of OR Gates in 4071 CMOS
integrated circuit 64
Figure 2.5. OR gate input and output waveform 65
Figure 2.6. B747-400 warning system using ORed inputs 65
Figure 2.7. (a) Two-input AND truth table (b) Three-input AND
truth table 66
Figure 2.8. MIL/ANSI, IEC, and DIN AND gate symbology 66
Figure 2.9. Arrangement of AND gates in 7408 CMOS
integrated circuit 66
Figure 2.10. AND gate input and output waveform 67
Figure 2.11. B747-400 flight management system using AND
inputs 68
Figure 2.12. NOT truth table 68
Figure 2.13. MIL/ANSI and IEC NOT gate symbology 68
Figure 2.14. Arrangement of NOT Gates in 4049/7404 CMOS
integrated circuit 69
Figure 2.15. NOT gate input and output waveform 69
Figure 2.16. B747-400 flight management computer using NOT
gate circuit 70
Figure 2.17. Combinational logic using AND, OR, and NOT gates 70
Figure 2.18. Combinational logic truth table 71
Figure 2.19. Combinational logic inputs and outputs waveform 72
Figure 2.20. OR and inverter representing NOR function 72
xii  •   List of Figures

Figure 2.21. OR and NOR truth table 73


Figure 2.22. NOR gate symbology 73
Figure 2.23. NOR gate schematic diagram 74
Figure 2.24. OR and NOR waveforms 74
Figure 2.25. AND and inverter representing NAND function 75
Figure 2.26. AND and NAND truth table 75
Figure 2.27. NAND gate symbology 76
Figure 2.28. Arrangement of NAND gates in 4000/7400
CMOS/TTL integrated circuit 76
Figure 2.29. AND and NAND waveforms 77
Figure 3.1. AND gate with output X = AB 92
Figure 3.2. Truth table for output X = AB 92
Figure 3.3. AND logic with X = AB′ 92
Figure 3.4. Inverter on AND gate with output X = AB′ 93
Figure 3.5. Truth table with inverter on AND gate with output
X = AB′ 93
Figure 3.6. OR gate with output X = A + B 93
Figure 3.7. Truth table for OR gate with output X = A + B 94
Figure 3.8. Inverter on input of OR gate with output X = A + B′ 94
Figure 3.9. Logic symbol with inverter on input of OR gate with
output X = A + B′ 94
Figure 3.10. Truth table with inverter on input of OR gate with
output X = A + B′ 95
Figure 3.11. Inverter NOT with output A′ 95
Figure 3.12. Truth table for NOT gate with output A′ 95
Figure 3.13. Symbol for double NOT function 95
Figure 3.14. Triple NOT function input to NOR gate 96
Figure 3.15. Triple NOT function with NOR waveform 96
Figure 3.16. NOR gate with output X = (A + B)′ 97
Figure 3.17. Truth table for NOR gate with output X = (A + B)′ 97
Figure 3.18. NOR gate with inverter input 97
Figure 3.19. Logic symbol for NOR gate with inverter input 98
Figure 3.20. Truth table for NOR gate with inverter input 98
Figure 3.21. NAND gate 98
Figure 3.22. Truth table for NAND gate 99
Figure 3.23. NAND gate with inverter on input 99
List of Figures  •   xiii

Figure 3.24. Logic symbol for NAND gate with inverter input 99
Figure 3.25. Truth table for NAND gate with inverter on input 99
Figure 3.26. Associative property for addition 100
Figure 3.27. Associative property for multiplication 101
Figure 3.28. Commutative property for addition and
multiplication 102
Figure 3.29. Distributive property of multiplication over addition 103
Figure 3.30. Boolean algebra properties 104
Figure 3.31. DeMorgan’s theorem − (A + B)′ = A′B′ 107
Figure 3.32. DeMorgan’s theorem − (AB)′ = A′ + B′ 107
Figure 3.33. Inverse use of DeMorgan’s theorems 108
Figure 3.34. Implementation of A + AB expression 109
Figure 3.35. Implementation of A + A′B expression 110
Figure 3.36. Implementation of A′ + AB expression 110
Figure 3.37. Implementation of A + A′B′ expression 111
Figure 3.38. Implementation of A′ + AB′ expression 112
Figure 3.39. Implementation of A′ + A′B′ expression 113
Figure 3.40. Sum of products configuration 114
Figure 3.41. Simplified sum of products configuration 114
Figure 3.42. Sum of products configuration 116
Figure 3.43. Simplified sum of products configuration 116
Figure 3.44. Low output expression 117
Figure 3.45. High output expression configuration 118
Figure 3.46. Low output expression with high output equivalent 118
Figure 3.47. Truth table for sum of products 119
Figure 3.48. Logic gate configuration for sum of products 119
Figure 3.49. Truth table for product of sums 119
Figure 3.50. Logic gate configuration for product of sums 120
Figure 3.51. Truth table for product of sums 120
Figure 3.52. Sum of products Logic Gate Configuration 121
Figure 3.53. Product of sums Logic Gate Configuration 122
Figure 3.54. Three-variable minterm and maxterm expansions 124
Figure 3.55. Four-variable minterm and maxterm expansions 124
Figure 3.56. Finding the minterms and maxterms 125
Figure 3.57. Identified truth table minterms and maxterms 125
List of Tables

Table 1.1. Decimal Numbering System Positional Weight 2


Table 1.2. Binary Numbering System Positional Weight 3
Table 1.3. Comparison Between Decimal and Binary Numbers 3
Table 1.4. Binary Numbering System Positional Weight 5
Table 1.5. Octal Numbering System Positional Weight 7
Table 1.6. Comparison Between Decimal, Binary, and
Octal Numbers 8
Table 1.7. Octal Numbering System Positional Weight 9
Table 1.8. Comparison Between Decimal, Binary, Octal, and
Hexadecimal Numbers 12
Table 1.9. Hexadecimal Numbering System Positional Weight 12
Table 1.10. Comparison Between Binary, and Hexadecimal
Numbers 14
Table 1.11. Comparison Between Decimal and Binary Coded
Decimal 16
Table 1.12. Comparison Between Decimal, Binary, and Gray
Code Numbers 17
Table 1.13. Comparison of Digital Numbers and Excess-3 (EX3)
Code 20
Table 1.14. American Standard Code for Information Interchange 21
Table 1.15. Comparison Between Decimal, Binary, Octal,
and Hexadecimal Numbers 26
Table 3.1. Symbology and meaning 90
Table 3.2. Properties of Real Numbers 100
Table 3.3. Properties of Boolean Algebra 103
Acknowledgments

I would like to thank my wife for providing inspiration and motivation while
writing this book. My children Michael and Holly were very instrumental
in keeping me on track to finish the text. Robert Solis, Bob Valencia, Sean
Tijerina, Mike Ormonde, Ming Ho, and Anthony Vernon, all engineers
who are employed by various organizations, provided excitement in get-
ting me started with this project. Two people get my overwhelming thanks
for coaching me on. One is a brilliant engineer who works with cyber
operations, Christy Vera, and the other is my long-time professor friend,
Dr. Wei-Ming Lin, who reviewed the book with his insightful comments
as always. Additionally, Dr. Margaret Wesner has been one of my greatest
supporters, giving me clarity, encouragement, and compassion when times
were rough for me during the writing of this book. Most of all, I give the
Lord Jesus Christ thanks for giving me the ability and knowledge to com-
prehend engineering subject matters.
CHAPTER 1

Numbering Systems
and Codes

1.1. INTRODUCTION

In the study of digital systems design, digital circuits only understand on


and off conditions. The conditions can be represented by logic low and
high states. For a Complementary Medal-Oxide Semiconductor (CMOS)
gate operating at a power supply voltage of 5 volts, the acceptable input
signal voltages range from 0 volts to 1.5 volts for a low logic state and
3.5 volts to 5 volts for a high logic state. Since only two conditions (off
and on) must be met in a digital circuit, the binary numbering system (0
and 1) is used.
In the binary (base 2) numbering system, the two logic levels used
to represent lows and highs are Logic 0 and Logic 1, respectively. The
levels are represented in digital circuits by bits. The word bit was derived
from the words binary digit. Since binary is used in all digital systems, a
method must be available to convert a decimal number into a binary num-
ber. In addition, the reverse procedure is necessary to take the outputs of
digital circuits in binary form and make them readable in decimal form.
Two additional numbering systems are often used in addition to the
binary system when working with digital circuits. Octal is a base-8 num-
bering system that utilizes only the digits 0 through 7. Hexadecimal is a
base-16 numbering system that uses the digits 0 through 9 and the letters
A through F. These two numbering systems provide a method of reducing
the bulkier binary numbers.
Some codes have been developed to make circuits user friendly and
to improve reliability and operation. Others have been developed for stan-
dardization and for detecting errors. We will be discussing these coded
systems along with the most commonly used numbering systems in this
chapter.
2  •   DIGITAL SYSTEMS DESIGN, VOLUME I

1.2.  DECIMAL NUMBERING SYSTEM

The decimal numbering system is known as a positional-weighted num-


bering system. Each digit has a specific weight assigned to it. For instance,
the digit 2 has different values on the basis of the location of the decimal
point. The numbers 0.2, 2, 20, and 200 all contain 2; however, each 2 has
a different decimal place value. The decimal uses the following numbers:
0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Each of these numbers is considered a digit.
These numbers are determined by their positional weight. For example,
if we have the number 50634.7 it would be determined by the following
approach:

104 103 102 101 100 ? 10-1


5 0 6 3 4 ? 7
(5 × 104) (0 × 103) (6 × 102) (3 × 101) (4 × 100) (7 × 10-1)
Table 1.1 provides the positional weights of the decimal numbering
system. The number 50634.7 can be derived by simply adding up each
positional weight.

Table 1.1.  Decimal Numbering System Positional Weight

  5 × 10000 (104) =   50000.0


+ 0 ×   1000 (103) = + 0000.0
+ 6 ×   100 (102) = +  600.0
+ 3 ×    10 (101) = +    30.0
+ 4 ×     1 (100) = +    4.0
+ 7 ×     0.1 (10-1) = +    0.7
50634.7

1.3.  BINARY NUMBERING SYSTEM

The binary numbering system is another positional-weighted numbering


system. Unlike the decimal numbering system, it has only two digits in its
numbering system: 0 and 1. The binary numbering system has a base of
2. The weights of this system are determined in a much similar way as the
decimal system. Table 1.2 provides the positional weights of the binary
numbering system.
Numbering Systems and Codes  •   3

Table 1.2.  Binary Numbering System Positional Weight

By comparing the decimal and binary numbers in Table 1.3, one can
count in binary. Adding up the sum of weights as follows will provide the
binary count.

24 23 22 21 20 ?
1 0 1 1 1 ?
(1 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (1 × 20) =
(1 × 16) + (0 × 8) + (1 × 4) + (1 × 2) + (1 × 1) =
16 + 0 + 4 + 2 + 1 = 23

Table 1.3.  Comparison Between Decimal and Binary Numbers

In base 2 the maximum count is 2n − 1. So if we have a binary of


11111(2), the count would be 25 − 1 = 32 − 1 = 31.
4  •   DIGITAL SYSTEMS DESIGN, VOLUME I

In a three-bit binary up-counter the following shows how the counter


would count. The maximum count could be shown using the previous for-
mula 2n − 1, where n represents the number of stages in the counter. So
23 − 1 = 8 −1 = 7 in binary 7 is represented as 111(2). The maximum count
would be 111(2) for the three-bit binary up-counter as follows.

000
001
010
011
100
101
110
111

Additionally, the desired modulus for a particular counter can be


­obtained by using the following formula:

n = log desired MOD / log 2

So the number of stages required for a binary up-counter that has a


count of 31(10) would be as follows:

n = log desired MOD / log 2


n = log 32 / log 2
n=5

1.3.1.  BINARY TO DECIMAL CONVERSION

If we have a binary count of 11011(2), how would we convert this number


to a decimal count? As stated earlier, using the sum of weights procedure
the following conversion is made:

24 23 22 21 20 ?
1 1 0 1 1 ?
(1 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (1 × 20) =
(1 × 16) + (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) =
16 8 + 0 + 2 + 1 = 27

A second method, known as the radix multiplication method, can be


used to convert from binary, octal, or hex to decimal. This is accomplished
Numbering Systems and Codes  •   5

by repeated multiplication using the radix of the numbering system that


we are converting from. The steps for the radix multiplication procedure
are listed as follows:

Step 1: Start at the most significant bit (MSB) of the binary number to be
converted.
Step 2: Add 0 to the MSB.
Step 3: Multiply the sum by 2.
Step 4: Add the product to the next lesser significant bit.
Step 5: Continue repeating this process from Step 3 until the least signifi-
cant bit (LSB) is reached.

Note: Do not multiple by 2 after the product is added to the LSB. This last
addition produces the decimal equivalent of the binary number.

The following shows the procedure used:

The sum of weights and radix division will need to be used when con-
verting binary fractions into decimal weights. Table 1.4 shows the negative
powers of binary and the positional weight for each binary bit listed.

Table 1.4.  Binary Numbering System Positional Weight

The sum of weights method for binary fractions to decimal is identi-


fied in the following example:

0.1101(2) =
(1 × 2−1) + (1 × 2−2) + (0 × 2−3) + (1 × 2−4) =
(1 × 0.5) + (1 × 0.25) + (0 × 0.125) + (1 × 0.0625) =
0.5 + 0.25 + 0 + 0.0625 = 0.8125
6  •   DIGITAL SYSTEMS DESIGN, VOLUME I

The second method of converting from binary fractions to deci-


mal weights is radix division. Using the same binary number as be-
fore, the following steps can be used to derive the same answer as given
earlier:

Step 1: Bring down the LSB.


Step 2: Divide by 2.
Step 3: Bring down the quotient and the next bit. Divide by 2.
Step 4: Continue the division process until the MSB bit. Divide by 2.
Step 5: Bring down the quotient.

1.3.2.  DECIMAL TO BINARY CONVERSION

Radix division is used to convert decimal integer numbers into binary,


octal, or hex numbers. The following procedure explains how to convert
the decimal integer into binary:

Step 1: Divide the decimal number by 2.


Step 2: Place the whole number part of the quotient to the left of the
number you divided.
Step 3: Put remainder above the decimal number you divided.
Step 4: Divide the whole number from Step 2 by 2. Repeat Steps 2, 3,
and 4 until the quotient is 1. Bring 1 up.

For example, we have the decimal number 12(10) and we want to find
the binary conversion. Using the aforementioned procedures we derive the
base-2 number as follows:
Numbering Systems and Codes  •   7

Radix division uses the whole integer of the decimal number to con-
vert it into a binary number. What if we have a decimal fraction being
converted into a binary number? We would use radix multiplication. The
decimal fraction would be repeatedly multiplied by 2 until a product of 1
is obtained. This is the LSB of the binary number obtained. We will use
this method in converting 0.8125(10) into binary number 0.1101(2) in the
following procedure:

0.8125 0.1101(2)
  ×2
MSB 1.6250
  ×2
1.2500
  ×2
0.5000
  ×2
LSB 1.0000

1.4.  OCTAL NUMBERING SYSTEM

The octal numbering system is a base-8 numbering system. It uses digits 0,


1, 2, 3, 4, 5, 6, and 7, a total of eight digits. Table 1.5 shows some powers
of 8 and positional weights for the octal system.

Table 1.5.  Octal Numbering System Positional Weight

Additionally, Table 1.6 shows decimal, binary, and octal counts


for a comparison of the relationships between the different numbering
systems.
8  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Table 1.6.  Comparison Between Decimal, Binary, and Octal Numbers

1.4.1.  OCTAL TO DECIMAL CONVERSION

We can use the sum of weights method again to convert the octal number
into the decimal number. From Table 1.6 we can see that 33(8) is converted
into 27(10). By the sum of weights method we can verify this is true as
shown in the following procedure:

8(1) 8(0)
3 3(8)
(3 × 8(1)) + (3 × 8(0)) =
(3 × 8) + (3 × 1) =
24 + 3 = 27(10)

Radix multiplication can also be used to convert octal numbers


into decimal numbers. The method is the same as the binary to dec-
imal procedure. So let’s use the radix multiplication to convert 33(8)
into 27(10).
Numbering Systems and Codes  •   9

Step 1: Start at the MSB of the octal number to be converted.


Step 2: Add 0 to the MSB.
Step 3: Multiply the sum by 8.
Step 4: Add the product to the next lesser significant bit.
Step 5: Continue repeating this process from Step 3 until the LSB is reached.

Note: Do not multiple by 8 after the product is added to the LSB. This last
addition produces the decimal equivalent of the octal number.

For the octal fraction part of an octal number radix division can be
used. Let’s convert 0.788(8) into a decimal number: Table 1.7 provides the
octal fractions for some negative powers of 8.

Table 1.7.  Octal Numbering System Positional Weight

1.4.2.  DECIMAL TO OCTAL CONVERSION

As with the decimal to binary conversion, octal also uses radix division. The
following procedure explains how to convert the decimal integer into octal.
10  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Step 1: Divide the decimal number by 8.


Step 2: Place the whole number part of the quotient to the left of number
you divided.
Step 3: Put the remainder above the decimal number you divided.
Step 4: Divide the whole number from Step 2 by 8. Repeat Steps 2, 3, and
4 until the quotient is less than 8. Bring less than 8 number up.

Let’s convert 135(10) into octal:

135(10) =

135(10) = 207(8)

If we had a decimal fraction and wanted to convert it into octal, we


would use radix multiplication. Let’s convert 0.625(10) into octal:

0.625 0.625(10) = 0.5(8)


  ×8
5.000

1.4.3.  OCTAL TO BINARY CONVERSION

When converting an octal number into a binary number, the binary number
will be represented in three digits, as shown in the following procedure:
Numbering Systems and Codes  •   11

Both the octal and binary numbers can be converted back into dec-
imal. We should get the same decimal number for the octal and binary
numbers if we performed the aforementioned operation correctly. Let’s
check:

1.4.4.  BINARY TO OCTAL CONVERSION

When converting from binary to octal, such as 11101110.11(2), the octal


bit will be represented by three binary bits. Start with the LSB bit of the
binary number and move three bits at a time until no bit is remaining. If
there is a fractional portion of the binary number, you will start from the
decimal point and move right for a grouping of three binary bits.

11101110.11(2) =
011 101 110 . 110(2) =
3 5 6 . 6(8)

1.5.  HEXADECIMAL NUMBERING SYSTEM

With more advanced computer and communication equipment it was ne-


cessary to create the hexadecimal numbering system. This development
has reduced the size of the memory space previously used by binary num-
bering systems. Hexadecimal is a base-16 system that consists of 16 char-
acters: 0–9, A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
Table 1.8 shows decimal, binary, octal, and hexadecimal counts and
their relationship to each other. Table 1.9 shows some of the powers of 8
and the associated positional weights.
12  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Table 1.8.  Comparison Between Decimal, Binary, Octal, and


Hexadecimal Numbers

Table 1.9.  Hexadecimal Numbering System Positional Weight

Both the sum of weights and radix multiplication can be used when
converting hexadecimal into decimal. Let’s convert 1CBE(16) into decimal
using both methods:

1.5.1.  SUM OF WEIGHTS

163 162 161 160 ?


1 C B E ?
(1 × 163) + (C × 162) + (B × 161) + (E × 160) =
(1 × 4096) + (C × 256) + (B × 16) + (E × 1) =
4096 + 3072 + 176 + 14 = 7358
(10)
Numbering Systems and Codes  •   13

1.5.2.  RADIX MULTIPLICATION

Hexadecimal fractional parts of whole numbers can be converted into


decimal by radix division. Let’s convert 0.CBE(16) into decimal (recall
C=12, B=11, and E=14):

1.5.3.  DECIMAL TO HEXADECIMAL CONVERSION

As with the decimal to binary conversion, hexadecimal also uses radix


division. The following procedure explains how to convert the decimal
integer into hexadecimal:

Step 1: Divide the decimal number by 16.


Step 2: Place the whole number part of the quotient to the left of the
number you divided.
Step 3: Put the remainder above the decimal number you divided.
Step 4: Divide the whole number from Step 2 by 16. Repeat Steps 2,
3, and 4 until the quotient is less than 16. Bring less than 16
number up.
14  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Let’s convert 563(10) into hexadecimal:


563(10) =

563(10) = 233(16)

Now if we have a decimal fraction of 0.7358(10), what is the hexadec-


imal equivalent? Let’s perform the conversion:

 0.75(10)
  ×16
12.00 = C
 0.75(10) = 0.C(16)

1.5.4.  HEXADECIMAL TO BINARY CONVERSION

As with the octal numbering, the converted hexadecimal to binary number


is a group of four bits for each hexadecimal number. Table 1.10 shows
the hexadecimal conversion into binary for each hexadecimal value. Let’s
convert 233(16) into a binary number:

Table 1.10.  Comparison Between Binary, and Hexadecimal Numbers


Numbering Systems and Codes  •   15

1.5.5.  BINARY TO HEXADECIMAL CONVERSION

Inverse operation is used to convert binary into hexadecimal. Let’s con-


vert 11101011101011(2) to hexadecimal. Start from the LSB binary bit and
group into groups of four bits.

1.5.6.  OCTAL TO HEXADECIMAL CONVERSION

Using the aforementioned binary to hexadecimal conversion procedure we


can convert octal to hexadecimal in the same manner. Let’s convert 2764(8)
into hexadecimal. Start from the point and group into groups of four bits.
16  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Let’s convert a hexadecimal with a fraction into octal now:

Group into groups of three bits on each side of the hex point.

1.6.  BINARY CODED DECIMAL

In some of the previous sections we were using binary-coded decimal


(BCD) without realizing it. Decimal values of 0 through 9 are grouped
into four-bit BCD numbers. However, decimal values 10 through 15
when converted into BCD are considered invalid. This is shown in
Table 1.11.

Table 1.11.  Comparison Between Decimal and Binary Coded Decimal


Numbering Systems and Codes  •   17

1.6.1.  DECIMAL TO BCD CONVERSION

Let’s convert 65(10) into BCD:


67(10) = 0110 0111(BCD).
0110 0111(BCD) does not equate to binary 1100111(2); however, it
equals 103(10). So BCD numbers do not equate to binary numbers.

1.6.2.  BCD TO DECIMAL CONVERSION

As with binary to hexadecimal, the BCD will be grouped into four-bit


groups starting with the LSB of the BCD number. Let’s convert 1000
1001(BCD) into a decimal number:
1000 1001(BCD) = 89(10)

1.7.  GRAY CODE

Gray code is known as error-minimizing code or reflected code. The code


is designed to allow only one-bit change of state in successive counts. The
term reflected code is shown in Table 1.12 in that the numbers from 8(10)
down are an exact reflection of the numbers from 7(10) up.

Table 1.12.  Comparison Between Decimal, Binary, and Gray Code


Numbers
18  •   DIGITAL SYSTEMS DESIGN, VOLUME I

1.7.1.  GRAY CODE TO BINARY CONVERSION

The following procedure identifies how to convert gray code into binary:

Step 1: Bring down the MSB.


Step 2: Add the MSB diagonally to the next lesser significant bit.
Step 3: Place the sum below the bit added to. Note: If a carry is gener-
ated, discard it.
Step 4: Add the sum diagonally to the next lesser significant bit. Repeat
Steps 3 and 4 until all gray code bits have been added.

Let’s convert 1110(G) into binary:

1110(G) = 1011(2)

1.7.2.  BINARY TO GRAY CODE CONVERSION

The following procedure identifies how to convert binary into gray code:

Step 1: Bring down the MSB.


Step 2: Add the MSB to the adjacent bit.
Step 3: Place the sum below the adjacent bit. Note: If a carry is gener-
ated, discard it.
Step 4: Add the second pair of bits.
Numbering Systems and Codes  •   19

Step 5: Place the sum below the last bit added.


Step 6: Add the third pair of bits.
Step 7: Place the sum below the last bit added.

Let’s convert 1110(2) into gray code:

1110(2) = 1001(G)

1.8.  SPECIAL CODES

Two special codes will be mentioned: Excess-3 Code and American Stan-
dard Code for Information Interchange.

1.8.1.  EXCESS-3 CODE

Excess-3 (EX3) Code identifies as a decimal number (0 through 9) that


adds three to each decimal digit and then converts the sum into a BCD
number. Table 1.13 shows both the decimal equivalent and its associated
BCD EX3 number.
20  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Table 1.13.  Comparison of Digital Numbers and Excess-3 (EX3) Code

Let’s convert 96(10) into EX3:

 9  6
+3 +3
12  9
1100 1001(EX3)
96(10) = 1100  1001(EX3)

Let’s convert 478(10) into EX3:

 4  7  8
+3 +3 +3
 7 10 11
0111 1010 1011(EX3)
478(10) = 0111 1010 1011(EX3)

Let’s convert 0101 1001 1010(EX3) into decimal:

0101 1001 1010(EX3)
 5   9 10
−3 −3 −3
 2  6  7(10)
0101 1001 1010(EX3) = 267(10)
Numbering Systems and Codes  •   21

1.8.2.  AMERICAN STANDARD CODE FOR INFORMATION


INTERCHANGE

The American Standard Code for Information Interchange (ASCII) was


developed to standardize computer keyboard data. ACSII is a seven-bit
code. Since seven bits are allowed, we will have 128 (2(7)) different char-
acters making up the ASCII code. Table 1.14 identifies these characters.
The uppercase and lowercase letters seven-bit ASCII codes differ in only
one bit. For instance, the uppercase letter A has an ASCII code of 0100
0001 (hex code 41), while the lowercase letter a has an ASCII code of
0110 0001 (hex code 61). Table 1.14 also identifies a binary code for each
ASCII character, which is eight bits. The MSB or eight bit can be used for
extended ASCII, which allows for an additional 128 graphic characters.

Table 1.14.  American Standard Code for Information Interchange

(continued )
22  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Table 1.14. (Continued )
Numbering Systems and Codes  •   23

Table 1.14. (Continued )

(continued )
24  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Table 1.14. (Continued )

1.9.  ADDITION OF BINARY, OCTAL,


AND HEXADECIMAL NUMBERS

When adding alike base numbers, if a maximum count is achieved per col-
umn, a carry will be generated for the next column. This will be shown in
the following additions of numbers. We can use other numbering systems
to check our answers.

1.9.1.  BINARY ADDITION


Numbering Systems and Codes  •   25

1.9.2.  OCTAL ADDITION

1.9.3.  HEXADECIMAL ADDITION

1.10.  SUBTRACTION OF BINARY, OCTAL,


AND HEXADECIMAL NUMBERS

When subtracting alike base numbers, a borrow may be necessary from the
adjacent higher digit column. This will be shown in the following subtrac-
tions of numbers. We can use other numbering systems to check our answers.

1.10.1.  BINARY SUBTRACTION

1.10.2.  OCTAL SUBTRACTION

1.10.3.  HEXADECIMAL SUBTRACTION


26  •   DIGITAL SYSTEMS DESIGN, VOLUME I

1.11.  CHAPTER 1 REVIEW—QUESTIONS

1. Provide the associated binary, octal, and hexadecimal numbers for


the decimal numbers in Table 1.15.

Table 1.15.  Comparison Between Decimal, Binary, Octal,


and Hexadecimal Numbers

2. Binary, octal, and hexadecimal whole numbers can be converted


into decimal by using either the sum of weight or radix multipli-
cation procedure. Binary, octal, and hexadecimal fraction parts of
number can be converted into decimal by using the radix division
procedure. Convert the following binary, octal, and hexadecimal
numbers into decimal:
a. 111(2) m. 1101001(2)
b. 1111(2) n. 1110000(2)
c. 1011.11(2) o. 1101010(2)
d. 111010(2) p. 1010.111(2)
e. 25(8) q. 154(8)
f. 37(8) r. 632(8)
g. 63(8) s. 173.4(8)
h. 127.32(8) t. 247(8)
i. AF(16) u. 3E(16)
j. 4A(16) v. FAE.DB(16)
k. 7C.BE(16) w. 2ED(16)
l. 5FB(16) x. 88EB(16)
Numbering Systems and Codes  •   27

3. Radix division is used to convert decimal whole numbers into


binary, octal, or hex. Radix multiplication is used to convert the
decimal fraction part of numbers into binary, octal, or hex. Convert
the following decimal numbers into binary, octal, and hexadecimal
numbers:
a. 12(10) e. 354(10)
b. 24(10) f. 1024(10)
c. 326(10) g. 3248(10)
d. 46.8125(10) h. 33.625(10)
4. Convert the following binary numbers into octal and hexadecimal:
a. 11111010(2) e. 111111110(2)
b. 101111011(2) f. 110011001111(2)
c. 1111110011(2) g. 1110110110(2)
d. 11000111101(2) h. 110100100100(2)
5. Convert the following octal numbers into binary and hexadecimal:
a. 777(8) e. 332(8)
b. 465(8) f. 357(8)
c. 3024(8) g. 1057(8)
d. 145(8) h. 202(8)
6. Convert the following hexadecimal numbers into binary and octal:
a. A4B3(16) e. BC23(16)
b. FFED(16) f. ECB4(16)
c. EA35(16) g. 78A3(16)
d. 89CE(16) h. 78E(16)
7. Convert the following decimal numbers into BCD:
a. 10(10) e. 200(10)
b. 18(10) f. 1110(10)
c. 99(10) g. 305(10)
d. 404(10) h. 589(10)
8. Convert the following BCD numbers into decimal:
a. 0101 1001 0111(BCD) e. 0101 1000 1000(BCD)
b. 1001 1000 1000(BCD) f. 0111 1001 1001 0100(BCD)
c. 0111 1000 1001 1001(BCD) g. 1001 0110 1000 0101(BCD)
d. 1001 0011(BCD) h. 0011 1000 . 1001 0001(BCD)
9. Convert the following gray code numbers into binary:
a. 0101(G) e. 1100(G)
b. 1001(G) f. 0010(G)
c. 0110(G) g. 1000(G)
d. 0011(G) h. 0100(G)
28  •   DIGITAL SYSTEMS DESIGN, VOLUME I

10. Convert the following binary numbers into gray code:


a. 0101(2) e. 1100(2)
b. 1001(2) f. 0010(2)
c. 0110(2) g. 1000(2)
d. 0011(2) h. 0100(2)
11. Convert the following decimal numbers into EX3:
a. 33(10) e. 666(10)
b. 53(10) f. 345(10)
c. 37(10) g. 269(10)
d. 776(10) h. 487(10)
12. Convert the following EX3 numbers into decimal:
a. 0110 0110(EX3) e. 1001 0011(EX3)
b. 1000 1000(EX3) f. 1000 0111 0011(EX3)
c. 1100 1100(EX3) g. 1011 0111 0100(EX3)
d. 1000 1100 0100(EX3) h. 1010 0110 0110(EX3)
13. Perform addition and subtraction on the following binary, octal, and
hexadecimal numbers:
a.   111000(2) d. 101111
− 000111(2)   + 111010
b.   725(8) e. 765(8)
− 257(8)   + 245(8)
c.   F21(16) f. FAB(16)
− 97A(16)   + FBE(16)
Numbering Systems and Codes  •   29

1.12.  CHAPTER 1 REVIEW—ANSWERS

1. Provide the associated binary, octal, and hexadecimal numbers for


the decimal numbers in Table 1.15.

2. Binary, octal, and hexadecimal whole numbers can be converted


into decimal by using either the sum of weight or radix multipli-
cation procedure. Binary, octal, and hexadecimal fraction parts of
number can be converted into decimal by using the radix division
procedure. Convert the following binary, octal, and hexadecimal
numbers into decimal:
a. 111(2) m. 1101001(2)
b. 1111(2) n. 1110000(2)
c. 1011.11(2) o. 1101010(2)
d. 111010(2) p. 1010.111(2)
e. 25(8) q. 154(8)
f. 37(8) r. 632(8)
g. 63(8) s. 173.4(8)
h. 127.32(8) t. 247(8)
i. AF(16) u. 3E(16)
j. 4A(16) v. FAE.DB(16)
k. 7C.BE(16) w. 2ED(16)
l. 5FB(16) x. 88EB(16)
30  •   DIGITAL SYSTEMS DESIGN, VOLUME I

a. 111(2)
Sum of Weights:

(1 × 22) + (1 × 21) + (1 × 20) =


4 + 2 + 1 = 7(10)
Radix Multiplication:

b. 1111(2)
Sum of Weights:

(1 × 23) + (1 × 22) + (1 × 21) + (1 × 20) =


8 + 4 + 2 + 1 = 15(10)
Radix Multiplication:

c. 1011.11(2)
Sum of Weights:
(1 × 23) + (0 × 22) + (1 × 21) + (1 × 20) + (1 × 2-1) + (1 × 2-2) =
8 + 0 + 2 + 1 + 0.5 + 0.25 = 11.75(10)

Radix Multiplication:
Numbering Systems and Codes  •   31

Now we add in the fractional part of the binary number with the
whole part to get our final solution.

d. 111010(2)
Sum of Weights:
25 24 23 22 21 20
1 1 1 0 1 . 0
(1 × 24) + (1 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (0 × 20) =
(1 × 32) + (1 × 16) + (1 × 8) + (0 × 4) + (1 × 2) + (0 × 1) =
32 + 16 + 8 + 0 + 2 + 0 = 58(10)

Radix Multiplication:

e. 25(8)
Sum of Weights:

8(1) 8(0)
2 5(8)
(2 × 8(1)) + (5 × 8(0)) =
(2 × 8) + (5 × 1) =
16 + 5 = 21(10)
Radix Multiplication:
32  •   DIGITAL SYSTEMS DESIGN, VOLUME I

f. 37(8)
Sum of Weights:

8(1) 8(0)
3 7(8)
(3 × 8(1)) + (7 × 8(0)) =
(3 × 8) + (7 × 1) =
24 + 7 = 31(10)
Radix Multiplication:

g. 63(8)
Sum of Weights:

8(1) 8(0)
6 3(8)
(6 × 8(1)) + (3 × 8(0)) =
(6 × 8) + (3 × 1) =
48 + 3 = 51(10)
Radix Multiplication:

h. 127.32(8)
Sum of Weights:

8(2) 8(1) 8(0)


1 2 7(8)
(1 × 8(2)) + (2 × 8(1)) + (7 × 8(0)) =
(6 × 64) + (2 × 8) + (7 × 1) =
64 + 16 + 7 = 87(10)
Numbering Systems and Codes  •   33

Radix Multiplication:

Now we add in the fractional part of the octal number with the
whole part to get our final solution.

i. AF(16)
Sum of Weights:

16(1) 16(0)
A F(16)
(A × 16(1)) + (F × 16(0)) =
(A × 16) + (F × 1) =
160 + 15 = 175(10)
Radix Multiplication:

j. 4A(16)
Sum of Weights:

16(1) 16(0)
4 A(16)
(4 × 16(1)) + (A × 16(0)) =
(4 × 16) + (A × 1) =
64 + 10 = 74(10)
34  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Radix Multiplication:

k. 7C.BE(16)
Sum of Weights:
16(1) 16(0) 16(-1) 16(-2)
7 C B E(16)
(7 × 16(1)) + (C × 16(0)) + (B × 16(−1)) + (E × 16(−2)) =
(7 × 16) + (C × 1) + (B × 0.0625) + (E × 0.0039063) =
112 + 12 + 0.6875 + 0.0546882 = 124.742(10)

Radix Multiplication:

Now we add in the fractional part of the hexadecimal number


with the whole part to get our final solution.

l. 5FB(16)
Sum of Weights:

16(2) 16(1) 16(0)


5 F B(16)
(5 × 16(2)) + (F × 16(1)) + (B × 16(0)) =
(5 × 256) + (F × 16) + (B × 1) =
1280 + 240 + 11 = 1531(10)
Numbering Systems and Codes  •   35

Radix Multiplication:

m. 1101001(2)
Sum of Weights:
26 25 24 23 .
22 21 20
1 1 0 1 0 0 1
(1 × 26) + (1 × 25) + (0 × 24) + (1 × 23) + (0 × 22) + (0 × 21) + (1 × 20) =
(1 × 64) + (1 × 32) + (0 × 16) + (1 × 8) + (0 × 4) + (0 × 2) + (1 × 1) =
64 + 32 + 0 + 8 + 0 + 0 + 1 = 105(10)

Radix Multiplication:

n. 1110000(2)
Sum of Weights:
26 25 24 23 22 21 20
1 1 1 0 0 0 0
(1 × 26) + (1 × 25) + (1 × 24) + (0 × 23) + (0 × 22) + (0 × 21) + (0 × 20) =
(1 × 64) + (1 × 32) + (1 × 16) + (0 × 8) + (0 × 4) + (0 × 2) + (0 × 1) =
64 + 32 + 16 + 0 + 0 + 0 + 0 = 112(10)

Radix Multiplication:
36  •   DIGITAL SYSTEMS DESIGN, VOLUME I

o. 1101010(2)
Sum of Weights:
26 25 24 23 22 21 20
1 0 1 0 1 0
(1 × 26) + (1 × 25) + (1 × 24) + (0 × 23) + (0 × 22) + (0 × 21) + (0 × 20) =
(1 × 64) + (1 × 32) + (0 × 16) + (1 × 8) + (0 × 4) + (1 × 2) + (0 × 1) =
64 + 32 + 0 + 1 + 0 + 1 + 0 = 106(10)

Radix Multiplication:

p. 1010.111(2)
Sum of Weights:
(1 × 23) + (0 × 22) + (1 × 21) + (0 × 20) + (1 × 2−1) + (1 × 2−2) + (1 × 2−3) =
8 + 0 + 2 + 0 + 0.5 + 0.25 + 0.125 = 10.875(10)

Radix Multiplication:

Now we add in the fractional part of the binary number with the
whole part to get our final solution.
Numbering Systems and Codes  •   37

q. 154(8)
Sum of Weights:

8(2) 8(1) 8(0)


1 5 4(8)
(1 × 8(2)) + (5 × 8(1)) + (4 × 8(0)) =
(1 × 64) + (5 × 8) + (4 × 1) =
64 + 40 + 4 = 108(10)
Radix Multiplication:

r. 632(8)
Sum of Weights:

8(2) 8(1) 8(0)


6 3 2(8)
(6 × 8(2)) + (3 × 8(1)) + (2 × 8(0)) =
(6 × 64) + (3 × 8) + (2 × 1) =
384 + 24 + 2 = 410(10)
Radix Multiplication:

s. 173.4(8)
Sum of Weights:

8(2) 8(1) 8(0) 8(-1)


1 7 3 4(8)
(1 × 8(2)) + (7 × 8(1)) + (3 × 8(0)) + (4 × 8(−1)) =
(1 × 64) + (7 × 8) + (3 × 1) + (4 × 0.125) =
64 + 56 + 3 + 0.5 = 123.5(10)
38  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Radix Multiplication:

Now we add in the fractional part of the octal number with the
whole part to get our final solution.

t. 247(8)
Sum of Weights:

8(2) 8(1) 8(0)


2 4 7(8)
(2 × 8(2)) + (4 × 8(1)) + (7 × 8(0)) =
(2 × 64) + (4 × 8) + (7 × 1) =
128 + 32 + 7 = 167(10)
Radix Multiplication:
Numbering Systems and Codes  •   39

u. 3E(16)
Sum of Weights:

16(1) 16(0)
3 E(16)
(3 × 16(1)) + (E × 16(0)) =
(3 × 16) + (E × 1) =
48 + 14 = 62(10)
Radix Multiplication:

v. FAE.DB(16)
Sum of Weights:
16(2) 16(1) 16(0) 16(−1) 16(−2)
F A E D B(16)
(F × 16(2)) + (A × 16(1)) + (E × 16(0)) + (D × 16(−1)) + (B × 16(−2)) =
(F × 256) + (A × 16) + (E × 1) + (D × 0.0625) + (B × 0.0039063) =
3840 + 160 + 14 + 0.8125 + 0.0439693 = 4014.855(10)

Radix Multiplication:
40  •   DIGITAL SYSTEMS DESIGN, VOLUME I

Now we add in the fractional part of the hexadecimal number


with the whole part to get our final solution.

w. 2ED(16)
Sum of Weights:

16(2) 16(1) 16(0)


2 E D(16)
(2 × 16(2)) + (E × 16(1)) + (D × 16(0)) =
(2 × 256) + (E × 16) + (D × 1) =
512 + 224 + 13 = 749(10)
Radix Multiplication:

x. 88EB(16)
Sum of Weights:
16(3) 16(2) 16(1) 16(0)
8 8 E B(16)
(8 × 16(3)) + (2 × 16(2)) + (E × 16(1)) + (B × 16(0)) =
(8 × 4096) + (8 × 256) + (E × 16) + (B × 1) =
32768 + 2048 + 224 + 11 = 35051(10)
Numbering Systems and Codes  •   41

Radix Multiplication:

3. Radix division is used to convert decimal whole numbers into


binary, octal, or hex. Radix multiplication is used to convert the
decimal fraction part of numbers into binary, octal, or hex. Convert
the following decimal numbers into binary, octal, and hexadecimal
numbers:
a. 12(10) e. 254(10)
b. 24(10) f. 124(10)
c. 326(10) g. 348(10)
d. 46.54(10) h. 33.625(10)

a. 12(10)
42  •   DIGITAL SYSTEMS DESIGN, VOLUME I

b. 24(10)

c. 326(10)
Numbering Systems and Codes  •   43

d. 46.8125(10)
44  •   DIGITAL SYSTEMS DESIGN, VOLUME I

e. 254(10)

f. 124(10)

g. 348(10)
Numbering Systems and Codes  •   45

h. 33.625(10)

4. Convert the following binary numbers into octal and hexadecimal:


Note: When converting a binary whole number into octal, a quick
way to convert would be to group into groups of three digits from
the LSB bit toward the MSB bit. This same procedure applies when
converting binary whole numbers into hexadecimal numbers, how-
ever, grouping into four digits from the LSB bit toward the MSB bit.
a. 11111010(2) e. 111111110(2)
b. 101111011(2) f. 110011001111(2)
c. 1111110011(2) g. 1110110110(2)
d. 11000111101(2) h. 110100100100(2)
46  •   DIGITAL SYSTEMS DESIGN, VOLUME I

a. 11111010(2)
Binary to Octal:
11111010(2) = 011 111 010(2)
3 7 2(8) = 372(8)
Binary to Hexadecimal:
11111010(2) = 1111 1010(2)
F A(16) = FA(16)
b. 101111011(2)
Binary to Octal:
101111011(2) = 101 111 011(2)
5 7 3(8) = 573(8)
Binary to Hexadecimal:
101111011(2) = 0001 0111 1011(2)
1 7 B(16 ) = 17B(16 )
c. 1111110011(2)
Binary to Octal:

1111110011(2) = 001 111 110 011(2)


1 7 6 3(8) = 1763(8)
Binary to Hexadecimal:

1111110011(2) = 0011 1111 0011(2)


3 F 3(16) = 3F3(16)
d. 11000111101(2)
Binary to Octal:

11000111101(2) = 011 000 111 101(2)


3 0 7 5(8) = 3075(8)
Binary to Hexadecimal:

11000111101(2) = 0110 0011 1101(2)


6 3 D(16) = 63D(16)
e. 111111110(2)
Binary to Octal:

111111110(2) = 111 111 110(2)


7 7 6(8) = 776(8)
Numbering Systems and Codes  •   47

Binary to Hexadecimal:

111111110(2) = 0001 1111 1110(2)


1 F E(16) = 1FE(16)
f. 110011001111(2)
Binary to Octal:

110011001111(2) = 110 011 001 111(2)


6 3 1 7(8) = 6317(8)
Binary to Hexadecimal:

110011001111(2) = 1100 1100 1111(2)


C C F(16) = CCF(16)
g. 1110110110(2)
Binary to Octal:

1110110110(2) = 001 110 110 110(2)


1 6 6 6(8) = 1666(8)
Binary to Hexadecimal:

1110110110(2) = 0011 1011 0110(2)


3 B 6(16) = 3B6(16)
h. 110100100100(2)
Binary to Octal:

110100100100(2) = 110 100 100 100(2)


6 4 4 4(8) = 6444(8)
Binary to Hexadecimal:

110100100100(2) = 1101 0010 0100(2)


D 2 4(16) = D24(16)

5. Convert the following octal numbers into binary and hexadecimal:


Note: Octal whole numbers can be converted into binary by repre-
senting the octal number in binary number format. When in binary
format, group into four-bit segments for the hexadecimal number
conversion.
a. 777(8) e. 332(8)
b. 465(8) f. 357(8)
c. 3024(8) g. 1057(8)
d. 145(8) h. 202(8)
48  •   DIGITAL SYSTEMS DESIGN, VOLUME I

a. 777(8)

7 7 7(8)
111 111 111(2) = 111111111(2)

111111111(2) = 0001 1111 1111(2)


1 F F(16) = 1FF(16)
b. 465(8)

4 6 5(8)
100 110 101(2) = 100110101(2)

100110101(2) = 0001 0011 0101(2)


1 3 5(16) = 135(16)
c. 3024(8)

011 000 010 100(2) = 11000010100(2)

11000010100(2) = 0110 0001 0100(2)


6 1 4(16) = 614(16)
d. 145(8)

001 100 101(2) = 1100101(2)

1100101(2) = 0110 0101(2)


6 5(16) = 65(16)
e. 332(8)

011 011 010(2) = 11011010(2)

11011010(2) = 1101 1010(2)


D A(16) = DA(16)
f. 357(8)
011 101 111(2) = 11101111(2)

11101111(2) = 1110 1111(2)


E F(16) = EF(16)
g. 1057(8)

001 000 101 111(2) = 1000101111(2)

1000101111(2) = 0010 0010 1111(2)


2 2 F(16) = 22F(16)
Numbering Systems and Codes  •   49

h. 202(8)

010 000 010(2) = 10000010(2)

10000010(2) = 1000 0010(2)


8 2(16) = 82(16)

6. Convert the following hexadecimal numbers into binary and octal:


Note: Reverse the procedures used in the previous question to find
the answers.
a. A4B3(16) e. BC23(16)
b. FFED(16) f. ECB4(16)
c. EA35(16) g. 78A3(16)
d. 89CE(16) h. 78E(16)
a. A4B3(16)

1010 0100 1011 0011(2) = 1010010010110011(2)

1010010010110011(2) = 1 010 010 010 110 011(2)


= 1 2 2 2 6 3(8)
= 122263 (8)

b. FFED(16)

1111 1111 1110 1101(2) = 1111111111101101(2)

1111111111101101(2) = 1 111 111 111 101 101(2)


= 1 7 7 7 5 5(8)
= 177755(8)
c. EA35(16)
1110 1010 0011 0101(2) = 1110101000110101(2)

1110101000110101(2) = 1 110 101 000 110 101(2)


= 1 6 5 0 6 5(8)
= 165065(8)
d. 89CE(16)
1000 1001 1100 1110(2) = 000100111001110(2)

1000100111001110(2) = 1 000 100 111 001 110(2)


= 1 0 4 7 1 6(8)
= 104716(8)
50  •   DIGITAL SYSTEMS DESIGN, VOLUME I

e. BC23(16)
1011 1100 0010 0011(2) = 1011110000100011(2)

1011110000100011(2) = 1 011 110 000 100 011(2)


= 1 3 6 0 4 3(8)
= 136043(8)
f. ECB4(16)
1110 1100 1011 0100(2) = 1110110010110100(2)

1110110010110100(2) = 1 110 110 010 110 100(2)


= 1 6 6 2 6 4(8)
= 166264(8)
g. 78A3(16)
0111 1000 1010 0011(2) = 0111100010100011(2)

0111100010100011(2) = 0 111 100 010 100 011(2)


= 0 7 4 2 4 3(8)
= 74243(8)
h. 78E(16)
0111 1000 1110(2) = 011110001110(2)

011110001110(2) = 011 110 001 110(2)


= 3 6 1 6(8)
= 3616(8)
7. Convert the following decimal numbers into BCD:
Note: BCD does not equate to being a binary number, however,
representing decimal into a binary format.
a. 10(10) e. 200(10)
b. 18(10) f. 1110(10)
c. 99(10) g. 305(10)
d. 404(10) h. 589(10)
a. 10(10) = 0001 0000(BCD)
b. 18(10) = 0001 1000(BCD)
c. 99(10) = 1001 1001(BCD)
d. 404(10) = 0100 0000 0100(BCD)
e. 200(10) = 0010 0000 0000(BCD)
f. 1110(10) = 0001 0001 0001 0000(BCD)
g. 305(10) = 0011 0000 0101(BCD)
h. 589(10) = 0101 1000 1001(BCD)
Numbering Systems and Codes  •   51

8. Convert the following BCD numbers into decimal:


a. 0101 1001 0111(BCD) e.  0101 1000 1000(BCD)
b. 1001 1000 1000(BCD) f.  0111 1001 1001 1100(BCD)
c. 0111 1000 1001 1001(BCD) g.  1001 0110 1000 0101(BCD)
d. 1001 0011(BCD) h.  0011 1000 . 1001 0001(BCD)
a. 0101 1001 0111(BCD) = 597(10)
b. 1001 1000 1000(BCD) = 988(10)
c. 0111 1000 1001 1001(BCD) = 7899(10)
d. 1001 0011(BCD) = 93(10)
e. 0101 1000 1000(BCD) = 588(10)
f. 0111 1001 1001 0100(BCD) = 7994(10)
g. 1001 0110 1000 0101(BCD) = 9685(10)
h. 0011 1000 . 1001 0001(BCD) = 3891(10)
9. Convert the following gray code numbers into binary:
Note: The following procedure identifies how to convert binary
into gray code:
Step 1: Bring down the MSB.
Step 2: Add the MSB to the adjacent bit.
Step 3: Place the sum below the adjacent bit. Note: If a carry is
generated, discard it.
Step 4: Add the second pair of bits.
Step 5: Place the sum below the last bit added.
Step 6: Add the third pair of bits.
Step 7: Place the sum below the last bit added.
a. 0101(G) e. 1100(G)
b. 1001(G) f. 0010(G)
c. 0110(G) g. 1000(G)
d. 0011(G) h. 0100(G)

a. 0101(G)

0101(G) = 0110(2)
52  •   DIGITAL SYSTEMS DESIGN, VOLUME I

b. 1001(G)

1001(G) = 1110(2)
c. 0110(G)

0110(G) = 0100(2)
d. 0011(G)

0011(G) = 0010(2)
e. 1100(G)

1100(G) = 1000(2)
f. 0010(G)

0010(G) = 0011(2)
Numbering Systems and Codes  •   53

g. 1000(G)

1000(G) = 1111(2)
h. 0100(G)

0100(G) = 0111(2)
10. Convert the following binary numbers into gray code:
Note: The following procedure identifies how to convert binary
into gray code:
Step 1: Bring down the MSB.
Step 2: Add the MSB to the adjacent bit.
Step 3: Place the sum below the adjacent bit. Note: If a carry is
generated, discard it.
Step 4: Add the second pair of bits.
Step 5: Place the sum below the last bit added.
Step 6: Add the third pair of bits.
Step 7: Place the sum below the last bit added.
a. 0101(2) e. 1100(2)
b. 1001(2) f. 0010(2)
c. 0110(2) g. 1000(2)
d. 0011(2) h. 0100(2)

a. 0101(2)

0101(2) = 0111(G)
54  •   DIGITAL SYSTEMS DESIGN, VOLUME I

b. 1001(2)

1001(2) = 1101(G)
c. 0110(2)

0110(2) = 0101(G)
d. 0011(2)

0011(2) = 0010(G)
e. 1100(2)

1100(2) = 1010(G)
f. 0010(2)

0010(2) = 0011(G)
Numbering Systems and Codes  •   55

g. 1000(2)

1000(2) = 1100(G)
h. 0100(2)

0100(2) = 0110(G)
11. Convert the following decimal numbers into EX3:
a. 33(10) e. 666(10)
b. 53(10) f. 345(10)
c. 37(10) g. 269(10)
d. 776(10) h. 487(10)
a. 33(10)
 3  3
+3 +3
 6  6
0110 0110(EX3)
33(10)   = 0110 0110(EX3)
b. 53(10)
 5  3
+3 +3
 8  6
1000 0110(EX3)
53(10)   = 1000 0110(EX3)
56  •   DIGITAL SYSTEMS DESIGN, VOLUME I

c. 37(10)
 3  7
+3 +3
 6  A
0110 1010(EX3)
37(10)  = 0110 1010(EX3)
d. 776(10)
 7  7  6
+3 +3 +3
 A  A  9
1010 1010 1001(EX3)
776(10)  = 1010 1010 1001(EX3)
e. 666(10)
 6  6  6
+3 +3 +3
 9  9  9
1001 1001 1001(EX3)
666(10)  = 1001 1001 1001(EX3)
f. 345(10)
 3  4  5
+3 +3 +3
 6  7  8
0110 0111 1000(EX3)
345(10)  = 0110 0111 1000(EX3)
g. 269(10)
 2  6  9
+3 +3 +3
 5  9  C
0101 1001 1100(EX3)
269(10)  = 0101 1001 1100(EX3)
Numbering Systems and Codes  •   57

h. C
 4  8  7
+3 +3 +3
 7  B  A
0111 1011 1010(EX3)
487(10)  = 0111 1011 1010(EX3)
12. Convert the following EX3 numbers into decimal:
a. 0110 0110(EX3) e. 1001 0011(EX3)
b. 1000 1000(EX3) f. 1000 0111 0011(EX3)
c. 1100 1100(EX3) g. 1011 0111 0100(EX3)
d. 1000 1100 0100(EX3) h. 1010 0110 0110(EX3)
a. 0110 0110(EX3)
0110 0110(EX3)
 6  6
−3 −3
 3  3(10)
0110 0110(EX3) = 33(10)
b. 1000 1000(EX3)
1000 1000(EX3)
 8  8
−3 −3
 5  5(10)
1000 1000(EX3) = 55(10)
c. 1100 1100(EX3)
1100 1100(EX3)
 C  C
−3 −3
 9  9(10)
1100 1100(EX3) = 99(10)
58  •   DIGITAL SYSTEMS DESIGN, VOLUME I

d. 1000 1100 0100(EX3)


1000 1100 0100(EX3)
 8  C  4
−3 −3 −3
 5  9  1(10)
1000 1100 0100(EX3) = 591(10)
e. 1001 0011(EX3)
1001 0011(EX3)
 9  3
−3 −3
 6  0(10)
1001 0011(EX3) = 60(10)
f. 1000 0111 0011(EX3)
1000 0111 0011(EX3)
 8  7  3
−3 −3 −3
 5  4  0(10)
1000 0111 0011(EX3) = 540(10)
1011 0111 0100(EX3)
g. 1011 0111 0100(EX3)
 B  7  4
−3 −3 −3
 8  4 1(10)
1011 0111 0100(EX3) = 841(10)
h. 1010 0110 0110(EX3)
1010 0110 0110(EX3)
 A  6  6
−3 −3 −3
 7  3  3(10)
1010 0110 0110(EX3) = 733(10)
Numbering Systems and Codes  •   59

13. Perform addition and subtraction on the following binary, octal, and
hexadecimal numbers:
a.   111000(2) d. 101111(2)
−000111(2)     + 111010(2)
b.   725(8) e. 765(8)
−257(8)   +245(8)
c.  F21(16) f. FAB(16)
−97A(16)   + FBE(16)
a.   111000(2)
−000111(2)

b.   725(8)
−257(8)

c.   F21(16)
−97A(16)

d.  101111
+111010
60  •   DIGITAL SYSTEMS DESIGN, VOLUME I

e.  765(8)
+ 245(8)

f.  FAB(16)
+FBE(16)
Index

A Binary
Addition, of binary, octal, and addition, 24
hexadecimal numbers, 24–25 to decimal conversion, 4–6
American National Standards to gray code conversion, 18–19
Institute (ANSI) Symbol to hexadecimal conversion, 15
AND gate operator, 65 to octal conversion, 11
NAND gate circuits, 75 subtraction, 25
NOT gate operator, 68 Binary coded decimal (BCD), 16
OR gate operator, 63 to decimal conversion, 17
American standard code for decimal to BCD conversion, 17
information interchange Binary numbering system, 2–4
(ASCII), 21–24 binary to decimal conversion,
Analysis and Laws, 89 4–6
AND decimal to binary conversion, 6–7
gate operator, 65–68 Boolean Algebra
logic gate, 91–93 basic logic operations
ASCII. See American standard AND logic, 91–93
code for information NAND logic, 98–99
interchange NOR logic, 96–98
Associative property NOT logic, 95–96
of addition, 100–101 OR logic, 93–95
of multiplication, 101 circuit and developing truth ta-
ble, 108–113
B DeMorgan’s theorems, 106–108
B747-400 Flight Management interpreting truth tables, 113
Computers, 65, 68 product of sums configuration,
Base-8 numbering system. See 119–120
Octal numbering system sum of products and product of
Basic logic gate operators, 63 sums equality, 120–123
AND gate operator, 65–68 sum of products configuration,
NOT gate operator, 68–70 117–119
OR gate operator, 63–65 three-input truth table, 115–117
BCD. See Binary coded decimal two-input truth table, 114–115
154  •   Index

introduction, 89 binary to gray code conversion,


minterms and maxterms, 123–126 18–19
properties of, 103–106
real numbers, properties of, H
100–103 Hexadecimal
symbols, 90–91 addition, 25
truth tables used in, 61–62 to binary conversion, 14–15
subtraction, 25
C Hexadecimal numbering system,
Commutative properties of 11–12
addition and multiplication, binary to hexadecimal conver-
101–102 sion, 15
Complement property, 105–106 decimal to hexadecimal conver-
Complementary Medal-Oxide sion, 13–14
Semiconductor (CMOS), 1 hexadecimal to binary conver-
NAND gates within, 76 sion, 14–15
Constants, 61 octal to hexadecimal conversion,
15–16
D radix multiplication, 13
Decimal numbering system, 2 sum of weights, 12
Decimal
to BCD conversion, 17 I
to binary conversion, 6–7 Inhibit property, 105
to hexadecimal conversion, 13–14 International Electrotechnical
to octal conversion, 9–10 Commission (IEC) Symbol
DeMorgan’s theorems, 106–108 AND gate operator, 66
Deutsches Institut für Normung NAND gate circuits, 76
(DIN) Symbol NOT gate operator, 68
AND gate operator, 66 OR gate operator, 64
NAND gate circuits, 76 Interpreting truth tables, 113
OR gate operator, 64 product of sums configuration,
Distributive property of 119–120
multiplication over addition, sum of products and product of
102–103 sums equality, 120–123
Double negation property, 106 sum of products configuration,
117–119
E three-input truth table, 115–117
Enable property, 105 two-input truth table, 114–115
Error-minimizing code. See Gray
code L
Excess-3 code (EX3), 19–20 Logic gates design
basic logic gate operators, 63
G AND gate operator, 65–68
Gray code, 17 NOT gate operator, 68–70
to binary conversion, 18 OR gate operator, 63–65
Index  •   155

constants and variables, 61 gray code to binary conver-


introduction, 61 sion, 18
NAND gate circuits, 75–77 hexadecimal numbering system,
NOR gate circuits, 72–74 11–12
OR, AND, and NOT combination binary to hexadecimal conver-
circuits, 70–72 sion, 15
truth tables used in Boolean decimal to hexadecimal conver-
­Algebra, 61–62 sion, 13–14
hexadecimal to binary conver-
M sion, 14–15
Maxterms, 123–126 octal to hexadecimal conver-
Military (MIL) Symbol sion, 15–16
AND gate operator, 66 radix multiplication, 13
NAND gate circuits, 76 sum of weights, 12–13
NOT gate operator, 68 introduction, 1
OR gate operator, 64 octal numbering system, 7–8
Minterms, 123–126 binary to octal conversion, 11
decimal to octal conversion,
N 9–10
NAND octal to binary conversion,
gate circuits, 75–77 10–11
logic gate, 98–99 octal to decimal conversion,
NOR 8–9
gate circuits, 72–74 special codes, 19
logic gate, 96–98 American standard code for in-
NOT formation interchange, 21–24
gate operator, 68–70 excess-3 code, 19–20
logic gate, 95–96 subtraction of binary, octal, and
Numbering systems and codes hexadecimal numbers
addition of binary, octal, and binary subtraction, 25
hexadecimal numbers, 24 hexadecimal subtraction, 25
binary addition, 24 octal subtraction, 25
hexadecimal addition, 25
octal addition, 25 O
binary coded decimal, 16 Octal
BCD to decimal conversion, 17 addition, 25
decimal to BCD conversion, 17 to binary conversion, 10–11
binary numbering system, 2–4 to decimal conversion, 8–9
binary to decimal conversion, to hexadecimal conversion,
4–6 15–16
decimal to binary conversion, 6–7 subtraction, 25
decimal numbering system, 2 Octal numbering system, 7–8
gray code, 17 binary to octal conversion, 11
binary to gray code conversion, decimal to octal conversion, 9–10
18–19 octal to binary conversion, 10–11
156  •   Index

octal to decimal conversion, 8–9 distributive property of multipli-


OR, AND, and NOT combination cation over addition, 102–103
circuits, 70–72 Redundant property, 105
OR Reflected code. See Gray code
gate operator, 63–65
logic gate, 93–95 S
Special codes, 19
P American standard code for in-
POS. See Product of sums formation interchange, 21–24
Positional-weighted numbering excess-3 code, 19–20
system. See Decimal Subtraction, of binary, octal, and
numbering system hexadecimal numbers, 25
Product of sums (POS) Sum of products, 120–123
configuration, 119–120 configuration, 117–119
equality, 120–123 Sum of weights, 12

R T
Radix division, 6–7 Three-input truth table, 115–117
Radix multiplication method, 4–5, Truth table
8, 13 used in Boolean Algebra, 61–62
Real numbers, properties of circuit and developing, 108–113
associative property interpreting. See Interpreting
of addition, 100–101 truth tables
of multiplication, 101 Two-input truth table, 114–115
commutative properties of addi-
tion and multiplication, V
101–102 Variables, 61
OTHER TITLE FROM OUR ENGINEERING
TECHNOLOGY COLLECTION
Kenneth Reid, Editor
• A Simple Guide to Understanding Compressors by James M. Watterson

FORTHCOMING TITLES
• Rotating Equipment: Maintenance and Troubleshooting by James M. Watterson
• Tribology: A Simple Guide To The Study of Friction by James M. Watterson
• Digital Systems Design, Volume II: Developmental Methods and Combinational
Logic Circuits by Larry Massengale
• Digital Systems Design, Volume III: Latch–Flip-Flop Circuits and Characteristics
of Digital Circuits by Larry Massengale

Momentum Press is one of the leading book publishers in the field of engineering,
mathematics, health, and applied sciences. Momentum Press offers over 30 collections,
including Aerospace, Biomedical, Civil, Environmental, Nanomaterials, Geotechnical,
and many others.

Momentum Press is actively seeking collection editors as well as authors. For more
information about becoming an MP author or collection editor, please visit
http://www.momentumpress.net/contact

Announcing Digital Content Crafted by Librarians


Concise e-books business students need for classroom and research

Momentum Press offers digital content as authoritative treatments of advanced engineering


topics by leaders in their field. Hosted on ebrary, MP provides practitioners, researchers,
faculty, and students in engineering, science, and industry with innovative electronic content
in sensors and controls engineering, advanced energy engineering, manufacturing, and
materials science.

Momentum Press offers library-friendly terms:


• perpetual access for a one-time fee
• no subscriptions or access fees required
• unlimited concurrent usage permitted
• downloadable PDFs provided
• free MARC records included
• free trials

The Momentum Press digital library is very affordable, with no obligation to buy in future years.

For more information, please visit www.momentumpress.net/library or to set up a trial in the


US, please contact mpsales@globalepress.com.

Das könnte Ihnen auch gefallen