Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Help needed for a question from the book computer organization and design 5th ed

ID: 3598630 • Letter: H

Question

Help needed for a question from the book computer organization and design 5th edition. Please show and explain your steps so its easy to understand. And please dont waste my questions if youre not sure about the answer.

1) Consider the single-bit Full Adder constructed using 5 Boolean gates .We wish to use this Full Adder to construct a Ripple Carry Adder (RCA) for an add instruction in a CPU with a 32-bit wide ALU 1.1) Draw the circuit of the single 1-bit Full adder(3 level 2-inputs XORs and ANDs)? (do not draw the 32-bit RCA) 1.2) How many Boolean gates are required for this RCA? a) 5 gates (2 XOR, 2 AND, 1 OR) b) 10 gates (4 XOR, 4 AND, 2 OR) c) 50 gates (20 XOR, 20 AND, 10 OR) d) 160 gates (64 XOR, 64 AND, 32 OR) e) 320 gates (128 XOR, 128 AND, 64 OR) 1.2) If the propagation delay of each Boolean gate is 50 psec, then in the worst case how long would addition of two 32- bit numbers take using this RCA? a) 50 psec b) 1600 psec c) 4.8 nsec d) 480 nsec e) 1600 nsec 1.3) Given the above, suppose the clock period of this CPU is 1.2 nsec. What would the CPI for add be? Here assume any operations associated with an add instruction besides the RCA itself require negligible time (zero time for fetching instructions and operands from memory, zero time to access registers, zero time for control signals, etc.) b) 1.7 c) 2.0 d) 3.0 e) 4.0

Explanation / Answer

package com.one;
class DList<T> {
private DNode<T> header, trailer;
private int size;
public DList() {
size = 0;
header = new DNode<T>(null, null, null);
trailer = new DNode<T>(null, header, null);
header.setNext(trailer);
}
public int size() {
return size;
}
public boolean isEmpty() {
return size == 0;
}
// give clients access to nodes, but not to the header or trailer
public DNode<T> getFirst() throws Exception {
if (isEmpty())
throw new Exception("Empty");
return header.getNext();
}
public DNode<T> getLast() throws Exception {
if (isEmpty())
throw new Exception("Empty");
return trailer.getPrev();
}
public DNode<T> getNext(DNode<T> v) throws Exception {
DNode<T> ans = v.getNext();
if (ans == null || ans == trailer)
throw new Exception("No such node");
return ans;
}
public DNode<T> getPrev(DNode<T> v) throws Exception {
DNode<T> ans = v.getPrev();
if (ans == null || ans == header)
throw new Exception("No such node");
return ans;
}
// methods to change the list
public void addBefore(T d, DNode<T> v) {
DNode<T> u = v.getPrev();
DNode<T> x = new DNode<T>(d, u, v);
u.setNext(x);
v.setPrev(x);
size++;
}
public void addAfter(T d, DNode<T> v) {
DNode<T> w = v.getNext();
DNode<T> x = new DNode<T>(d, v, w);
v.setNext(x);
w.setPrev(x);
size++;
}
public void addFirst(T d) {
addAfter(d, header);
}
public void addLast(T d) {
addBefore(d, trailer);
}
public T remove(DNode<T> v) throws Exception {
if (v == header || v == trailer)
throw new Exception("Sentinel");
DNode<T> u = v.getPrev();
DNode<T> w = v.getNext();
w.setPrev(u);
u.setNext(w);
size--;
return v.getData();
}
// LinkedList testing methods:
public String toString() {
String ans = "";
DNode<T> n = header;
ans += "(H)<-->";
do {
n = n.getNext();
if (n == trailer)
ans += "(T)";
else
ans += (n.getData() + "<-->");
} while (n != trailer);
return ans;
}
}