1 / 13

Lego Lab Assistant: CCR Questions, Comp 120 Fall 2005

This text discusses questions from the Comp 120 Fall 2005 class, including topics such as representation, control, and arithmetic. It also mentions the next courses in the curriculum. Written in English.

gbelk
Télécharger la présentation

Lego Lab Assistant: CCR Questions, Comp 120 Fall 2005

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 6 December • 2 classes to go • Lego Lab Assistant? • Questions? • CCR at end of class today Comp 120 Fall 2005

  2. Questions • Why can’t some numbers be represented in floating point? How to tell? 11 is OK, why not 1.1? • How does that control stuff work? Comp 120 Fall 2005

  3. Simplified R-type Datapath Implementing a R-type operation is simply a matter of routing signals to the right places at the right times. ALU Operation 3 5 Inst Bits 25-21 Read Reg. 1 32 data 1 5 Inst Bits 20-16 Read Reg. 2 5 Inst Bits 15-11 Write Reg. 32 data 2 32 Write Data RegWrite Comp 120 Fall 2005

  4. This complex one does the same thing! Comp 120 Fall 2005

  5. Control • Don’t lose the forest! • Each line is a set of wires transporting bits (1 wire per bit) • Control signal to each MUX determines which way a signal will go • The control lines all go back to the CONTROL block (our FSM) • The FSM drives these lines at just the right times to route signals Comp 120 Fall 2005

  6. Representation What is 0x8FEFC000 if it represents: • A 2’s complement integer? • An unsigned integer? • A float? • An instruction? Comp 120 Fall 2005

  7. Representation What is 0x8FEFC000 if it represents: • A 2’s complement integer? The sign bit is 1, so this is a negative number. We first take its two’s complement. A = 1000 1111 1110 1111 1100 0000 0000 0000 –A = 0111 0000 0001 0000 0100 0000 0000 0000 = 2^30 + 2^29 + 2^28 + 2^20 + 2^14 = 1,073,741,824 + 536,870,912 + 268,435,456 + 1,048,576 + 16,384 = 1,880,113,152 A = –1,880,113,152 • An unsigned integer? • A float? • An instruction? Comp 120 Fall 2005

  8. Representation What is 0x8FEFC000 if it represents: • A 2’s complement integer? • An unsigned integer? A = 8FEFC000 = 8 * 16^7 + 15 *16^6 + 14 *16^5 + 15 *16^4 + 12 *16^3 = 2,147,483,648 + 251,658,240 + 14,680,064 + 983,040 + 49,152 = 2,414,854,144 • A float? • An instruction? Comp 120 Fall 2005

  9. Representation What is 0x8FEFC000 if it represents: • A 2’s complement integer? • An unsigned integer? • A float? s = 1 exponent = 0001 1111 = 31 significand = 110 1111 1100 0000 0000 0000 (–1)^S * (1 + significand) * 2 ^(exponent–127) = –1x1.1101 1111 1x2^–96 = –1 * (1 + 13 * 16^–1 + 15 * 16^–2 + 2^–9) *2^–96 = –1.873 * 2^–96 = –2.364 * 10^–29 • An instruction? Comp 120 Fall 2005

  10. Representation What is 0x8FEFC000 if it represents: • A 2’s complement integer? • An unsigned integer? • A float? • An instruction? Opcode (6 bits) = 100011 = lw RS (5 bits) = 11111 = 31 RT (5 bits) = 01111 = 15 Address (16 bits) = 1100 0000 0000 0000 Address is negative so 2’s complement is 0100 0000 0000 0000 Address = -2^14 = -16384 LW 15, -16384(31) Comp 120 Fall 2005

  11. Quick Review • Performance • Assembly language programming • Representation • Arithmetic • Logic gates • Multiplication/Division • Floating Point • Control • Pipelining • Cache • VM • I/O, Interrupts, OS Comp 120 Fall 2005

  12. What is next in courses? • Comp 160 Digital Logic (next semester!) • Comp 140 Compilers • Comp 142 Operating Systems • Comp 130 Files and Databases • Comp 181 Models of Language and Computation Comp 120 Fall 2005

  13. Classes to go 1 Comp 120 Fall 2005

More Related