CSCE 2214 Lecture Notes - Lecture 9: Endianness
Document Summary
Lec 9 9-14-16 ch2 overflow / representation of. If the result is the opposite sign than expected then overflow occurred. If a positive plus a negative resulted in a negative. 0111+0100=1011 is the same as 7+4=-5 the result overflowed due to the need to add a zero to the left to make the number positive. Adding this extra zero is theoretically not in our capacity since the result only holds 4 digits therefore overflow. 1111+1110=1101 is the same as -1+-2=-3 correct result and no need to extend the bits therefore no overflow. Memory addresses are given in the unit of byte since bytes are useful in many programs. The address of a word matches the address of 1 of the four bytes within the word. The addresses of sequential words will differ by 4. In general the smallest address of the bytes is used as the address of the word.