Floyd Chapters1-3 Model Answers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Chapter 1

CHAPTER 1
INTRODUCTORY CONCEPTS
Section 1-1 Digital and Analog Quantities
1.

Digital data can be transmitted and stored more efficiently and reliably than analog data. Also,
digital circuits are simpler to implement and there is a greater immunity to noisy environments.

2.

Pressure is an analog quantity.

3.

A clock, a thermometer, and a speedometer can have either an analog or a digital output.

Section 1-2 Binary Digits, Logic Levels, and Digital Waveforms


4.

In positive logic, a 1 is represented by a HIGH level and a 0 by a LOW level. In negative logic,
a 1 is represented by a LOW level, and a 0 by a HIGH level.

5.

HIGH = 1; LOW = 0. See Figure 1-1.

6.

A 1 is a HIGH and a 0 is a LOW:


(a)
HIGH, LOW, HIGH, HIGH, HIGH, LOW, HIGH
(b) HIGH, HIGH, HIGH, LOW, HIGH, LOW, LOW, HIGH

Chapter 1
7.

See Figure 1-2.

8.

T = 4 ms. See Figure 1-3.

9.

f=

10.

The waveform in Figure 1-61 is periodic because it repeats at a fixed interval.

11.

tW = 2 ms; T = 4 ms
&t #
% duty cycle = $ W !100
%T "

12.

1
T

1
= 0.25 kHz = 250 Hz
4 ms

& 2 ms #
$
! 100 = 50%
% 4 ms "

See Figure 1-4.

Chapter 1
13.

Each bit time = 1 's


Serial transfer time = (8 bits)(1 's/bit) = 8 's
Parallel transfer time = 1 bit time = 1 's

14.

T=

1
f

1
= 0.286 ns
3.5 GHz

Section 1-3 Basic Logic Operations


15.

LON = SW1 + SW2 + SW1 ( SW2

16.

An AND gate produces a HIGH output only when all of its inputs are HIGH.

17.

AND gate. See Figure 1-5.

18.

An OR gate produces a HIGH output when either or both inputs are HIGH. An exclusive-OR
gate produces a HIGH if one input is HIGH and the other LOW.

Section 1-4 Introduction to the System Concept


19.

See Figure 1-6.

Chapter 1
1
= 100 's
10 kHz
100 ms
Pulses counted =
= 1000
100 's

20.

T=

21.

See Figure 1-7.

Section 1-5 Fixed-Function Integrated Circuits


22.

Circuits with complexities of from 100 to 10,000 equivalent gates are classified as large scale
integration (LSI).

23.

The pins of an SMT are soldered to the pads on the surface of a pc board, whereas the pins of a
DIP feed through and are soldered to the opposite side. Pin spacing on SMTs is less than on DIPs
and therefore SMT packages are physically smaller and require less surface area on a pc board.

24.

See Figure 1-8.

Chapter 1
Section 1-6 Test and Measurement Instruments
25.

Amplitude = top of pulse minus base line


V=8V)1V=7V

26.

A flashing probe lamp indicates a continuous sequence of pulses (pulse train).

Section 1-7 Introduction to Programmable Logic


27.

The following do not describe PLDs: VHDL, AHDL

28.

SPLD: Simple Programmable Logic Device


CPLD: Complex Programmable Logic Device
HDL: Hardware Description Language
FPGA: Field-Programmable Gate Array
GAL: Generic Array Logic

29.

30.

(a)

Design entry: The step in a programmable logic design flow where a description of the
circuit is entered in either schematic (graphic) form or in text form using an HDL.

(b)

Simulation: The step in a design flow where the entered design is simulated based on
defined input waveforms.

(c)

Compilation: A program process that controls the design flow process and translates a
design source code to object code for testing and downloading.

(d)

Download: The process in which the design is transferred from software to hardware.

Place and route or fitting is the process where the logic structures described by the netlist are
mapped into the actual structure of the specific target device. This results in an output called a
bitstream.

CHAPTER 2
NUMBER SYSTEMS, OPERATIONS, AND CODES
Section 2-1 Decimal Numbers
1.

(a) 1386 = 1 103 + 3 102 + 8 101 + 6 100


= 1 1000 + 3 100 + 8 10 + 6 1
The digit 6 has a weight of 100 = 1
(b) 54,692 = 5 104 + 4 103 + 6 102 + 9 101 + 2 100
= 5 10,000 + 4 1000 + 6 100 + 9 10 + 2 1
The digit 6 has a weight of 102 = 100
(c) 671,920 = 6 105 + 7 104 + 1 103 + 9 102 + 2
= 6 100,000 + 7 10,000 + 1 1000 + 9
The digit 6 has a weight of 105 = 100,000

2.

(a)
(c)

10 = 101
10,000 = 104

3.

(a)

471 = 4 102 + 7 101 + 1 100


= 4 100 + 7 10 + 1 1
= 400 + 70 + 1

(b)

9,356 = 9 103 + 3 102 + 5 101 + 6 100


= 9 1000 + 3 100 + 5 10 + 6 1
= 9,000 + 300 + 50 + 6

(c)

125,000 = 1 105 + 2 104 + 5 103


= 1 100,000 + 2 10,000 + 5
= 100,000 + 20,000 + 5,000

4.

101 + 0 100
100 + 2 10 + 0

100 = 102
1,000,000 = 106

(b)
(d)

1000

The highest four-digit decimal number is 9999.

Section 2-2 Binary Numbers


5.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)

