Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructor: David Trammell, PhD

Similar presentations


Presentation on theme: "Instructor: David Trammell, PhD"— Presentation transcript:

1 Instructor: David Trammell, PhD
Mid-Term Review Instructor: David Trammell, PhD Slides modified from those provided by textbook authors Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective (3rd Edition)

2 Bits A bit is a unit of information that can take two states
Bits are physically represented in computers by high and low voltage In writing, we typically represent them as 0 and 1 Bits get their value from context Bits do not have any higher meaning until we assume a context Bit vector == a bit string == a series of bits == et cetera Bit vectors also get their value from context Bit vectors may be numbers, characters, sets, cpu instructions, … Bits can even be random and essentially meaningless (e.g. garbage data)

3 Values and Binary Numbers
For our purposes, a value is the immutable concept of a number regardless of its symbolic representation Two can be represented by two II and more … We determine the meaning of symbols purely from context Binary Numbers (base 2 numbers) A numerical value encoded as a bit vector where each bit represents a sub-value of the total value according to it’s place and state If we take a bit vector of arbitrary length: … b3 b2 b1 b0 Assume each bit bi has a state of 0 or 1 The total value is given by: … (23 × b3)+(22 × b2)+(21 × b1)+(20 × b0) Outside of computing, a bit vector’s length may be infinite Unspecified places hold 0’s (hence do not contribute a sub-value)

4 Arbitrary Numerical Bases
Decimal Numbers (base 10 numbers) A numerical value encoded as a vector of digits where each digit represents a sub-value of the total value according to it’s place If we take a digit vector of arbitrary length: … d3 d2 d1 d0 Assume each digit di has a state of 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9 The value is given by: … (103 × d3)+(102 × d2)+(101 × d1)+(100 × d0) Hexadecimal Numbers (base 16 numbers, aka “hex”) A numerical value encoded as a vector of hex-digits where each hex-digit represents a sub-value of the total according to it’s place If we take a hex vector of arbitrary length: … h3 h2 h1 h0 Assume hex digit hi has a state of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F The value is given by: … (163 × h3)+(162 × h2)+(161 × h1)+(160 × h0)

5 2’s Complement and Unsigned Binary
2’s Complement Binary A numerical value encoded as a bit vector where each bit represents a sub-value of the total value according to it’s place and state A 2’s complement encoding always has a fixed length w The bit vector has w bits with places 0 to w-1: bw-1 … b3 b2 b1 b0 The total value is given by: -(2w-1 × bw-1)+ … +(22 × b2)+(21 × b1)+(20 × b0) Unsigned Binary Binary encoding with a fixed length w (2w-1 × bw-1)+ … +(22 × b2)+(21 × b1)+(20 × b0) Sign bit?

6 2’s Complement (w = 4): Places: -8 4 2 1
The negative weight of the sign bit is always greater than the combined weight of all positive bits

7 Unsigned (w = 4): Places: 8 4 2 1
The weight of any place is always equal to the sum of all smaller places + 1

8 Binary Vector to Hex (and back)
0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111 Hex Decimal Binary Binary Vector to Hex (and back) Make a chart? Slow and error prone Faster: know binary place values: 8, 4, 2, 1 1100 == == 12 9 is 9, A is 10, B is 11, C is 12 (Remember: F is 15; F is not 16) What are A F 7 4 and ? (does it matter what the bits mean?) ( )

9 Hex: things to know Every two hex digits is a byte:
0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111 Hex Decimal Binary Hex: things to know Every two hex digits is a byte: Each hex digit maps to 4 bits 2 hex digits map to 8 bits (a byte) Are these C constants positive or negative? 0xFFFFFF 0x7FFF FFFF 0x 0xC249 F809 (short)0x09FFFFFF

10 Hex: things to know Every two hex digits is a byte:
0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111 Hex Decimal Binary Hex: things to know Every two hex digits is a byte: Each hex digit maps to 4 bits 2 hex digits map to 8 bits (a byte) Are these C constants positive or negative? 0xFFFFFF positive 0x7FFF FFFF positive 0x negative 0xC249 F809 negative (short)0x09FFFFFF negative Remember, C constants are always type int by default Padding 0’s doesn’t change anything 0x00 == 0x0000; x0001 == 1;

