0% found this document useful (0 votes)
4 views5 pages

Circuit Analysis and Boolean Operations

The document contains a series of chapter review problems related to digital circuits, Boolean operations, memory storage, and data representation. It includes questions on flip-flops, hexadecimal conversions, memory capacity calculations, and encoding in ASCII. The problems are designed to test understanding of fundamental concepts in data storage and digital logic design.

Uploaded by

ntduyar11
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views5 pages

Circuit Analysis and Boolean Operations

The document contains a series of chapter review problems related to digital circuits, Boolean operations, memory storage, and data representation. It includes questions on flip-flops, hexadecimal conversions, memory capacity calculations, and encoding in ASCII. The problems are designed to test understanding of fundamental concepts in data storage and digital logic design.

Uploaded by

ntduyar11
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter Review Problems 85

Chapter Review Problems


(Asterisked problems are associated with optional sections.)

1. Determine the output of each of the follow- use this device as an abstract tool in other
ing circuits, assuming that the upper input is circuits. Consider the circuitry using two of
1 and the lower input is 0. What would be the the following flip-flops. If a pulse were sent
output when upper input is 0 and the lower on the circuit’s input, the bottom flip-flop
input is 1? would change state. However, the second
flip-flop would not change, since its input
(received from the output of the NOT gate)
went from a 1 to a 0. As a result, this circuit
a. would now produce the outputs 0 and 1.
A second pulse would flip the state of both
flip-flops, producing an output of 1 and
0. What would be the output after a third
pulse? After a fourth pulse?

b. Output 0 0

0
flip Flip-flop
1
c.

2. a. What Boolean operation does the circuit 0


compute? flip Flip-flop
Input
0
Input
Output b. It is often necessary to coordinate ­activities
of various components within a ­computer.
Input
This is accomplished by connecting a pulsat-
b. What Boolean operation does the circuit ing signal (called a clock) to ­circuitry similar
compute? to part a. Additional gates (as shown) send
signals in a coordinated fashion to other con-
Input nected circuits. On studying this circuit, you
should be able to confirm that on the 1st, 5th,
Output
9th . . . pulses of the clock, a 1 will be sent on
Input output A. On what pulses of the clock will
a 1 be sent on output B? On what pulses of
*3. a. If we were to purchase a flip-flop circuit the clock will a 1 be sent on output C? On
from an electronic component store, we which output is a 1 sent on the 4th pulse of
may find that it has an additional input the clock?
called flip. When this input changes from
a 0 to 1, the output flips state (if it was 0 it Output A
flip Flip-flop
is now 1 and vice versa). However, when
the flip input changes from 1 to a 0, noth- Output B

ing happens. Even though we may not


know the details of the circuitry needed flip Flip-flop
Output C
Clock
to accomplish this behavior, we could still

M01_BROO1160_12_SE_C01.indd 85 01/08/14 11:18 AM


86 Chapter 1 Data Storage

4. Assume that both of the inputs in the follow- 9. Express the following bit patterns in hexadeci-
ing circuit are 1. Describe what would happen mal notation:
if the upper input were temporarily changed a. 10110100101101001011
to 0. Describe what would happen if the lower b. 000111100001
input were temporarily changed to 0. Redraw c. 1111111011011011
the circuit using NAND gates. 10. Suppose a digital camera has a storage capac-
ity of 500MB. How many black-and-white pho-
tographs could be stored in the camera if each
consisted of 512 pixels per row and 512 pixels
per column if each pixel required one bit of
storage?
11. Suppose an image is represented on a dis-
play screen by a square array containing
256 columns and 256 rows of pixels. If for
each pixel, 3 bytes are required to encode the
5. The following table represents the addresses
color and 8 bits to encode the intensity, how
and contents (using hexadecimal notation)
many byte-size memory cells are required to
of some cells in a machine’s main memory.
hold the entire picture?
Starting with this memory arrangement, fol-
low the sequence of instructions and record 12. a. What are the advantages, if any, of using
the final contents of each of these memory zoned-bit recording?
cells: b. What is the difference between seek time
and access time?
Address Contents 13. Suppose that you want to create a backup of
00 AB your entire data which is around 10GB. Would
01 53 it be reasonable to use DVDs for the purpose
02 D6 of creating this backup? What about BDs
03 02 (Blu-ray Disks)?
14. If each sector on a magnetic disk can store
Step 1. Move the contents of the cell whose 512 bytes of data, how many sectors are
address is 03 to the cell at address 00. required to store two pages of integers (perhaps
Step 2. Move the value 01 into the cell at 10 lines of 100 integers in each page) if every
address 02. integer is represented by using four bytes?
Step 3. Move the value stored at address 01 15. How many bytes of storage space would be
into the cell at address 03. required to store a 20-page document contain-
6. How many cells can be in a computer’s main
ing details of employees, in which each page
memory if each cell’s address can be repre- contains 100 records and every record is of
sented by two hexadecimal digits? What if 200 characters, if two byte Unicode characters
four hexadecimal digits are used? were used?
16. In zoned-bit recording, why does the rate of
7. What bit patterns are represented by the fol-
lowing hexadecimal notations? data transfer vary, depending on the portion
a. 8A9    b. DCB    c. EF3 of the disk being used?
d. A01    e. C99 17. What is the average access time for a
8. What is the value of the least significant bit in hard disk which has a rotation delay
the bit patterns represented by the following of 10 milliseconds and a seek time of 9
hexadecimal notations? milliseconds?
a. 9A     b. 90 18. Suppose a disk storage system consists of
c. 1B     d. 6E 5 platters with 10 tracks on each side and