11 = 1 21 + 1 20 = 2 + 1 = 3
100 = 1 22 + 0 21 + 0 20 = 4
111 = 1 22 + 1 21 + 1 20 = 4 + 2 + 1 = 7
1000 = 1 23 + 0 22 + 0 21 + 0 20 = 8
1001 = 1 23 + 0 22 + 0 21 + 1 20 = 8 + 1 = 9
1100 = 1 23 + 1 22 + 0 21 + 0 20 = 8 + 4 = 12
1011 = 1 23 + 0 22 + 1 21 + 1 20 = 8 + 2 + 1 = 11
1111 = 1 23 + 1 22 + 1 21 + 1 20 = 8 + 4 + 2 + 1 = 15

Chapter 2
6.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)

1110 = 1 23 + 1 22 + 1 21 = 8 + 4 + 2 = 14
1010 = 1 23 + 1 21 = 8 + 2 = 10
11100 = 1 24 + 1 23 + 1 22 = 16 + 8 + 4 = 28
10000 = 1 24 = 16
10101 = 1 24 + 1 22 + 1 20 = 16 + 4 + 1 = 21
11101 = 1 24 + 1 23 + 1 22 + 1 20 = 16 + 8 + 4 + 1 = 29
10111 = 1 24 + 1 22 + 1 21 + 1 20 = 16 + 4 + 2 + 1 = 23
11111 = 1 24 + 1 23 + 1 22 + 1 21 + 1 20 = 16 + 8 + 4 + 2 + 1 = 31

7.

(a)

110011.11 = 1 25 + 1 24 + 1 21 + 1 20 + 1 2!1 + 1 2!2


= 32 + 16 + 2 + 1 + 0.5 + 0.25 = 51.75
101010.01 = 1 25 + 1 23 + 1 21 + 1 2!2 = 32 + 8 + 2 + 0.25
= 42.25
1000001.111 = 1 26 + 1 20 + 1 2!1 + 1 2!2 + 1 2!3
= 64 + 1 + 0.5 + 0.25 + 0.125 = 65.875
1111000.101 = 1 26 + 1 25 + 1 24 + 1 23 + 1 2!1 + 1 2!3
= 64 + 32 + 16 + 8 + 0.5 + 0.125 = 120.625
1011100.10101 = 1 26 + 1 24 + 1 23 + 1 22 + 1 2!1 + 1 2!3 + 1 2!5
= 64 + 16 + 8 + 4 + 0.5 + 0.125 + 0.03125
= 92.65625
1110001.0001 = 1 26 + 1 25 + 1 24 + 1 20 + 1 2!4
= 64 + 32 + 16 + 1 + 0.0625 = 113.0625
1011010.1010 = 1 26 + 1 24 + 1 23 + 1 21 + 1 2!1 + 1 2!3
= 64 + 16 + 8 + 2 + 0.5 + 0.125 = 90.625
1111111.11111 = 1 26 + 1 25 + 1 24 + 1 23 + 1 22 + 1 21
+ 1 20 + 1 2!1 + 1 2!2 + 1 2!3 + 1 2!4 + 1 2!5
= 64 + 32 + 16 + 8 + 4 + 2 + 1 + 0.5 + 0.25 + 0.125 + 0.0625 + 0.03125
= 127.96875

(b)
(c)
(d)
(e)

(f)
(g)
(h)

8.

(a)
(c)
(e)
(g)
(i)

22 ! 1 = 3
24 ! 1 = 15
26 ! 1 = 63
28 ! 1 = 255
210 ! 1 = 1023

9.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)

(24 ! 1) < 17 < (25 ! 1); 5 bits