11 Casting Signed vs. Unsigned in C
Casting from Unsigned to Signed (same size) Bits don’t change, but context does Positives numbers large enough to use bw-1 will become negative Casting from smaller to larger (both signed or unsigned) Zero extend unsigned types Sign extend signed types Casting from smaller to larger (one signed; one unsigned) Zero or sign extend first, then change from unsigned to signed second short to unsigned int: FFFF becomes FFFFFFFF (-1 becomes 232-1) unsigned short to int: FFFF becomes 0000FFFF (216-1 remains 216-1) short to int: FFFF becomes FFFFFFFF (-1 becomes -1) This is equivalent to two separate explicit casts!

12 Implicit Casting in C Implicit Casts in C expressions (right side of var = expression) Constants are type int unless specified (e.g. 1 is int; 1u is unsigned) Implicit casting always occurs if types don’t match Mixing unsigned and signed results in a cast to unsigned NOTE: if both size and sign don’t match, bad results for negatives short -1 + int 0 = -1 short -1 + unsigned 0 =FFFFFFFF (max_uint) short 1 + unsigned 0 = 1 Smaller types always get converted to larger types in expressions conversions happen one operand at a time, starting in (parentheses)

13 Implicit Casting in C Repeat: implicit casts happen one pair of operands at a time! short s = -1; unsigned u = 0; unsigned long ul = 0; ul = ul + (u + s); //what is the value of (u + s)? //what is the value of ul?

14 Implicit Casting in C Repeat: implicit casts happen one pair of operands at a time! s (-1 or 0xFFFF) is expanded from 16 bit to 32 bit and signed extended s (0xFFFF) becomes 0xFFFFFFFF and with u==0, (u + s) is also 0xFFFFFFFF ul + (u + s) is max_uint not max_ulong! short s = -1; unsigned u = 0; unsigned long ul = 0; ul = ul + (u + s); //what is the value of (u + s)? //what is the value of ul?

15 Truncation of Integers in C
What about assignments (left side of var = expression ) An expression resolves to a single type and value This final value on the right is promoted or demoted to the type of var (the type of var itself certainly can’t change once declared) Demotion of a type to a smaller size results in truncation Truncation means throw away the extra bits The effect on values is similar to the effect of overflow Can truncation happen in an integer expression? Only with explicit casts Implicit casts always promote small to large if size is mismatched

16 Casting Integers to Floating Point in C
Casting from integer types to floating point Bits DO change! Compilers like GCC will use instructions that decode and re-encode the binary signed or unsigned value to the chosen floating point type In expressions: Mixing floats and signed or unsigned integers always promotes to float Double causes both float and integers to promote to double Remember: floating point constants are double by default! 1.5 is a double 1.5f is a float

17 Bitwise Ops and Bit Masking
AND mask sets 0's OR mask sets 1's XOR mask inverts bits x bbbbbbbb bbbbbbbb bbbbbbbb mask & | ^ z bbbb bbbb bbbbbbbb NOTES: A mask can be arbitrary (e.g ) b represents eithers a 1 or 0 b represents the opposite of the corresponding b

18 Remember: Bitwise vs Logical
Logical Operators Logical operators are: && || ! (AND, OR, NOT) In a logical expression, 0 represents “False” Anything nonzero represents “True” The return value is always an int set to 0 or 1 That is: 0x or 0x Don’t mix up bitwise and logical operators Bitwise operators: & | ^ ~ (AND, OR, XOR, NOT) I won’t give much (or any?) partial credit

19 Shift Operations Left Shift: x << k Right Shift: x >> k
Shift bit-vector x left k positions Throw away bits on left, right gets 0’s Right Shift: x >> k Shift bit-vector x right k positions Throw away bits on right, left gets? Logical right shift: fill 0’s on left Arithmetic right shift: fill with sign bit Note the arithmetic shift exists for the same reason that sign extension exists Shift where k < 0 OR k >= w? UNDEFINED (behavior varies by machine!) Argument x << 3 Logic. >> 2 Arith. >> 2 Argument x << 3 Logic. >> 2 Arith. >> 2

20 C Operator Precedence? Make sure to perform:
Anything in parentheses first Then mult, div and mod (* / %) in order from left to right Then plus and minus (+ – ) in order from left to right I will use parentheses for any other operators (shifts, bitwise ops, comparisons, etc.)

