Multiplication 7. Division 8.
Floating Point 9. Bits are just bits no inherent meaning conventions define relationship between bits and numbers Binary numbers base 2 MIPS 32 bit signed numbers: Negating a two's complement number: invert all bits and add 1 remember: negate and invert are quite different! Overflow result too large for finite computer word : e. Can overflow occur if A is 0? Output D is true if at least one input is true Output E is true if exactly two inputs are true Output F is true only if all three inputs are true Show the truth table for these three functions. Show the Boolean equations for these three functions.
Review: The Multiplexor Selects one of the inputs to be the output, based on a control input S note: we call this a 2-input mux even though it has 3 inputs! Different Implementations Not easy to decide the best way to build something Don't want too many inputs to a single gate Dont want to have to go through too many gates for our purposes, ease of comprehension is important Let's look at a 1-bit ALU for addition: CarryIn.
What about subtraction a b? Two's complement approach: just negate b and add. How do we negate? Important points about hardware all of the gates are always working the speed of a gate is affected by the number of inputs to the gate the speed of a circuit is affected by the number of gates in series on the critical path or the deepest level of logic. Our primary focus: comprehension, however, Clever changes to organization can improve performance similar to using better algorithms in software well look at two examples for addition and multiplication.
Is there more than one way to do addition? Can you see the ripple? How could you get rid of it? Carry-lookahead adder An approach in-between our two extremes Motivation: If we didn't know the value of carry-in, what could we do? When would we always generate a carry? Cant build a 16 bit adder this way Add multiplicand to the left half of the product and place the result in the left half of the Product register.
The bit divisor starts in the left half of the Divisor reg. The remainder will be found in the left half of the Remainder reg. Simplest solution: remember the signs of the divisor and dividend and then negate the quotient if the signs disagree Note: The dividend and the remainder must have the same signs!
Representation: sign, exponent, significand: 1 sign significand 2exponent more bits for significand gives more accuracy more bits for exponent increases range. IEEE floating point standard: single precision: 8 bit exponent, 23 bit significand double precision: 11 bit exponent, 52 bit significand. Example: Decimal Floating-Point Addition p. The significand of the number with the lesser exponent Add the significands: 1.
Normalize the sum, checking for overflow and underflow: 0. Step 4. Round the sun: 1. This sum is then 1. Rounding: FP numbers are normally approximations for a number they cant really represent. Operations are somewhat more complicated see text In addition to overflow we can have underflow Accuracy can be a big problem IEEE keeps two extra bits, guard and round four rounding modes positive divided by zero yields infinity zero divide by zero yields not a number other complexities. Implementing the standard can be tricky Not using the standard can be even worse see text for description of 80x86 and Pentium bug!
Chapter Four Summary Computer arithmetic is constrained by limited precision Bit patterns have no inherent meaning but standards do exist twos complement IEEE floating point Computer instructions determine meaning of the bit patterns Performance and accuracy are important so there are many complexities in real machines i. We are ready to move on and implement the processor you may want to look back Section 4.
Department of Microelectronics
Computer Abstractions and Technology — 2. The Role of Performance — 3. Instructions: Language of the Machine — 4. Arithmetic for Computers — 5. The Processor: Datapath and Control — 6. Enhancing Performance with Pipelining — 7. Large and Fast: Exploiting Memory Hierarchy — 8.
Marque por contenido inapropiado. Carrusel Anterior Carrusel Siguiente. Computer Architecture and Design- Patterson- Hennessy. Computer Organization and Design Chapter 2 Solutions. Digital Signal Processing by oppenheim home works. Buscar dentro del documento. How does the machine's instruction set affect performance? Which of these airplanes has the best performance? If we upgrade a machine with a new processor what do we increase? If we add a new machine to the lab what do we increase?
For some program, Machine A has a clock cycle time of 10 ns. Read carefully! Can you build a simple for loop? Immediate addressing op rs rt Immediate 2. Register addressing op rs rt rd How could we build a bit ALU? Shift the Multiplicand register left 1 bit Product Write 64 bits Control test 3.
Shift the Multiplier register right 1 bit 32nd repetition?
Add multiplicand to the left half of the product and place the result in the left half of the Product register bit ALU Multiplier Shift right 32 bits Product 64 bits Shift right Write Control test 2. Shift the Product register right 1 bit 3. Add multiplicand to the left half of the product and place the result in the left half of the Product register bit ALU Product 64 bits Shift right Write Control test 2. Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below. Writing code in comment?
Please use ide. Architecture describes what the computer does. Organization describes how it does it.
Computer Architecture deals with functional behavior of computer system. In above figure, its clear that it deals with high-level design issue. Pointing and ray casting. This allows selection of objects in clear view, but not those inside or behind other objects. This is analogous to "swipe select" in traditional GUIs. Selections can be made on the picture plane with a rectangle or in an arbitrary space with a volume by "lassoing.
Carrying this idea over to three dimensions requires a three-dimensional input device and perhaps a volume selector instead of a two-dimensional lasso. Voice input for selection techniques is particularly important in three-dimensional environments. The question of how to manage naming is extremely important and difficult. It forms a subset of the more general problem of naming objects by generalized attributes.
Naming attributes. Specifying a selection set by a common attribute or set of attributes "all red chairs with arms" is a technique that should be exploited.
Hardware and Computer Organization
Since some attributes are spatial in nature, it is easy to see how these might be specified with a gesture as well as with voice, offering a fluid and powerful multimodal selection technique: all red chairs, shorter than this [user gestures with two hands] in that room [user looks over shoulder into adjoining room]. For more complex attribute specification, one can imagine attribute editors and sophisticated three-dimensional widgets for specifying attribute values and ranges for the selection set.
Selection by example is another possibility: "select all of these [grabbing a chair].
It is important to provide the user with an opportunity to express "but not that one" as a qualification in any selection task. Of course, excluding objects is itself a selection task.