(25 ! 1) < 35 < (26 ! 1); 6 bits
(25 ! 1) < 49 < (26 ! 1); 6 bits
(26 ! 1) < 68 < (27 ! 1); 7 bits
(26 ! 1) < 81 < (27 ! 1); 7 bits
(26 ! 1) < 114 < (27 ! 1); 7 bits
(27 ! 1) < 132 < (28 ! 1); 8 bits
(27 ! 1) < 205 < (28 ! 1); 8 bits

(b)
(d)
(f)
(h)
(j)

23 ! 1 = 7
25 ! 1 = 31
27 ! 1 = 127
29 ! 1 = 511
211 ! 1 = 2047

Chapter 2
10.

(a)
(b)
(c)

(d)

(e)

0 through 7:
000, 001, 010, 011, 100, 101, 110, 111
8 through 15:
1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111
16 through 31:
10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010,
11011, 11100, 11101, 11110, 11111
32 through 63:
100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111, 10100, 101001,
101010, 101011, 101100, 101101, 101110, 101111, 110000, 110001, 110010, 110011,
110100, 110101, 110110, 110111, 111000, 111001, 111010, 111011, 111100, 111101,
111110, 111111
64 through 75:
1000000, 1000001, 1000010, 1000011, 1000100, 1000101, 1000110, 1000111,
1001000, 1001001, 1001010, 1001011

Section 2-3 Decimal-to-Binary Conversion


11.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)

10 = 8 + 2 = 23 + 21 = 1010
17 = 16 + 1 = 24 + 20 = 10001
24 = 16 + 8 = 24 + 23 = 11000
48 = 32 + 16 = 25 + 24 = 110000
61 = 32 + 16 + 8 + 4 + 1 = 25 + 24 + 23 + 22 + 20 = 111101
93 = 64 + 16 + 8 + 4 + 1 = 26 + 24 + 23 + 22 + 20 = 1011101
125 = 64 + 32 + 16 + 8 + 4 + 1 = 26 + 25 + 24 + 23 + 22 + 20 = 1111101
186 = 128 + 32 + 16 + 8 + 2 = 27 + 25 + 24 + 23 + 21 = 10111010

12.

(a)
(b)
(c)

0.32 " 0.00 + 0.25 + 0.0625 + 0.0 + 0.0 + 0.0078125 = 0.0101001


0.246 " 0.0 + 0.0 + 0.125 + 0.0625 + 0.03125 + 0.015625 = 0.001111
0.0981 " 0.0 + 0.0 + 0.0 + 0.0625 + 0.03125 + 0.0 + 0.0 + 0.00390625 = 0.0001101

Chapter 2
13.

(a)

(d)

(g)

15
= 7, R = 1( LSB)
2
7
= 3, R = 1
2
3
= 1, R = 1
2
1
= 0, R = 1 (MSB)
2

(b)

21
= 10,
2
10
= 5,
2
5
= 2,
2
2
= 1,
2
1
= 0,
2

34
= 17, R = 0 (LSB) (e)
2
17
= 8, R = 1
2
8
= 4, R = 0
2
4
= 2, R = 0
2
2
= 1, R = 0
2
1
= 0, R = 1 (MSB)
2

40
= 20,
2
20
= 10,
2
10
= 5,
2
5
= 2,
2
2
= 1,
2
1
= 0,
2

65
= 32, R = 1 (LSB) (h)
2
32
= 16, R = 0
2
16
= 8, R = 0
2
8
= 4, R = 0
2
4
= 2, R = 0
2
2
= 1, R = 0
2
1
= 0, R = 1(MSB)
2

73
= 36,
2
36
= 18,
2
18
= 9,
2
9
= 4,
2
4
= 2,
2
2
= 1,
2
1
= 0,
2

10

R = 1 (LSB)

(c)

R=0
R=1
R=0
R = 1 (MSB)

R = 0 (LSB)
R=0
R=0
R=1
R=0
R = 1 (MSB)

R = 1 (LSB)
R=0
R=0
R=1
R=0
R=0
R = 1 (MSB)

(f)

28
= 14,
2
14
= 7,
2
7
= 3,
2
3
= 1,
2
1
= 0,
2

59
= 29,
2
29
= 14,
2
14
= 7,
2
7
= 3,
2
3
= 1,
2
1
= 0,
2

R = 0 (LSB)
R=0
R=1
R=1
R = 1 (MSB)

R = 1 (LSB)
R=1
R=0
R=1
R=1
R = 1 (MSB)

Chapter 2
14.

(a)

0.98 2 = 1.96
1 (MSB)
0.96 2 = 1.92
1
0.92 2 = 1.84
1
0.84 2 = 1.68
1
0.68 2 = 1.36
1
0.36 2 = 0.72
0
continue if more accuracy is desired
0.111110

(c)