21 Binary Negation Binary Negation of x (that is -1 * x) == ~x + 1
This can be performed on both signed and unsigned For signed, converts x to –x That is the additive inverse: -x + x = 0 For unsigned, converts x to 2w minus x Still acts as additive inverse because of overflow: -x + x = umax+1 (which overflows to 0) Bit level behavior is the same The point is that it’s valid to negate an unsigned type and that the result is still unsigned (and thus still positive)

22 Binary Addition and Multiply
Addition and multiply are modular operations in C The effect of overflow is: x + y becomes (x + y) mod 2w x * y becomes (x * y) mod 2w The sum of two w-bit values can have at most 1 bit of overflow The product of two w-bit values can have up to w bits of overflow Can still perform “standard algebra” safely to simplify expressions Only if add, subtract and multiply (no division allowed)

23 Binary Addition and Multiply
Adding negative and positive 2’s complement values at the binary level produces expected results IFF overflow is discarded: E.G. for w= are = If we discard the overflow, we get 2-1=1 (correct) If we keep the overflow Left shifting unsigned values multiplies by powers of 2 Shift left by k multiples by 2k Shift left by 1, multiply by 21 (2) Shift left by 2, multiply by 22 (4) Shift left by 3, multiply by 23 (8)

24 Division IFF overflow is discarded, adding negative and positive 2’s complement values together produces expected results E.G. for w= are If we discard the overflow, we get -1+2=1 (correct) If we keep the overflow … ? Right shifting unsigned values divided by powers of 2 BUT Truncating is not done properly to match the standard / operator

25 Fractional Binary Numbers
We’re not talking about a computer data format yet… Bits to the left of the binary point represent powers of 2 The same as unsigned Bits to right of the binary point represent fractional powers of 2 That is negative powers (recall that 2-n == 1 / 2n ) … … … (1/2) (1/4) (1/8) (1/16) … (8/16) (4/16) (2/16) (1/16) Latex source for equation: \sum_{k=-j}^i b_k \times 2^k

26 Fractional Binary Numbers: Examples
Value Representation 5 3/ 2 7/ 1 7/ Observations Divide by 2 by shifting right Multiply by 2 by shifting left …10 is 1/3 …10 is 1 …2 is 1

27 Representable Numbers
Limitation #1: limited exactness: Can exactly represent many fractions of the form x/2k Examples: 1/2 1/4 3/4 59/64 (and > 1: 65/64) Value Representation 1/ 1/ 5/ 59/ Other rational numbers require infinite repeats 1/ …2 1/ …2 1/ …2

28 Precision options (don’t memorize)
Single precision: 32 bits Double precision: 64 bits Extended precision: 80 bits (Intel only: long double in C) s exp Frac 1 8-bits 23-bits s Exp frac 1 11-bits 52-bits s exp frac 1 15-bits 63 or 64-bits

29 Floating Point Representation
Numerical Form: (–1)s * M * 2E Sign bit s determines whether number is negative or positive This is a true sign bit (unlike 2’s compliment) Significand M normally a fractional value in range 1.0 <= M < 2.0. Exponent E weights value by power of two (moving binary point) Encoding Most significant bit s is the sign bit s The exp (exponent) field encodes E (how is E encoded?) frac (fraction) field encodes the fractional part of M (how) s exp frac

30 Case 1 “Normalized” Values
v = (–1)s M 2E When: exp field is anything except all 0’s or all 1’s Exponent is coded as a biased value: E = exp – bias Step 1: interpret exp as an unsigned number Step 2: bias = 2w-1 - 1, where w is number of bits in exp Wait, what? If the unbiased range is 0 to 255, bias is (255/2) Step 3: E = exp - bias For single precision: bias=127 (Exp: 1…254, E: -126…127) For normalized value, significand M has an implied leading 1 Significand M is fraction Hence, significand M ranges from [1.0 to 2.0)

31 Normalized Encoding Example
v = (–1)s M 2E E = Exp – Bias Value: float F = ; = = x 213 Significand M = frac = Exponent E = 13 Bias = 127 Exp = 13+bias is 140 and 140 as unsigned value is: s exp frac

