Download Solution Manual - Digital Design and Computer Architecture Harris ARM Edition and more Exercises Digital Systems Design in PDF only on Docsity!
S OLUTIONS
Digital Design and Computer Architecture: ARM Edition
S O L U T I O N S 1
CHAPTER 1
Exercise 1.
(a) Biologists study cells at many levels. The cells are built from organelles
such as the mitochondria, ribosomes, and chloroplasts. Organelles are built of
macromolecules such as proteins, lipids, nucleic acids, and carbohydrates.
These biochemical macromolecules are built simpler molecules such as carbon
chains and amino acids. When studying at one of these levels of abstraction, bi-
ologists are usually interested in the levels above and below: what the structures
at that level are used to build, and how the structures themselves are built.
(b) The fundamental building blocks of chemistry are electrons, protons,
and neutrons (physicists are interested in how the protons and neutrons are
built). These blocks combine to form atoms. Atoms combine to form molecules.
For example, when chemists study molecules, they can abstract away the lower
levels of detail so that they can describe the general properties of a molecule
such as benzene without having to calculate the motion of the individual elec-
trons in the molecule.
Exercise 1.
(a) Automobile designers use hierarchy to construct a car from major as-
semblies such as the engine, body, and suspension. The assemblies are con-
structed from subassemblies; for example, the engine contains cylinders, fuel
injectors, the ignition system, and the drive shaft. Modularity allows compo-
nents to be swapped without redesigning the rest of the car; for example, the
seats can be cloth, leather, or leather with a built in heater depending on the
model of the vehicle, so long as they all mount to the body in the same place.
Regularity involves the use of interchangeable parts and the sharing of parts be-
tween different vehicles; a 65R14 tire can be used on many different cars.
Sarah L. Harris and David Money Harris Digital Design and Computer Architecture: ARM Edition
S O L U T I O N S 3
Exercise 1.
Each digit conveys log 2 60 = 5.91 bits of information. 4000 10 = 1 6 40 60 (
in the 3600 column, 6 in the 60’s column, and 40 in the 1’s column).
Exercise 1.
216 = 65,536 numbers.
Exercise 1.
Exercise 1.
(a) 2 16 -1 = 65535; (b) 2 15 -1 = 32767; (c) 2 15 -1 = 32767
Exercise 1.
(a) 232 -1 = 4,294,967,295; (b) 2 31 -1 = 2,147,483,647; (c) 231 -1 =
Exercise 1.
(a) 0; (b) -2^15 = -32768; (c) -(2 15 -1) = -
Exercise 1.
(a) 0; (b) -
= -2,147,483,648; (c) -(
Exercise 1.
(a) 10; (b) 54; (c) 240; (d) 2215
Exercise 1.
(a) 14; (b) 36; (c) 215; (d) 15,
Exercise 1.
(a) A; (b) 36; (c) F0; (d) 8A
Digital Design and Computer Architecture: ARM Edition
(a) 10100101; (b) 00111011; (c) 1111111111111111;
6 S O L U T I O N S c h a p t e r 1
(a) 52; (b) 77; (c) 345; (d) 1515
Exercise 1.
(a) 0o16; (b) 0o64; (c) 0o339; (d) 0o
Exercise 1.
(a) 100010 2 , 22 16 , 34 10 ; (b) 110011 2 , 33 16 , 51 10 ; (c) 010101101 2 , AD 16 ,
173 10 ; (d) 011000100111 2 , 627 16 , 1575 10
Exercise 1.
(a) 0b10011; 0x13; 19; (b) 0b100101; 0x25; 37; (c) 0b11111001; 0xF9;
249; (d) 0b10101110000; 0x570; 1392
Exercise 1.
15 greater than 0, 16 less than 0; 15 greater and 15 less for sign/magnitude
Exercise 1.
(26-1) are greater than 0; 26 are less than 0. For sign/magnitude numbers,
(26-1) are still greater than 0, but (26-1) are less than 0.
Exercise 1.
Exercise 1.
Exercise 1.
Exercise 1.
(5 × 109 bits/second)(60 seconds/minute)(1 byte/8 bits) = 3.75 × 1010
bytes
Exercise 1.
46.566 gigabytes
S O L U T I O N S 7
Exercise 1.
2 billion
Exercise 1.
128 kbits
Exercise 1.
Exercise 1.
Exercise 1.
(a) 1101; (b) 11000 (overflows)
Exercise 1.
100 101 110 111 000 001 010 011 Two's Complement
100
111 110 101 000 001 010 011
000 001 010 011 100 101 110 111
Sign/Magnitude
Unsigned
10 11 00 01 Two's Complement
10
11
00 01
00 01 10 11
Sign/Magnitude
Unsigned
Digital Design and Computer Architecture: ARM Edition
S O L U T I O N S 9
Exercise 1.
(a) 3; (b) 01111111; (c) 00000000 2 = -127 10 ; 11111111 2 = 128 10
Exercise 1.
Exercise 1.
(a) 001010001001; (b) 951; (c) 1000101; (d) each 4-bit group represents
one decimal digit, so conversion between binary and decimal is easy. BCD can
also be used to represent decimal fractions exactly.
Exercise 1.
(a) 0011 0111 0001
(b) 187
(c) 95 = 1011111
(d) Addition of BCD numbers doesn't work directly. Also, the representa-
tion doesn't maximize the amount of information that can be stored; for example
2 BCD digits requires 8 bits and can store up to 100 values (0-99) - unsigned 8-
bit binary can store 28 (256) values.
Exercise 1.
Three on each hand, so that they count in base six.
Exercise 1.
Both of them are full of it. 42 10 = 101010 2 , which has 3 1’s in its represen-
tation.
Exercise 1.
Both are right.
Exercise 1.
#include <stdio.h>
(^000 001 010 011 100 101 110 111) Biased
Digital Design and Computer Architecture: ARM Edition
10 S O L U T I O N S c h a p t e r 1
void main(void) { char bin[80]; int i = 0, dec = 0;
printf("Enter binary number: "); scanf("%s", bin);
while (bin[i] != 0) { if (bin[i] == '0') dec = dec * 2; else if (bin[i] == '1') dec = dec * 2 + 1; else printf("Bad character %c in the number.\n", bin[i]); i = i + 1; } printf("The decimal equivalent is %d\n", dec); }
Exercise 1.
/* This program works for numbers that don't overflow the range of an integer. */
#include <stdio.h>
void main(void) { int b1, b2, digits1 = 0, digits2 = 0; char num1[80], num2[80], tmp, c; int digit, num = 0, j;
printf ("Enter base #1: "); scanf("%d", &b1); printf ("Enter base #2: "); scanf("%d", &b2); printf ("Enter number in base %d ", b1); scanf("%s", num1);
while (num1[digits1] != 0) { c = num1[digits1++]; if (c >= 'a' && c <= 'z') c = c + 'A' - 'a'; if (c >= '0' && c <= '9') digit = c - '0'; else if (c >= 'A' && c <= 'F') digit = c - 'A' + 10; else printf("Illegal character %c\n", c); if (digit >= b1) printf("Illegal digit %c\n", c); num = num * b1 + digit;
} while (num > 0) { digit = num % b2; num = num / b2; num2[digits2++] = digit < 10? digit + '0' : digit + 'A' - 10; } num2[digits2] = 0;
for (j = 0; j < digits2/2; j++) { // reverse order of digits tmp = num2[j]; num2[j] = num2[digits2-j-1]; num2[digits2-j-1] = tmp; }
printf("The base %d equivalent is %s\n", b2, num2); }
Exercise 1.
12 S O L U T I O N S c h a p t e r 1
Exercise 1.
Exercise 1.
Exercise 1.
XNOR
Y = A + B + C
B C Y
A B C A 0 0 0 0
NAND
Y = ABCDE
C D E
B
A
OR
Y = A+B+C+D
Y
(b)
A
B
C
D
B D Y
C
A
(a) 1
Y Y
A B C D E Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
(c) 1
S O L U T I O N S 13
Exercise 1.
Exercise 1.
Exercise 1.
B C Y
A
B C Y
A
B C Y
A
Digital Design and Computer Architecture: ARM Edition
S O L U T I O N S 15
Exercise 1.
The circuit functions as a buffer with logic levels V IL = 1.5; V IH = 1.8; V OL
= 1.2; VOH = 3.0. It can receive inputs from LVCMOS and LVTTL gates be-
cause their output logic levels are compatible with this gate’s input levels. How-
ever, it cannot drive LVCMOS or LVTTL gates because the 1.2 VOL exceeds
the V IL of LVCMOS and LVTTL.
Exercise 1.
(a) AND gate; (b) VIL = 1.5; VIH = 2. 2 5; VOL = 0; VOH = 3
Exercise 1.
(a) XOR gate; (b) V IL = 1.25; V IH = 2; V OL = 0; VOH = 3
Exercise 1.
Exercise 1.
Exercise 1.
A
B
C
D
Y
(a)
A B
C
A
B
C
Y
(b) (c)
Y
A
B C
A B
C
A
B
C
Y
(b) (c)
Y
A
B
A A B
B
C
Y
(a)
Digital Design and Computer Architecture: ARM Edition
16 S O L U T I O N S c h a p t e r 1
Exercise 1.
XOR
Exercise 1.
Exercise 1.
Exercise 1.
A B
C
B
A
Y
C
A
A
B B
A B Y
B C Y
A
(a) (b) (c)
A B C
Y
A
B
C
Y
A
B
C
Y
weak
weak
weak
S O L U T I O N S 11
CHAPTER 2
Exercise 2.
(a)
(b)
(c)
(d)
(e)
Exercise 2.
(a)
(b)
(c)
(d)
(e)
Exercise 2.
(a)
Y = AB + AB + AB
Y = ABC + ABC
Y = ABC + ABC + ABC + ABC + ABC
Y = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
Y = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
Y = AB + AB + AB
Y = ABC + ABC + ABC + ABC + ABC
Y = ABC + ABC + ABC
Y = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
Y = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
Y = A + B
Digital Design and Computer Architecture: ARM Edition
12 S O L U T I O N S c h a p t e r 2
(b)
(c)
(d)
(e)
Exercise 2.
(a)
(b)
(c)
(d)
(e)
Exercise 2.
(a)
(b)
(c)
(d)
(e)
This can also be expressed as:
Exercise 2.
Y = A + B + C A + B + C A + B + C A + B + C A + B + C A + B + C
Y = A + B + C A + B + C A + B + C
Y A + B + C + D A + B + C + D A + B + C + D A + B + C + D A + B + C + D
A + B + C + D A + B + C + D A + B + C + D A + B + C + D
Y A + B + C + D A + B + C + D A + B + C + D A + B + C + D A + B + C + D
A + B + C + D A + B + C + D A + B + C + D
Y = A + B
Y = A + B + C A + B + C A + B + C
Y = A + B + C A + B + C A + B + C A + B + C A + B + C
Y A + B + C + D A + B + C + D A + B + C + D A + B + C + D
A + B + C + D A + B + C + D A + B + C + D A + B + C + D
A + B + C + D
Y A + B + C + D A + B + C + D A + B + C + D A + B + C + D
A + B + C + D A + B + C + D A + B + C + D A + B + C + D
A + B + C + D
Y = A + B
Y = ABC + ABC
Y = AC + AB + AC
Y = AB + BD + ACD
Y = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
Y = A B C D + A B C D