0.9028 2 = 1.8056
1 (MSB)
0.8056 2 = 1.6112
1
0.6112 2 = 1.2224
1
0.2224 2 = 0.4448
0
0.4448 2 = 0.8896
0
0.8896 2 = 1.7792
1
0.7792 2 = 1.5584
1
continue if more accuracy is desired
0.1110011

(b)

0.347 2 = 0.694 0 (MSB)


0.694 2 = 1.388 1
0.388 2 = 0.776 0
0.776 2 = 1.552 1
0.552 2 = 1.104 1
0.104 2 = 0.208 0
0.208 2 = 0.416 0
continue if more accuracy is desired
0.0101100

Section 2-4 Binary Arithmetic


15.

(a)

11
# 01

(b)

100
(d)

111
# 110

(a)

11
! 01

(e)

(b)

1110
! 0011
1011

1001
# 0101

(f)

101
! 100

1100
! 1001
0011

11

1101
# 1011
11000

(c)

001
(e)

101
# 011
1000

1110

10
(d)

(c)

100

1101

16.

10
# 10

110
! 101
001

(f)

11010
! 10111
00011

Chapter 2
17.

(a)

11
11

(e)

18.

(b)

11
11

000
100

1001

1000

1101
1101

(f)

1110
0000
1110
1110

10101001

10110110

100
= 010
10

111
101

(d)

(b)

1001
= 0011
0011

0000
1001
1001

100011

110110

(c)

1100
= 0011
0100

Section 2-5 1s and 2s Complements of Binary Numbers


19.

Zero is represented in 1s complement as all 0s (for +0) or all 1s (for !0).

20.

Zero is represented by all 0s only in 2s complement.

21.

(a)
(b)
(c)
(d)
(e)
(f)

22.

Take the 1s complement and add 1:


(a)
(c)
(e)
(g)

The 1s complement of 101 is 010.


The 1s complement of 110 is 001.
The 1s complement of 1010 is 0101.
The 1s complement of 11010111 is 00101000.
The 1s complement of 1110101 is 0001010.
The 1s complement of 00001 is 11110.

01 + 1 = 10
0110 + 1 = 0111
00011 + 1 = 00100
01001111 + 1 = 01010000

(b)
(d)
(f)
(h)

000 + 1 = 001
0010 + 1 = 0011
01100 + 1 = 01101
11000010 + 1 = 11000011

12

1001
110

111
000
111

1110
1101

1101
0000
1101
1101

(a)

(c)

100
10

Chapter 2
Section 2-6 Signed Numbers
(a)

Magnitude of 29 = 0011101
+ 29 = 00011101

(b)

Magnitude of 85 = 1010101
!85 = 11010101

(c)

Magnitude of 10010 = 1100100


+100 = 01100100

(d)

Magnitude of 123 = 1111011


!123 = 11111011

(a)

Magnitude of 34 = 0100010
!34 = 11011101

(b)

Magnitude of 57 = 0111001
+57 = 00111001

(c)

Magnitude of 99 = 1100011
!99 = 10011100

(d)

Magnitude of 115 = 1110011


+115 = 01110011

(a)

Magnitude of 12 = 1100
+12 = 00001100

(b)

Magnitude of 68 = 1000100
!68 = 10111100

(c)

Magnitude of 10110 = 1100101


+10110 = 01100101

(d)

Magnitude of 125 = 1111101


!125 = 10000011

26.

(a)

10011001 = !25

27.

(a)
(b)
(c)

10011001 = !(01100110) = !102


01110100 = +(1110100) = +116
10111111 = !(1000000) = !64

28.

(a)
(b)
(c)

10011001 = !(1100111) = !103


01110100 = +(1110100) = +116
10111111 = !(1000001) = !65

29.

(a)

0111110000101011 % sign = 0
1.11110000101011 214 % exponent = 127 + 14 + 141 = 10001101
Mantissa = 11110000101011000000000
01000110111110000101011000000000

(b)

100110000011000 % sign = 1
1.10000011000 211 % exponent = 127 + 11 = 138 = 10001010
Mantissa = 11000001100000000000000
11000101011000001100000000000000

(a)

11000000101001001110001000000000
Sign = 1
Exponent = 10000001 = 129 ! 127 = 2
Mantissa = 1.01001001110001 22 = 101.001001110001
!101.001001110001 = !5.15258789

(b)

01100110010000111110100100000000
Sign = 0
Exponent = 11001100 = 204 ! 127 = 77
Mantissa = 1.100001111101001
1.100001111101001 277

23.

24.

25.

30.

(b)

01110100 = +116

13

(c)

10111111 = !63

Chapter 2
Section 2-7 Arithmetic Operations with Signed Numbers
31.

(a)

33 = 00100001
15 = 00001111