32 x86-64 Integer Registers (8 of 16)
%rax %eax %ax %al %rbx %ebx %bx %bl %rcx %ecx %cx %cl %rdx %edx %dx %dl %rsi %esi %si %sil %rdi %edi %di %dil %rbp %ebp %bpx %bpl %rsp %esp %sp %spl

33 Recall: integer registers are subsets of 64 bits
One 64 bit register: multiple methods of access Sometimes we see reference to ah, bh, ch and dh These refer to the “high” byte of the lower two bytes These cannot be freely used (might need to move it elsewhere first) Typically used to access the remainder of divb and idivb instruction rax eax Cannot access directly (could access via shifting right by 32) ax ah al

34 All sixteen x86-64 Integer Registers (lower 16 bit names not shown)
%rax %eax %r8 %r8d %rbx %ebx %r9 %r9d %rcx %ecx %r10 %r10d %rdx %edx %r11 %r11d %rsi %esi %r12 %r12d %rdi %edi %r13 %r13d %rbp %ebp %r14 %r14d %rsp %esp %r15 %r15d

35 %rax %r8 %rbx %r9 %rcx %r10 %rdx %r11 %rsi %r12 %rdi %r13 %rbp %r14
For r8 to r15 a postfix of d (double-word), w (word) or b (byte) is appended to obtain low order names 64 bit register names appear in chart below 32 bit register names (eax, ebx, ecx, edx, esi, edi, ebp, esp) 16 bit register names (ax, bx, cx, dx, si, di, rp, sp) 8 bit names (al, bl, cl, dl, sil, dil, bpl, spl) %rax Return value %r8 5th argument %rbx Temp storage (callee saved) %r9 %6th argument %rcx 4th argument %r10 Temp storage (caller saved) %rdx 3rd argument %r11 Temp storage (caller saved) %rsi 2nd argument %r12 Temp storage (callee saved) %rdi 1st argument %r13 Temp storage (callee saved) %rbp Base Pointer (callee saved) %r14 Temp storage (callee saved) %rsp Stack Pointer %r15 Temp storage (callee saved)

36 x86-64 Linux Register Usage #1
%rax Return value Also caller-saved Can be modified by procedure %rdi, ..., %r9 Arguments %r10, %r11 Caller-saved Return value %rax %rdi %rsi %rdx Arguments %rcx %r8 %r9 %r10 Caller-saved temporaries %r11

37 x86-64 Linux Register Usage #2
%rbx, %r12, %r13, %r14 Callee-saved Callee must save & restore %rbp May be used as frame pointer Can mix & match %rsp Special form of callee save Restored to original value upon exit from procedure %rbx %r12 Callee-saved Temporaries %r13 %r14 %r15 %rbp Special %rsp

38 Data Sizes Instructions names must match the size of data …
movq, movl, movw, movb q = quad word (8 bytes) l = long word or double word (4 bytes) w = word (2 bytes) and b = byte … or can be left out; register size defines data size mov %rbx, %rax #mov 8 byte reg to 8 byte reg mov (%rbx), %eax #mov 4 bytes from memory to %eax mov %bx, (%rax) #mov %bx into 2 bytes of memory mov %bl, %al #mov 1 byte reg to 1 byte reg mov %bx, %rax #invalid instruction

39 Instruction vs. Register Suffixes
Be careful about the suffix L: Instruction suffixes (l is for long word): movq  copy quad word (8 bytes) movl  copy long word (4 bytes) movw  copy word (2 bytes) movb  copy byte Register suffixes (l is for lower) %rax  8 bytes (register AX) %eax  4 bytes (extended AX) %ax  2 byte register (original register names are from IA16) %al  1 byte (the lower byte of %ax)

40 Disassembed Object Code
<multstore>: 668: push %rbx # 1 byte 669: d mov %rdx,%rbx # 3 bytes 66c: e callq 660 <mult> # 5 bytes 671: mov %rax,(%rbx) # 3 bytes 674: 5b pop %rbx # 1 byte 675: c retq # 1 byte Addresses Assembly Instructions The actual bytes that make up each instruction in the fully compiled binary