M01_BROO1160_12_SE_C01.indd 86 01/08/14 11:18 AM


Chapter Review Problems 87

8 sectors in each track. What is the capacity of *29. Convert each of the following base
the system? Assume every sector contains 512 10 representations to its equivalent excess
bytes and data can be stored on both surfaces sixteen representation:
of each platter. a. -12     b. 0     c. 10
19. Here is a message in ASCII. What does it say? d. -8        e. 9
01000011 01101111 01101101 01110000 *30. Convert each of the following two’s comple-
01110101 01110100 01100101 01110010 ment representations to its equivalent base
00100000 01010011 01100011 01101001 10 representation:
01100101 01101110 01100011 01100101 a. 010101   b. 101010   c. 110110
00100001 d. 011011   e. 111001
20. The following two messages are encoded in *31. Convert each of the following base
ASCII using one byte per character and then 10 representations to its equivalent two’s com-
represented in hexadecimal notation. Are plement representation in which each value is
both the messages same? represented in 8 bits:
436F6D7075746572  436F6D7075736572 a. -27     b. 3    c. 21
21. Encode the following sentences in ASCII d. 8      e. -18
using one byte per character. *32. Perform each of the following additions
a. Is 1 byte = 8 bits? assuming the bit strings represent values in
b. Yes, a byte contains 8 bits! two’s complement notation. Identify each
22. Combine the two sentences of the previous case in which the answer is incorrect because
problem and express it in hexadecimal notation. of overflow.
23. List the hexadecimal representations of the a. 00101 1 01000  b. 11111 1 00001
integers from 20 to 27. c. 01111 1 00001 d. 10111 1 11010
e. 11111 1 11111 f. 00111 1 01100
24. a. Write the number 100 by representing 1
and 0 in ASCII. *33. Solve each of the following problems by
b. Write the number 255 in binary representation. translating the values into two’s complement
notation (using patterns of 5 bits), convert-
25. What values have binary representations in
ing any subtraction problem to an equivalent
which only one of the bits is 1? List the binary
addition problem, and performing that addi-
representations for the smallest six values
tion. Check your work by converting your
with this property.
answer to base 10 notation. (Watch out for
*26. Convert each of the following hexadecimal overflow.)
representations to binary representation and a. 5 1 1 b. 5 2 1 c. 12 2 5
then to its equivalent base 10 representation: d. 8 2 7 e. 12 1 5 f. 5 2 11
a. A    b. 14   c. 1E
d. 28   e. 32   f. 3C *34. Convert each of the following binary rep-
g. 46   h. 65   i. CA resentations into its equivalent base 10
j. 12F k. 194       l. 1F9 representation:
a. 11.11 b. 100.0101 c. 0.1101
*27. Convert each of the following base 10 d. 1.0 e. 10.01
representations to its equivalent binary
representation: *35. Express each of the following values in binary
a. 110    b. 99    c. 72 notation:
d. 81   e. 36 a. 53⁄4 b. 1515⁄16 c. 53⁄8
d. 1 ⁄4
1
e. 6 ⁄8
5
*28. Convert each of the following excess 32
representations to its equivalent base 10 *36. Decode the following bit patterns using the
representation: floating-point format described in Figure 1.24:
a. 011111   b. 100110   c. 111000 a. 01011001 b. 11001000
d. 000101   e. 010101 c. 10101100 d. 00111001

M01_BROO1160_12_SE_C01.indd 87 01/08/14 11:18 AM


88 Chapter 1 Data Storage