00100001
+ 00001111
00110000

(b)

56 = 00111000
27 = 00011011
!27 = 11100101

00111000
+ 11100101
00011101

(c)

46 = 00101110
!46 = 11010010
25 = 00011001

11010010
+ 00011001
11101011

(d)

11010 = 01101110

10010010
+ 10101100
100111110

!11010 = 10010010
84 = 01010100
!84 = 10101100

32.

(a)

00010110
+ 00110011
01001001

(b)

01110000
+ 10101111
100011111

33.

(a)

10001100
+ 00111001
11000101

(b)

11011001
+ 11100111
11000000

34.

(a)

00110011
! 00010000

35.

01101010
11110001

00110011
+ 11110000
1 00100011

(b)

01101010
00001111
01101010
01101010
100111110
01101010
1011100110
01101010
11000110110

Changing to 2s complement with sign: 100111001010

36.

01000100
= 00000010
00011001
68
= 2, remainder of 18
25

Section 2-8 Hexadecimal Numbers


37.

(a)
(b)
(c)
(d)
(e)
(f)
(g)

3816 = 0011 1000


5916 = 0101 1001
A1416 = 1010 0001 0100
5C816 = 0101 1100 1000
410016 = 0100 0001 0000 0000
FB1716 = 1111 1011 0001 0111
8A9D16 = 1000 1010 1001 1101

14

01100101
! 11101000

01100101
+ 00011000
01111101

Chapter 2
38.

(a)
(b)
(c)
(d)
(e)
(f)

1110 = E16
10 = 216
0001 0111 = 1716
1010 0110 = A616
0011 1111 0000 = 3F016
1001 1000 0010 = 98216

39.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)

2316 = 2 161 + 3 160 = 32 + 3 = 35


9216 = 9 161 + 2 160 = 144 + 2 = 146
1A16 = 1 161 + 10 160 = 16 + 10 = 26
8D16 = 8 161 + 13 160 = 128 + 13 = 141
F316 = 15 161 + 3 160 = 240 + 3 = 243
EB16 = 14 161 + 11 160 = 224 + 11 = 235
5C216 = 5 162 + 12 161 + 2 160 = 1280 + 192 + 2 = 1474
70016 = 7 162 = 1792

40.

(a)

(c)

(e)

(g)

41.

(a)
(b)
(c)

8
= 0, remainder = 8
16
hexadecimal number = 816

(b)

33
= 2, remainder = 1 (LSD)
16
2
= 0, remainder = 2
16
hexadecimal number = 2116

(d)

284
= 17, remainder = 12 = C16 (LSD)
16
17
= 1, remainder = 1
16
1
= 0, remainder = 1
16
hexadecimal number = 11C16
4019
= 251, remainder = 3 (LSD)
16
251
= 15, remainder = 11 = B16
16
15
= 0, remainder = 15 = F16
16
hexadecimal number = FB316

(f)

(h)

3716 + 2916 = 6016


A016 + 6B16 = 10B16
FF16 + BB16 = 1BA16

15

14
= 0, remainder = 14 = E16
16
hexadecimal number = E16
52
= 3, remainder = 4 (LSD)
16
3
= 0, remainder = 3
16
hexadecimal number = 3416

2890
= 180, remainder = 10 = A16 (LSD)
16
180
= 11, remainder = 4
16
11
& 0 , remainder = 11 = B16
16
hexadecimal number = B4A16
6500
= 406, remainder = 4 (LSD)
16
406
= 25, remainder = 6
16
25
= 1, remainder = 9
16
1
= 0, remainder = 1
16
hexadecimal number = 196416

Chapter 2
42.

(a)
(b)
(c)

5116 ! 4016 = 1116


C816 ! 3A16 = 8E16
FD16 ! 8816 = 7516

Section 2-9 Octal Numbers


43.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)

44.

(a)

(c)

(e)

(g)

128 = 1 81 + 2 80 = 8 + 2 = 10
278 = 2 81 + 7 80 = 16 + 7 = 23
568 = 5 81 + 6 80 = 40 + 6 = 46
648 = 6 81 + 4 80 = 48 + 4 = 52
1038 = 1 82 + 3 80 = 64 + 3 = 67
5578 = 5 82 + 5 81 + 7 80 = 320 + 40 + 7 = 367
1638 = 1 82 + 6 81 + 3 80 = 64 + 48 + 3 = 115
10248 = 1 83 + 2 81 + 4 80 = 512 + 16 + 4 = 532
77658 = 7 83 + 7 82 + 6 81 + 5 80 = 3584 + 448 + 48 + 5 = 4085
15
= 1, remainder = 7 (LSD)
8
1
= 0, remainder =1
8
octal number = 178