41 2-op Instructions in general
mov Source, Destination (Destination is always 2nd in all 2-op instructions that we have looked at) Operand Types Immediate: is constant “integer” data prefixed with $, may be hex or decimal, may have negative sign $0x400, $-533, $-0x272 Register: One of 16 integer registers of appropriate size Memory: 1,2,4 or 8 consecutive bytes of memory starting from an address Simplest example of address is just: (%rax) Be able to calculate all address formats $imm (R1, R2, S) is calculated by $imm + R1 + (R2 * S) (, R, S) is calculated by (R * S) $imm (R1, R2) is calculated by $imm + R1 + (R2 * 1) A-3

42 movq Operand Combinations
Source Dest Src,Dest C Analog Reg movq $0x4,%rax temp = 0x4; Imm Mem movq $-147,(%rax) *p = -147; Reg movq %rax,%rdx temp2 = temp1; movq Reg Mem movq %rax,(%rdx) *p = temp; Mem Reg movq (%rax),%rdx temp = *p; Cannot do memory-memory transfer with a single instruction A-11

43 Annotating with Variables
#If I give you: #rdi is x #rsi ix y #rdx is z #YOU should write: arith: leaq (%rdi,%rsi), %rax #rax= x+y addq %rdx, %rax #rax= x+y+z leaq (%rsi,%rsi,2), %rdx #rdx= y+y*2 == 3y salq $4, %rdx #rdx= (3y)<<4 == 48y leaq 4(%rdi,%rdx), %rcx #rcx= 4+x+48y imulq %rcx, %rax #rax= (x+y+z)*(4+x+48y) ret

44 Processor State (x86-64, Partial)
Information about currently executing program Temp data (%rax,%rbx …) Top of runtime stack ( %rsp ) Location of current code control point ( %rip, … ) Status of recent tests ( CF, ZF, SF, OF ) Registers %rsp %r8 %r9 %r10 %r11 %r12 %r13 %r14 %r15 %rax %rbx %rcx %rdx %rsi %rdi %rbp Instruction pointer %rip Current stack top CF ZF SF OF Condition codes

45 Reading Condition Codes; Follow Jumps
cmpq %rsi, %rdi # Compare rdi to rsi setg %al # If rdi > rsi set %al movzbl %al, %eax # mov %al to %eax and zero extend ret cmpq %1st, %2nd # Compare 2nd to 1st jle .LABEL # If 2nd <= 1st jump to .LABEL movzbl %al, %eax # etc. ret test %x, %x # Compare x to 0 jle .LABEL # If x <= 0 jump to .LABEL movzbl %al, %eax # etc. ret

46 Single Operand Multiply
Instruction Forms: imul S # S must be a register to determine operand size imulq S # S can be memory (8 bytes) or 64 bit register imul_ S # imull, imulw, imulb (similar to instruction above) mul_ S # Unsigned versions: mul, mulq, mull, mulw, mulb Destination and Source 2 are automatic (and match size of S) imulq S # rdx:rax = rax * S imull S # edx:eax = eax * S imulw S # dx:ax = ax * S imulb S # ah:al = al * S The destination treats two registers as one This allows full result to be stored with no overflow

47 Division (always single operand)
idivq S # rax = quotient of rdx:rax / S rdx = remainder idivl S # eax = quotient of edx:eax / S edx = remainder idivw S # ax = quotient of dx:ax / S dx = remainder idivb S # al = quotient of ah:al / S ah = remainder Uses a pair of registers automatically as dividend (e.g. rdx:rax), divisor is S Uses those same two registers to store result (e.g. rdx:rax get remainder:quotient) Why separate signed and unsigned (examples using byte instructions) 2’s comp and unsigned add, sub, and mul give same result IFF we discard overflow mulb for 0xFF*0xFF: * = addb for 0xFF+0xFF: = idivb / should be ( -2 / should be 2 rem 0) divb / should be 0 (254 / 255 should be 0 rem 1)

48 x86-64 Stack Stack “Bottom”
Pointer %rsp Stack grows downward toward low addresses Higher Addresses Stack “Top” Stack “Bottom” Each procedure call uses a portion of the stack called a stack frame. Each procedure (P, Q, etc), has its own stack frame %rsp contains the stack pointer which points to the “top” of the stack. We diagram memory with 0 at the bottom. To allocate space, we subtract from the stack pointer.

