Download presentation
Presentation is loading. Please wait.
1
12/6/2005Comp 120 Fall 20051 6 December 2 classes to go Lego Lab Assistant? Questions? CCR at end of class today
2
12/6/2005Comp 120 Fall 20052 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?
3
12/6/2005Comp 120 Fall 20053 Simplified R-type Datapath Read Reg. 1 5 5 5 32 Read Reg. 2 Write Reg. Write Data data 1 data 2 3 ALU Operation Inst Bits 25-21 Inst Bits 20-16 Inst Bits 15-11 RegWrite 32 Implementing a R-type operation is simply a matter of routing signals to the right places at the right times.
4
12/6/2005Comp 120 Fall 20054 This complex one does the same thing!
5
12/6/2005Comp 120 Fall 20055 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
6
12/6/2005Comp 120 Fall 20056 Representation What is 0x8FEFC000 if it represents: A 2’s complement integer? An unsigned integer? A float? An instruction?
7
12/6/2005Comp 120 Fall 20057 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?
8
12/6/2005Comp 120 Fall 20058 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?
9
12/6/2005Comp 120 Fall 20059 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?
10
12/6/2005Comp 120 Fall 200510 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)
11
12/6/2005Comp 120 Fall 200511 Quick Review Performance Assembly language programming Representation Arithmetic Logic gates Multiplication/Division Floating Point Control Pipelining Cache VM I/O, Interrupts, OS
12
12/6/2005Comp 120 Fall 200512 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
13
12/6/2005Comp 120 Fall 200513 Classes to go 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.