(b)

46
= 5, remainder = 6 (LSD)
8
5
= 0, remainder = 5
8
octal number = 568

(d)

100
= 12, remainder = 4 (LSD)
8
12
= 1, remainder = 4
8
1
= 0, remainder = 1
8
octal number = 1448

(f)

219
= 27, remainder = 3 (LSD)
8
27
= 3, remainder = 3
8
3
= 0, remainder = 3
8
octal number = 3338

(h)

16

27
= 3, remainder = 3 (LSD)
8
3
= 0, remainder = 3
8
octal number = 338
70
= 8, remainder = 6 (LSD)
8
8
= 1, remainder = 0
8
1
= 0, remainder = 1
8
octal number = 1068
142
= 17, remainder = 6 (LSD)
8
17
= 2, remainder = 1
8
2
= 0, remainder = 2
8
octal number = 2168
435
= 54, remainder = 3 (LSD)
8
54
= 6, remainder = 6
8
6
= 0, remainder = 6
8
octal number = 6638

45.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)

138 = 001 011


578 = 101 111
1018 = 001 000 001
3218 = 011 010 001
5408 = 101 100 000
46538 = 100 110 101 011
132718 = 001 011 010 111 001
456008 = 100 101 110 000 000
1002138 = 001 000 000 010 001 011

46.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)

111 = 78
010 = 28
110 111 = 678
101 010 = 528
001 100 = 148
001 011 110 = 1368
101 100 011 001 = 54318
010 110 000 011 = 26038
111 111 101 111 000 = 775708

Section 2-10 Binary Coded Decimal (BCD)


47.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)

10 = 0001 0000
13 = 0001 0011
18 = 0001 1000
21 = 0010 0001
25 = 0010 0101
36 = 0011 0110
44 = 0100 0100
57 = 0101 0111
69 = 0110 1001
98 = 1001 1000
125 = 0001 0010 0101
156 = 0001 0101 0110

48.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)

10 = 10102
13 = 11012
18 = 100102
21 = 101012
25 = 110012
36 = 1001002
44 = 1011002
57 = 1110012
69 = 10001012
98 = 11000102
125 = 11111012
156 = 100111002

4 bits binary, 8 bits BCD


4 bits binary, 8 bits BCD
5 bits binary, 8 bits BCD
5 bits binary, 8 bits BCD
5 bits binary, 8 bits BCD
6 bits binary, 8 bits BCD
6 bits binary, 8 bits BCD
6 bits binary, 8 bits BCD
7 bits binary, 8 bits BCD
7 bits binary, 8 bits BCD
7 bits binary, 12 ibts BCD
8 bits binary, 12 bits BCD

17

Chapter 2
49.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)

104 = 0001 0000 0100


128 = 0001 0010 1000
132 = 0001 0011 0010
150 = 0001 0101 0000
186 = 0001 1000 0110
210 = 0010 0001 0000
359 = 0011 0101 1001
547 = 0101 0100 0111
1051 = 0001 0000 0101 0001

50.

(a)
(c)
(e)
(g)
(i)

0001 = 1
1001 = 9
0001 1001 = 19
0100 0101 = 45
1000 0111 0000 = 870

51.

(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)

1000 0000 = 80
0010 0011 0111 = 237
0011 0100 0110 = 346
0100 0010 0001 = 421
0111 0101 0100 = 754
1000 0000 0000 = 800
1001 0111 1000 = 978
0001 0110 1000 0011 = 1683
1001 0000 0001 1000 = 9018
0110 0110 0110 0111 = 6667

52.

(a)

0010
+ 0001
0011

(b)

0101
+ 0011
1000

(c)

0111
+ 0010
1001

(d)

1000
+ 0001
1001

(e)

00011000
+ 00010001
00101001

(f)

01100100
+ 00110011
10010111

(g)

01000000
+ 01000111
10000111

(h)

10000101
+ 00010011
10000111

(b)
(d)
(f)
(h)

0110 = 6
0001 1000 = 18
0011 0010 = 32
1001 1000 = 98

18

Chapter 2
53.

(a)

(b)
1000
# 0110
1110
# 0110

0111
# 0101
invalid

1100
# 0110

invalid

00010010

00010100
(d)

(c)
1001
# 1000

1001
# 0111

10001 invalid
# 0110

10000 invalid
# 0110

00010111

00010110

(e)

(f)
00100101
# 00100111

01010001
# 01011000
10101001 invalid
# 0110

01001100 invalid
# 0110
01010010

000100001001
(h)

(g)
10011000
# 10010111
100101111
# 01100110

010101100001
# 011100001000
invalid

110001101001
# 0110

000110010101

0001001001101001

