6 December - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

6 December

Description:

12/6/2005. Comp 120 Fall 2005. 1. 6 December. 2 classes to go. Lego Lab Assistant? Questions? CCR at end of class today. 12/6/2005. Comp 120 Fall 2005. 2. Questions ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 14
Provided by: gary290
Learn more at: http://www.cs.unc.edu
Category:
Tags: december | elgo

less

Transcript and Presenter's Notes

Title: 6 December


1
6 December
  • 2 classes to go
  • Lego Lab Assistant?
  • Questions?
  • CCR at end of class today

2
Questions
  • Why cant some numbers be represented in floating
    point? How to tell? 11 is OK, why not 1.1?
  • How does that control stuff work?

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
Read Reg. 1
Inst Bits 25-21
32
data 1
5
Read Reg. 2
Inst Bits 20-16
5
Write Reg.
Inst Bits 15-11
32
data 2
32
Write Data
RegWrite
4
This complex one does the same thing!
5
Control
  • Dont 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
Representation
  • What is 0x8FEFC000 if it represents
  • A 2s complement integer?
  • An unsigned integer?
  • A float?
  • An instruction?

7
Representation
  • What is 0x8FEFC000 if it represents
  • A 2s complement integer?
  • The sign bit is 1, so this is a negative number.
    We first take its twos complement.
  • A 1000 1111 1110 1111 1100 0000 0000 0000
  • A 0111 0000 0001 0000 0100 0000 0000 0000
  • 230 229 228 220 214
  • 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
Representation
  • What is 0x8FEFC000 if it represents
  • A 2s complement integer?
  • An unsigned integer?
  • A 8FEFC000
  • 8 167 15 166 14 165 15 164 12
    163
  • 2,147,483,648 251,658,240 14,680,064
    983,040 49,152
  • 2,414,854,144
  • A float?
  • An instruction?

9
Representation
  • What is 0x8FEFC000 if it represents
  • A 2s 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 (exponent127)
    1x1.1101 1111 1x296
  • 1 (1 13 161 15 162 29)
    296
  • 1.873 296
  • 2.364 1029
  • An instruction?

10
Representation
  • What is 0x8FEFC000 if it represents
  • A 2s 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 2s complement is 0100
    0000 0000 0000
  • Address -214 -16384
  • LW 15, -16384(31)

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

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

13
Classes to go
1
Write a Comment
User Comments (0)
About PowerShow.com