*37. Encode the following values using the 8-bit *45. If you changed the length of the bit strings
floating-point format described in Figure 1.24. being used to represent integers in binary
Indicate each case in which a truncation error from 4 bits to 6 bits, what change would be
occurs. made in the value of the largest integer you
a. 271⁄2 b. 1⁄2 c. 233⁄4 could represent? What if you were using two’s
d. ⁄32
7
e. ⁄32
31
complement notation?
*38. Assuming you are not restricted to using nor- *46. What would be the hexadecimal represen-
malized form, list all the bit patterns that could tation of the largest memory address in a
be used to represent the value 3/8 using the memory consisting of 4MB if each cell had a
floating-point format described in Figure 1.24. one-byte capacity?
*39. What is the best approximation to the square *47. What would be the encoded version of the
root of 2 that can be expressed in the 8-bit message
floating-point format described in Figure 1.24? xxy yyx xxy xxy yyx
What value is actually obtained if this approxi- if LZW compression, starting with the diction-
mation is squared by a machine using this ary containing x, y, and a space (as described
floating-point format? in Section 1.8), were used?
*40. What is the best approximation to the value *48. The following message was compressed using
one-tenth that can be represented using LZW compression with a dictionary whose
the 8-bit floating-point format described in first, second, and third entries are x, y, and
Figure 1.24? space, respectively. What is the decompressed
*41. Explain how errors can occur when measure- message?
ments using the metric system are recorded 22123113431213536
in floating-point notation. For example, what
if 110 cm was recorded in units of meters? *49. If the message
xxy yyx xxy xxyy
*42. One of the bit patterns 01011 and 11011 repre-
sents a value stored in excess 16 notation and were compressed using LZW with a starting dic-
the other represents the same value stored in tionary whose first, second, and third entries
two’s complement notation. were x, y, and space, respectively, what would
a. What can be determined about this com- be the entries in the final dictionary?
mon value? *50. As we will learn in the next chapter, one
b. What is the relationship between a pat- means of transmitting bits over traditional
tern representing a value stored in two’s telephone systems is to convert the bit pat-
complement notation and the pattern rep- terns into sound, transfer the sound over the
resenting the same value stored in excess telephone lines, and then convert the sound
notation when both systems use the same back into bit patterns. Such techniques are
bit pattern length? limited to transfer rates of 57.6 Kbps. Is this
*43. The three bit patterns 10000010, 01101000, sufficient for teleconferencing if the video is
and 00000010 are representations of the compressed using MPEG?
same value in two’s complement, excess, and *51. Encode the following sentences in ASCII
the 8-bit floating-point format presented in using even parity by adding a parity bit at the
­Figure 1.24, but not necessarily in that order. high-order end of each character code:
What is the common value, and which pattern a. Does 100/5 = 20?
is in which notation? b. The total cost is $7.25.
*44. Which of the following values cannot be rep- *52. The following message was originally transmit-
resented accurately in the floating-point for- ted with odd parity in each short bit string. In
mat introduced in Figure 1.24? which strings have errors definitely occurred?
a. 61⁄2 b. 13⁄16 c. 9 11001 11011 10110 00000 11111 10001
d. ⁄32
17
e. 15⁄16 10101 00100 01110

M01_BROO1160_12_SE_C01.indd 88 01/08/14 11:18 AM


Social Issues 89

*53. Suppose a 24-bit code is generated by repre- may get strange symbols in your text editor
senting each symbol by three ­consecutive cop- when you try to do this.)
ies of its ASCII representation (for example, *58. The currency converter script of Section 1.8
the symbol A is represented by the bit string uses the variable dollars to store the amount
010000010100000101000001). What error- of money to be converted before performing
correcting properties does this new code have? each of the multiplications. This made the
*54. Using the error-correcting code described in script one line longer than simply typing the
Figure 1.28, decode the following words: integer quantity 1000 directly into each of
a. 111010 110110 the multiplication calculations. Why is it
b. 101000 100110 001100 advantageous to create this extra variable
c. 011101 000110 000000 010100 ahead of time?
d. 010010 001000 001110 101111 *59. Write and test a Python script that given a
000000 110111 100110 number of bytes outputs the equivalent num-
e. 010011 000000 101001 100110 ber of kilobytes, megabytes, gigabytes, and
*55. International currency exchange rates change terabytes. Write and test a complementary
frequently. Investigate current exchange script that given a number of terabytes out-
rates, and update the currency converter puts the equivalent number of GB, MB, KB,
script from Section 1.8 accordingly. and bytes.
*56. Find another currency not already included *60. Write and test a Python script that given
in the currency converter from Section 1.8. a number of minutes and seconds for a
Acquire its current conversion rate and ­recording calculates the number of bits used to
find its Unicode currency symbol on the encode uncompressed, CD-quality stereo
web. Extend the script to convert this new audio data of that length. (Review ­Section 1.4
currency. for the necessary parameters and equations.)
*57. If your web browser and text editor properly *61. Identify the error(s) in this Python script.
support Unicode and UTF-8, copy/paste the days_per_week = 7
actual international currency symbols into weeks_per_year = 52
the converter script of Section 1.8, in place of days_per_year = 
days_per_week **
the cumbersome codes like, '\u00A3'. (If your weeks_per_year
software has trouble handling Unicode, you PRINT(days_per_year)

Social Issues
The following questions are intended as a guide to the ethical/social/legal issues
associated with the field of computing. The goal is not merely to answer these
questions. You should also consider why you answered as you did and whether
your justifications are consistent from one question to the next.
1. A truncation error has occurred in a critical situation, causing extensive dam-
age and loss of life. Who is liable, if anyone? The designer of the hardware?
The designer of the software? The programmer who actually wrote that part
of the program? The person who decided to use the software in that particular
application? What if the software had been corrected by the company that
originally developed it, but that update had not been purchased and applied
in the critical application? What if the software had been pirated?

M01_BROO1160_12_SE_C01.indd 89 01/08/14 11:18 AM

You might also like