



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




A ( B ′ + C ′ D ′) + ( C + ( A ′+ B ′) D )
(do not simplify the expression first).
How many transistors are needed to implement this expression in CMOS technology?
The circuit has 3 AND and 4 OR gates, plus 4 inverters, so that’s 7 × 6 + 4 × 2 = 50 transistors.
AAA BBB CCC DDD
The first instruction changes the ACC but does not access memory, so it must be either an immediate load or a negate instruction. It cannot be an immediate load, since the high order hex digit of the ACC becomes 5 and an immediate load can only make the high order hex digit 0 or F. So, it must be a negate instruction, 0001. This conclusion is confirmed by the fact that the new value of the ACC is the 2s complement of the previous value.
The second instruction also changes the ACC, but does not access memory. Since the new ACC value is not the 2s complement of the previous value, this must be an immediate load 1FFF.
The third instruction does read from memory, so it must be a direct load or an add instruction. Since the value returned from memory (which appears on the data bus) is 0001, and the new ACC value is 0000, it must be an add instruction, and since the value on the address bus is 0008, it must be, A008. This is confirmed by the fact that the new ACC value is 1 more than the previous value.
The last instruction changes the PC, so it must be a branch instruction. In fact, we can see the instruction returned on the data bus in this case is 700d, which is the branch-on-zero instruction.
0000 halt execution 0001 negate the value in the ACC 1xxx change the value of the ACC to xxx 2xxx load the contents of memory location xxx into the ACC 3xxx load the ACC from the memory location whose address is stored in memory location xxx 4xxx store the value in the ACC in memory location xxx 5xxx store the value in the ACC in the memory location whose address is stored in location xxx 6xxx change the value of the PC to xxx 7xxx change the value of the PC to xxx if ACC = 0 8xxx change the value of the PC to xxx if ACC > 0 9xxx change the value of the PC to xxx if ACC < 0 Axxx add the value in memory location xxx to the ACC
entity foo is port ( A: in std_logic; B: in std_logic_vector(3 downto 0); X: out std_logic_vector(2 downto 0)); end foo; architecture a1 of foo is signal Z: std_logic_vector(2 downto 0); begin process(A, B, Z) begin Z(0) <= A xor B(0); for i in 1 to 2 loop Z(i) <= B(i) and Z(i-1); end loop; end process; X(2) <= Z(0); X(1 downto 0) <= Z(2 downto 1); end a1;
A B (0)
B (1)
B (2)
X (0)
X (1)
A X (2) B (0)
B (1)
B (2)
X (0)
X (1)
X (2)
Si = Ai ⊕ ( C in A 0 A 1... Ai − 1 )
Show that the circuit below implements a 4 bit increment function.
First, note that the NOR gates can be rewritten as AND gates with inverted inputs. With this understanding, we can derive the following equations by inspection of the logic diagram.
2 2 in 0 1 3 3 in 0 1 2 3 in 0 1 2
0 0 in 1 1 in 0 0 in 0 S A C AA S A C AAA A C AA A
If a CMOS NAND or NOR gate has a delay of 2 ns and an inverter has a delay of 1 ns, how much faster is a 64 bit version of this circuit than the ripple-carry circuit discussed in class? Explain.
The carry chain substitutes a NAND or NOR in each stage for an AND (which requires a NAND and an inverter), so the circuit saves an inverter delay in each stage, so the delay of the carry chain is about 64 ns faster than the original circuit.
S (^0) S 1
A (^0) A 1
S (^2) S 3
A (^2) A 3
C out
C in
S (^0) S 1
A (^0) A 1
S (^2) S 3
A (^2) A 3
C out
C in