NotesForMidterm1

NotesForMidterm1 - BITS AND DATA ENCODING 0 2 21 22 23 24...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
BITS AND DATA ENCODING 2 0 1 2 1 2 2 2 4 2 3 8 2 4 16 2 5 32 2 6 64 2 7 128 2 8 256 2 9 512 2 10 1024 ≈Kilo 2 20 ≈Mega 2 30 ≈Giga 2 40 ≈Tera 2 50 ≈Peta 2 60 ≈Exa Useful powers of 2 HEX Table 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111 Octal – clustering of 3 bits Hexadecimal – clusters of 4 bits Each cluster represents a power of 16 Ex: 7d0 = 0*16 0 + 13*16 1 + 7*16 2 Signed Magnitude Representation Most significant bit (leftmost bit) represents the sign 0 = positive and 1 = negative
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2’s complement Most significant bit considered negative if 1 Don’t need separate subtraction rules Negation – Complement every bit and add 1 Sign Extension – simply copy sign bit into higher positions Fixed-Point Numbers Bias Notation Subtract constant value from all numbers Floating Point Numbers Normalized fraction (significand) x 2 exponent Single precision - v = - 1 S × 1. Significand × 2 Exponent - 127 INSTRUCTIONS Operand refers to a label of some other instruction. Instructions and data stored in a common memory Main memory – constrains both data and program size Program Counter – address of next instruction to be executed Memory locations are 32 bits wide (4 bytes) Every byte has a unique address R-type I-type J-type Branches and Jumps The range of MIPS branch instructions is limited to approximately ± 64K instructions from the branch instruction. In order to branch farther an unconditional jump instruction is used. REGISTERS
Background image of page 2
32 named registers 2 have H/W specific side effects 4 registers are dedicated to specific tasks 26 available for general use POINTERS In the “C” world and in the “machine” world: a pointer is just the address of an object in memory size of pointer is fixed regardless of size of object
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/27/2012 for the course COMP 411 taught by Professor Singh during the Fall '08 term at UNC.

Page1 / 9

NotesForMidterm1 - BITS AND DATA ENCODING 0 2 21 22 23 24...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online