19

invalid

Chapter 2
54.

(a)

4+3
0100
# 0011

(b)

5+2
0101
# 0010

0111
(c)

0111

6+4

(d)

17 + 12
00010111
# 00100010

0110
# 0100

00101001

1010
# 0110
(f)

00010000
(e)

65 + 58
01100101
# 01011000

28 + 23
00101000
# 00100011

10111101
# 01100110
000100100011

01001011
# 0110
(h)

01010001
(g)

295 + 157
001010010101
# 000101010111

113 + 101
000100010011
# 000100000001

001111101100
# 01100110
010001010010

001000010100

Section 2-11 Digital Codes


55.

The Gray code makes only one bit change at a time when going from one number in the
sequence to the next number.
Gray for 11112 = 1000
Gray for 00002 = 0000

56.

(a)

1+1+0+1+1
1 0 1 1 0

(c)

1+1+1+1+0+1+1+1+0+1+1+1+0
1 0 0 0 1 1 0 0 1 1 0 0 1

(a)

1010
1100

(c)

11000010001
10000011110

(a)
(c)
(e)
(g)
(i)

1 % 00110001
6 % 00110110
18 % 0011000100111000
56 % 0011010100110110
107 % 001100010011000000110111

57.

58.

Binary
Gray

(b)

Gray
Binary

1 + 0 + 0 + 1 + 0 + 1 + 0 Binary
1 1 0 1 1 1 1 Gray
Binary
Gray
Gray
Binary

(b)

00010
00011

(b)
(d)
(f)
(h)

3 % 00110011
10 % 0011000100110000
29 % 0011001000111001
75 % 0011011100110101

Gray
Binary

20

Chapter 2
59.

(a)
(c)
(e)

0011000 % CAN
0111101 % =
0111110 % >

60.

1001000 1100101 1101100 1101100 1101111 0101110 0100000


H
e
l
l
o
.
#
1001000 1101111 1110111 0100000 1100001 1110010 1100101
H
o
w
#
a
r
e
0100000 1111001 1101111 1110101 0111111
#
y
o
u
?

61.

1001000 1100101 1101100 1101100 1101111 0101110 0100000


48
65
6C
6C
6F
2E
20
1001000 1101111 1110111 0100000 1100001 1110010 1100101
48
6F
77
20
61
72
65
0100000 1111001 1101111 1110101 0111111
20
79
6F
75
3F

62.

30 INPUT A, B
3
0
SP
I
N
P
U
T
SP
A
,
B

(b)
(d)
(f)

0110011
0110000
0100000
1001001
1001110
1010000
1010101
1010100
0100000
1000001
0101100
1000010

1001010 % J
0100011 % #
1000010 % B

3316
3016
2016
4916
4E16
5016
5516
5416
2016
4116
2C16
4216

Section 2-12 Error Detection Codes


63.

Code (b) 011101010 has five 1s, so it is in error.

64.

Codes (a) 11110110 and (c) 01010101010101010 are in error because they have an even
number of 1s.

65.

(a)

1 10100100

(b)

0 00001001

21

(c)

1 11111110

Chapter 2
66.

67.

(a)

(a)

1100

(b)

1111

69.

100011100

# 1011

# 0100

# 10011001

0111

1011

110000101

1100

(b)

1111

(c)

100011100

# 0111

# 1011

# 110000101

1011

0100

010011001

In each case, you get the other number.

68.

(c)

101100100000
1010
1001
1010
1100
1010
1100
1010
1100
1010
1100
1010
Re mainder & 0110

101100100110
1010
1001
1010
1100
1010
1101
1010
1111
1010
1010
1010
0000

Append remainder to data.

CRC is 101100100110.

Error in MSB of transmitted CRC:


001100100110
1010
1001
1010
1100
1010
1101
1010
1110
1010
1000
1010
1011
1010
10
Remainder is 10, indicating an error.

22

CHAPTER 3
LOGIC GATES
Section 3-1 The Inverter
1.

See Figure 3-1.

2.

B: LOW, C: HIGH, D: LOW, E: HIGH, F: LOW

3.

See Figure 3-2.

FIGURE 3-2

Section 3-2 The AND Gate


4.

See Figure 3-3.

FIGURE 3-3

23

Chapter 3
5.

See Figure 3-4.

FIGURE 3-4

6.

See Figure 3-5.

FIGURE 3-5

7.

See Figure 3-6.

FIGURE 3-6

24

Chapter 3
8.

See Figure 3-7.

FIGURE 3-7

Section 3-3 The OR Gate


9.

See Figure 3-8.


A
B
X
FIGURE 3-8

10.

See Figure 3-9.


A
B
C
X
FIGURE 3-9

