You are on page 1of 3

CS6 1Homework 5

Chapter 3: Exercises 3.19; 3.22; 3.24; 3.25; 3.31; 3.32; 3.33; 3.34; 3.35
3.19
Figure 3.36 is a simple combinational circuit. The output value depends ONLY on the input values as
they currently exist. Figure 3.37 is an R-S Latch, a logic circuit that can store information. That is,
if A, B are both 1, the value of D depends on which of the two (A or B) was 0 most recently.
3.22

Truth table - data inputs selected by S[1:0]


S1

S0

Data input selected

3.24
a) Input x allows us to choose which bits are applied to the second adder input:
if x = 0, then bits B0 to B3 are selected, i.e. S = A + B;
if x = 1, the bits C0 to C3 are selected, and S = A + C
In other words, x selects between the two operations (A + B) and (A + C)
b) The key to solving this is to recognize that subtracting corresponds to adding the two's
complement, and that we obtain the two's complement by inverting each bit and adding 1.
In this case, we take each bit of the multi-bit number B, and invert it; the inverted bit then
becomes the input C of part a); finally, we add 1 by applying a 1 to the carry input of column 0.

Where do we get the 1?


Simple: use the input x = 1, which is also used to select the inverted bits of B for input to the
adder.
(Here shown subtracting (since x = 1) B = b0001 = #1 from A = b1010 = #-6, getting 1001 = #-7 as
expected).

(This would have looked nicer if rotated by 90' unfortunately


logisim won't let you rotate the adders).
3.25
(a) 3 gate delays (b) 3 gate delays (c) 3*4 = 12 gate delays (d) 3*32 = 96 gate delays
3.31
25 8 * 2^3 = 64 bytes
3.32
A memory address refers to a location in memory. Memory's addressability is the number of bits
stored in each memory location.
3.33
a) To read the 4th memory location: A[1:0] = 11, WE = 0
b) To address 60 locations requires 6-bit adressing. The addresability is unchanged.
c) 2^6 = 64, so 4 more locations could be added

3.34
a) The address space is 4, but only 3 of those locations are actually populated with memory circuits.
In a real system, an attempt to address location 3 (11) would generate an exception: it is in
principle a valid 2-bit address, but there is nothing "there".
b) 4 bits
c) 0001
3.35
Total bits of storage = (2^22) * 3 bits = 4 Mbits * 3 = 12 Mbits = 12,582,912 bits

You might also like