49 x86-64/Linux Stack Frame P’s Stack Frame as it approaches call to Q
……… P’s Callee Saved Reg’s Local Vars (optional) P’s Stack Frame as it approaches call to Q Things already on P’s stack P builds arguments 7+ for Q P pushes return address A Q’s Stack Frame (all optional!) Save %rbp to stack Write frame pointer to %rbp Save other callee saved registers Use stack for local variables Argument’s for call to another functions P’s Frame (caller) Arguments 7+ aka Base Frame Pointer Pointer %rbp (optional) Return Addr Old %rbp Other Callee Saved Regs. (optional) Local Variables (optional) Q’s Frame (callee) Argument Build (optional) Stack pointer %rsp

50 Simulating Arrays in Memory
Array size is: L * K (length L times size of type K) Access with A + K*i (A is a pointer to the start of the array) Matrix size is R * C * K (rows * colums * K) Access with A + K*( C*i + j ) (A is a pointer to the start of the matrix) Row pointer? A + K*C*i (just replacing j with 0) Easier than it looks, just follow the assembly code: You’ll start from pointer A Add C*i to reach the ith row Add j to reach the jth element in the ith row Multiply by K to scale the access to the correct element size Might be done in a different order

51 Structures & Alignment
Unaligned Data Aligned Data Primitive data type requires K bytes Address must be multiple of K struct S1 { char c; int i[2]; double v; } *p; c i[0] i[1] v p p+1 p+5 p+9 p+17 c 3 bytes i[0] i[1] 4 bytes v p+0 p+4 p+8 p+16 p+24 Multiple of 4 Multiple of 8 Multiple of 8 Multiple of 8

52 Alignment Principles Aligned Data Why Align?
If a primitive data type requires K bytes Then address must be multiple of K This is required on some machines X86-64 doesn’t require it, but it is advised Why Align? Memory is accessed in chunks for efficiency Chunks are aligned on 4 or 8 byte boundaries Inefficient to access datum that spans boundaries Compiler puts gaps in structure to ensure alignment

53 Satisfying Alignment with Structures
Within structure: Must satisfy each element’s alignment requirement Overall structure placement Each structure has alignment requirement K K = Largest alignment of any element Initial address & structure length must be multiples of K Example: K = 8, due to double element struct S1 { char c; int i[2]; double v; } *p; c 3 bytes i[0] i[1] 4 bytes v p+0 p+4 p+8 p+16 p+24 Multiple of 4 Multiple of 8 Multiple of 8 Multiple of 8

54 Arrays of Structures Overall structure length multiple of K
struct S2 { double v; int i[2]; char c; } a[10]; Overall structure length multiple of K Satisfy alignment requirement for every element a[0] a[1] a[2] • • • a+0 a+24 a+48 a+72 v i[0] i[1] c 7 bytes a+24 a+32 a+40 a+48

55 Saving Space in a Structure
Always put largest data types first Effect (K=4) struct S4 { char c; int i; char d; } *p; struct S5 { int i; char c; char d; } *p; c 3 bytes i d 3 bytes i c d 2 bytes

56 NOT on the mid-term C Unions Writing C code by hand that compiles
Knowing exactly how the x86-64 condition flags are set That is, you don’t need to know the “bit level effects” from my assembly instruction reference Assembly floating point instructions (SIMD, xmm registers) History of x86_64 / IA32 Exact memorization of IEEE floating point field sizes How to use GCC, Vim or other classes server commands

57 Definitely or Very Likely On Mid-Term
Understanding and/or Annotating Assembly Code You should be able to follow .S file code and objdump code You should be very familiar with the registers and their uses You should know all instructions in my reference EXCEPT movabsq, cltq, cqto, cltd, cmov (conditional move) (you must understand the single op division and multiply) Understanding C code using Bitwise ops, Casting, Basic pointer usage Questions testing essential knowledge of binary encodings Binary encodings (unsigned, 2’s complement) Normalized floating point encodings

58 Possibly on the Mid-Term
Anything not ruled out 2 slides ago Especially if it’s in today’s slides Arbitrary numerical bases I may give a question that uses material we haven’t seen yet (such as a new assembly instruction), if so I will provide an explanation of that material on the exam


Download ppt "Instructor: David Trammell, PhD"

Similar presentations


Ads by Google