25

Chapter 3
11.

See Figure 3-10.

FIGURE 3-10

12.

See Figure 3-11.

FIGURE 3-11

13.

See Figure 3-12.

FIGURE 3-12

14.
A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

C
0
1
0
1
0
1
0
1

X
0
1
1
1
1
1
1
1

26

Chapter 3
Section 3-4 The NAND Gate
15.

See Figure 3-13.

FIGURE 3-13

16.

See Figure 3-14.

FIGURE 3-14

17.

See Figure 3-15.

FIGURE 3-15

27

Chapter 3
18.

See Figure 3-16.

FIGURE 3-16

Section 3-5 The NOR Gate


19.

See Figure 3-17.

FIGURE 3-17

20.

See Figure 3-18.

FIGURE 3-18

28

Chapter 3
21.

See Figure 3-19.

FIGURE 3-19

22.

See Figure 3-20.

FIGURE 3-20

Section 3-6 The Exclusive-OR and Exclusive-NOR Gates


23.

The output of the XOR gate is HIGH only when one input is HIGH. The output of the OR gate
is HIGH any time one or more inputs are HIGH.
XOR = AB AB
OR = A + B

24.

See Figure 3-21.

FIGURE 3-21

29

Chapter 3
25.

See Figure 3-22.

FIGURE 3-22

26.

See Figure 3-23.

FIGURE 3-23

Section 3-7 Fixed-Function Logic


27.

The power dissipation of CMOS increases with frequency.

28.

(a)
(b)
(c)
(d)
(e)

I "
!I
! 1.6 mA 4.4 mA "
P = $ CCH CCL %VCC # $
% 5.5 V = 16.5 mW
2
2
&
'
&
'
VOH(min) = 2.7 V
tPLH = TPHL = 15 ns
VOL = 0.4 V (max)
@ VCC = 2 V, tPHL = tPLH = 75 ns; @ VCC = 6 V, tPHL = tPLH = 13 ns

30

Chapter 3
29.

See Figure 3-24.

FIGURE 3-24

30.

Gate A can be operated at the highest frequency because it has shorter propagation delay times
than Gate B.

31.

PD = VCCIC = (5 V)(4 mA) = 20 mW

32.

ICCH = 4 mA; PD = (5 V)(4 mA) = 20 mW

Section 3-8 Troubleshooting


33.

(a)
(b)
(c)
(d)
(e)
(f)

NAND gate OK
AND gate faulty
NAND gate faulty
NOR gate OK
XOR gate faulty
XOR gate OK

34.

(a)
(b)
(c)
(d)

NAND gate faulty. Input A open.


NOR gate faulty. Input B shorted to ground.
NAND gate OK
XOR gate faulty. Input A open.

35.

(a)

The gate does not respond to pulses on either input when the other input is HIGH. It is
unlikely that both inputs are open. The most probable fault is that the output is stuck in
the LOW state (shorted to ground, perhaps) although it could be open.

(b)

Pin 4 input or pin 6 output internally open.

31

Chapter 3
36.

The timer input to the AND gate is open. Check for 30-second HIGH level on this input when
ignition is turned on.

37.

An open seat-belt input to the AND gate will act like a constant HIGH just as if the seat belt
were unbuckled.

38.

Two possibilities: An input stuck LOW or the output stuck HIGH.

Section 3-9 Programmable Logic


39.

X1 = AB
X2 = AB
X3 = AB

40.

X1 = ABC
Row 1: blow A, B, B, C , and C column fuses

Row 2: blow A, A, B, C , and C column fuses


Row 3: blow A, A, B, B, and C column fuses
X2 = ABC
Row 4: blow A, B, B, C , and C column fuses
Row 5: blow A, A, B, C , and C column fuses
Row 6: blow A, A, B, B, and C column fuses
X3 = ABC
Row 7: blow A, B, B, C , and C column fuses
Row 8: blow A, A, B, C , and C column fuses
Row 9: blow A, A, B, B, and C column fuses

Special Design Problems


41.

See Figure 3-25.

FIGURE 3-25

32

Chapter 3
42.

See Figure 3-26.

FIGURE 3-26

43.

Add an inverter to the Enable input line of the AND gate as shown in Figure 3-27.

FIGURE 3-27

44.

See Figure 3-28.

FIGURE 3-28

45.

See Figure 3-29.

FIGURE 3-29

33

Chapter 3
46.

See Figure 3-30.

FIGURE 3-30

47.

See Figure 3-31.

FIGURE 3-31

Multisim Troubleshooting Practice


48.

Input A shorted to output.

49.

Inputs shorted together.

50.

No fault.

51.

Output open.

34

You might also like